Error in ReadBasketBuffers & Gaps with Map()

Hi,
I am using Root 5.26.00a and I want to loop over a list of root-trees which i copied from castor to my local machine.
While looping over all Events in my root-trees i get error messages similar to the following:

“R__unzip: error -3 in inflate (zlib)
Error in TBasket::ReadBasketBuffers: fNbytes = 2093, fKeylen = 90, fObjlen = 31744, noutot = 0, nout=0, nin=2003, nbuf=31744
Error in TBranch::GetBasket: File: /user/data_336/treeQCDemPt30to80_7TeV_43.root at byte:169607373, branch:algoL1Bit, entry:359227, badread=0, nerrors=1, basketnumber=1

R__unzip: error -3 in inflate (zlib)
Error in TBasket::ReadBasketBuffers: fNbytes = 2093, fKeylen = 90, fObjlen = 31744, noutot = 0, nout=0, nin=2003, nbuf=31744
file probably overwritten: stopping reporting error messages
Error in TBranch::GetBasket: File: /user/data_336/treeQCDemPt30to80_7TeV_43.root at byte:169607373, branch:algoL1Bit, entry:359227, badread=0, nerrors=1, basketnumber=10

The error messages occurs to different files each run.
From other topics in this forum I know that the reason could be corrupted root-files. I tried to exchange the files with error messages but the error still remains.
Refering to /viewtopic.php?p=38863 I tried to load one of the files as TFile and to run Map() on it. The resulting output has some “gaps” in it:



20100319/030310 At:32590093 N=444 TBasket CX = 71.70
20100319/030326 At:32590537 N=410 TBasket CX = 77.64
20100319/030342 At:32590947 N=426 TBasket CX = 74.73
Address = 32591373 Nbytes = -16 =====G A P===========
20100319/002248 At:32591389 N=4053 StreamerInfo CX = 3.20
20100319/002254 At:32595442 N=470 TBasket CX = 67.73
20100319/002254 At:32595912 N=1938 TBasket CX = 16.43

20100319/105738 At:130183662 N=462 TBasket CX = 68.90
20100319/133836 At:130184124 N=170 TBasket CX = 73.50
Address = 130184294 Nbytes = -14 =====G A P===========
20100319/081957 At:130184308 N=27508 TBasket CX = 1.08
20100319/081957 At:130211816 N=26371 TBasket CX = 1.13

Could those gaps be the origin of my error messages? Where do those gaps come from? Is there a way to fix them?

Thanks.

Hi,

[quote]Could those gaps be the origin of my error messages? Where do those gaps come from? Is there a way to fix them?[/quote]No they are normal occurence and should result in nothing more than a little bit of wasted space on disk. The only way to get rid of them is to rewrite the file making absolutely sure that no key is ever deleted (i.e. you need to disable the TTree Autosave mechanism).

[quote] I tried to exchange the files with error messages but the error still remains.[/quote]What do you mean by exchange?

I noted that in your example the same exact error is repeated twice. Is there error in other files and/or in other places in the file?

Philippe.

Thanks for your answer and sorry if I was not clear enough.
The posted error message is a fragment of one of the error messages I get. It consists of two parts.
The first part is:

which is repeated several times.
Then the second part (

) follows and is repeated even more times.

For my analysis I read in a list of root-files (each of them containing a root-tree) and then I loop over all events included in these trees. The script uses the MakeClass-function and works well for other analysis(i.e. other type of trees).
During this loop the error messages occur. There is usually more than one error message during a run. And the files which lead to the errors change each run.

By exchange I meant that I deleted the files producing error messages from my local machine and copied them again from castor.

Any idea what the reason for the error could be? What could I do to get more information about the problem (or to solve it)?

Thanks alot,

Philipp

[quote]By exchange I meant that I deleted the files producing error messages from my local machine and copied them again from castor.[/quote]This is likely to mean that this file is corrupted as written in castor. There is also a possibly that your code has memory over-writte problem. To assert which is which, can you send me one of your failing files?

Philippe.

I managed to find a file which produced an error some time ago and which is small enough to be uploaded here. Most of the files are much larger.

Usually when running over a single file no error message occurs even if there was an error in that file in the complete run (with all files). Only in some rare cases there was an error message while running over a single file. Therefore I do not know whether you can reproduce my error messages with the uploaded file.

Thanks for your help,
Philipp
treeQCDemPt20to30_7TeV_29.root (1.85 MB)

I do not see any problem with your file. I can process all the branches of your Tree.
Could you post the shortest and simplest script reproducing your problem?

Rene

[quote]Usually when running over a single file no error message occurs even if there was an error in that file in the complete run (with all files). Only in some rare cases there was an error message while running over a single file. [/quote]This usually means that the problem is not with the files but with the scripts and/or the way the user object addresses are set. I recommend that you either send us a simple complete running example showing the problem or that you try to use valgrind to pinpoint the (potential) memory error.

Cheers,
Philippe.