Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-8055

File corruption after TTree deletion

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.02/08
    • Fix Version/s: 6.02/14, 5.34/36, 6.08/00, 6.04/16, 6.06/04
    • Component/s: I/O
    • Environment:

      lxplus (SLC6), set up using ATLAS release 20.7.3.8 (LCG 75root6), x86_64-slc6-gcc48-opt

    • Platforms:
      x86_64-slc6-gcc48-opt

      Description

      As part of the ATLAS DQ monitoring we create rather large files with histograms and TTrees to keep metadata. We occasionally have files where attempting to delete one of these TTrees creates a corrupt file; an example is in /afs/cern.ch/user/p/ponyisi/public/testcase.root . The following will corrupt the file:

      root [2] TFile *_file1 = TFile::Open("testcase.root", "UPDATE")
      (class TFile *) 0x4485250
      root [3] gDirectory->cd("/run_284285/lowStat_LB1001-1020/HLT/MuonMon/Coverage")
      (Bool_t) true
      root [4] gDirectory->Delete("metadata;1")
      root [5] _file1->Write()
      (Int_t) 0
      root [6] .q

      as evidenced by

      root -l testcase.root
      root [0] 
      Attaching file testcase.root as _file0...
      (class TFile *) 0x1d8dc10
      root [1] gDirectory->cd("/run_284285/lowStat_LB1001-1020/HLT/MuonMon/Coverage")
      SysError in <TFile::Seek>: cannot seek to position -1807292313 in file testcase.root, retpos=-1 (Invalid argument)
      Error in <TDirectoryFile::ReadKeys>: reading illegal key, exiting after 0 keys
      Error in <TDirectoryFile::cd>: Unknown directory MuonMon
      (Bool_t) false

      Are we doing something wrong? This is a real worry for our DQ operations.

        Attachments

          Activity

            People

            • Assignee:
              pcanal Philippe Canal
              Reporter:
              ponyisi Peter Onyisi
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: