Error while reading file

Hello,

Sorry if my post in not in the right way it should be, this is my first one.

I recently stopped a job which was reading a root file, and I’m sure the file was not properly closed. So, when the job try to read it again, I get this error message:

_R__unzip: error -5 in inflate (zlib)_
_----- Begin Fatal Exception 21-Mar-2019 18:56:51 CET-----------------------_
_An exception of category 'FileReadError' occurred while_
_   [0] Processing run: 1 lumi: 11518 event: 5472651_
_   [1] Running path 'p'_
_   [2] Calling event method for module MuonFilter/'muonFilter'_
_   [3] Reading branch recoMuons_muons__RECO._
_   Additional Info:_
_      [a] Fatal Root Error: @SUB=TBasket::ReadBasketBuffers_
_fNbytes = 8492, fKeylen = 111, fObjlen = 17444, noutot = 0, nout=0, nin=8381, nbuf=17444_

_----- End Fatal Exception -------------------------------------------------_

When I try to recover the file with TFile::Recover(), I get this error message:

_root [1] _file0->Recover()_
_Error in <TFile::Recover>: Address = 226762245  Nbytes = 0      =====E R R O R=======_
_(Int_t) 0_
_root [2]_

My question is, is this file recoverable? If so how could I do that?

Many thanks

Hi,

it looks like a very corrupted file. I wonder if you can compare its size with the expected one. For all the rest I would refer to CMSSW documentation.

Cheers,
Danilo

Hello @dpiparo,

Yes it is probably a corrupted file. Before running this jobs it was a good file, but somehow when running the job it became corrupted and I got the

R__unzip: error -5 in inflate (zlib)

error. It happens sometimes when the file is not properly closed (when the job finishes unexpectedly) and I don’t know how to recover it (it that is possible). The workaround I have is to create a new root file (takes some time for that), but I wondered if there was a ROOT method able to recover the corrupted file.

Thanks

If Recover fails then there is nothing more we can do (i.e. there is likely missing information in the file).

Hello @pcanal,

Thanks! That’s what I needed to know.

Cheers