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

crash on TMemFile deletion in multi-threaded app

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.34/00
    • Fix Version/s: 6.12/02, 6.14/00
    • Component/s: I/O
    • Labels:
      None
    • Environment:

      Linux

    • Development:

      Description

      See also on the forum:
      http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=18840

      On deletion of TMemFile, there is a dereference of a NULL pointer in RecursiveRemove.

      Contrary to what is said on the forum, it is not enough to lock around the deletion. The lock needs to be around the TMemFile constructor (see also attached script for a reproducer with ACLiC).

      Note that helgrind is unhappy in all cases, claiming that the destructor of TThreadCleaner unlocks a mutex that is not locked. The problem mutexes are two: fgMainMutex and gMainInternalMutex, neither of which is locked before being unlocked in the TThread::CleanUp(). Removing both cleanups makes helgrind (somewhat more) happy, but does nothing for requiring the lock around the TMemFile constructor.

      It is not clear to me where the problem in the TMemFile destructor is. Helgrind is unhappy about the TUUID constructor combined with TUnixSystem::DispatchOneEvent(). Both end in TUnixSystem::TimeNow.

      Cheers,
      Wim

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pcanal Philippe Canal
              Reporter:
              wlav Wim Lavrijsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: