Open big TFile in "update" mode

Hello

I started to work with big (~5GB) ROOT files. Each ROOT file contains one TTree.

I have to read these files several times. It happened twice that after several “uses”, opening those big files in “update” mode, they are corrupted somehow (when I try to run again a script for reading them, it’s like that the TTree has dissappeared). When I open manually the problematic file, this message appears

Error in TFile::ReadKeys: reading illegal key, exiting after 0 keys
Info in TFile::Recover: myFile.root, recovered key TTree:myData at address 3208797846

So, in order to avoid this kind of problems, is there any advice when big files are opened in “update” mode? (I did not find any advice in the documentation)

Thank you for your time.

Regards,
atd

Hi,

could you share this file for us to reproduce?

Cheers,
D

Hello

That happened only two times, with two different files.

The files only contained a big TTree (~5GB). The disk format is ext4.

I can not upload a 5GB file, but I can try to prepare a kind of dummy file if you want.

But if there is no problem about the size of the files, the problem is related to the structure of the objects which are saved into the TTree. I will need time to check other (more tricky and complex) things.

Thank you for your time.

Regards,
atd

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

I assume this means that you are changing the content of the file somehow. What kind of modification are you doing? How are you closing the file and/or deleting the TFile object?

I have to read these files several times.

How those times, one after the other or are they ‘at the same time’ (for example two process running in parallel)?

So, in order to avoid this kind of problems, is there any advice when big files are opened in “update” mode?

As far as we know there shouldn’t be anything ‘special’ about large files in that regard.

Cheers,
Philippe.