RootCnv fails to detect some special corruption of a ROOT file
As reported in lhcb/DaVinci#183, some corrupted files are not correctly identified by RootCnv.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
- Show closed items
Link issues together to show that they're related or that one is blocking others.
Learn more.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Marco Clemencic changed milestone to %v38r2
changed milestone to %v38r2
- Marco Clemencic assigned to @clemenci
assigned to @clemenci
- Marco Clemencic mentioned in issue lhcb/DaVinci#183
mentioned in issue lhcb/DaVinci#183
- Contributor
Here is a reproducer for a smaller file which is corrupt in a similar way:
Details on how it was produced
- Modify
uproot/reading.py
to print the byte range corrosponding to the EventTTree
's metadata:
def get_uncompressed_chunk_cursor(self): """ Returns an uncompressed :doc:`uproot.source.chunk.Chunk` and :doc:`uproot.source.cursor.Cursor` for the object pointed to by this ``TKey`` as a 2-tuple. """ cursor = uproot.source.cursor.Cursor(0, origin=-self._fKeylen) data_start = self.data_cursor.index data_stop = data_start + self.data_compressed_bytes + if self._fName == "Event": + print(f"{data_start=} {data_stop=}") chunk = self._file.chunk(data_start, data_stop)
- Read it with uproot
In [1]: import uproot ...: fn = "root://eoslhcb.cern.ch//eos/lhcb/user/c/cburr/00105545_00006999_1.ift.dst" ...: fn = "ROOTIO.dst" ...: f = uproot.open(fn) ...: f["Event"] data_start=6132 data_stop=7233
- Intentionally corrupt the file
In [2]: with open("ROOTIO.dst", "r+b") as fh: ...: fh.seek(6132+100) ...: fh.write(b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10")
- Modify
- Marco Clemencic mentioned in commit 36af26b8
mentioned in commit 36af26b8
- Marco Clemencic mentioned in merge request !1571 (merged)
mentioned in merge request !1571 (merged)
- Author Owner
As expected, when we introduced the detection of corrupted files we missed one spot that is very difficult to trigger.
!1571 (merged) uses @cburr's test file to expose the problem and introduces a fix.
- Marco Clemencic mentioned in commit b3e26a7a
mentioned in commit b3e26a7a
- Marco Clemencic closed with merge request !1571 (merged)
closed with merge request !1571 (merged)
- Marco Clemencic mentioned in commit staider/Gaudi@3005c756
mentioned in commit staider/Gaudi@3005c756
Please register or sign in to reply