# Crash involving TFile::Close

**URL:** <https://root-forum.cern.ch/t/crash-involving-tfile-close/29790>\
**Category:** ROOT\
**Created:** [July 14, 2018, 2:14pm UTC](https://root-forum.cern.ch/t/crash-involving-tfile-close/29790 "2018-07-14T14:14:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Viesturs](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/7cd45c/32.png) [@Viesturs](https://root-forum.cern.ch/u/Viesturs)\
**Post date:** [July 14, 2018, 2:14pm UTC](https://root-forum.cern.ch/t/crash-involving-tfile-close/29790/1 "2018-07-14T14:14:07Z")

</div>

Sometimes I have a crash starting from TFile::Close:

> Program received signal SIGSEGV, Segmentation fault.  
> 0x00007ffff7c5591c in TList::RecursiveRemove(TObject\*) ()  
> from /cvmfs/cms.cern.ch/slc6\_amd64\_gcc530/cms/cmssw-patch/CMSSW\_8\_0\_26\_patch1/external/slc6\_amd64\_gcc530/lib/libCore.so  
> #0 0x00007ffff7c5591c in TList::RecursiveRemove(TObject\*) ()  
> from /cvmfs/cms.cern.ch/slc6\_amd64\_gcc530/cms/cmssw-patch/CMSSW\_8\_0\_26\_patch1/external/slc6\_amd64\_gcc530/lib/libCore.so  
> #1 0x00007ffff734b65e in TPaveStats::~TPaveStats() ()  
> from /cvmfs/cms.cern.ch/slc6\_amd64\_gcc530/cms/cmssw-patch/CMSSW\_8\_0\_26\_patch1/external/slc6\_amd64\_gcc530/lib/libGraf.so  
> #2 0x00007ffff734b6c9 in TPaveStats::~TPaveStats() ()  
> from /cvmfs/cms.cern.ch/slc6\_amd64\_gcc530/cms/cmssw-patch/CMSSW\_8\_0\_26\_patch1/external/slc6\_amd64\_gcc530/lib/libGraf.so  
> #3 0x00007ffff75c3df7 in TH1::~TH1() ()  
> from /cvmfs/cms.cern.ch/slc6\_amd64\_gcc530/cms/cmssw-patch/CMSSW\_8\_0\_26\_patch1/external/slc6\_amd64\_gcc530/lib/libHist.so  
> #4 0x00007ffff764ba69 in TH2F::~TH2F() ()  
> from /cvmfs/cms.cern.ch/slc6\_amd64\_gcc530/cms/cmssw-patch/CMSSW\_8\_0\_26\_patch1/external/slc6\_amd64\_gcc530/lib/libHist.so  
> #5 0x00007ffff7c56b15 in TList::Delete(char const\*) ()  
> from /cvmfs/cms.cern.ch/slc6\_amd64\_gcc530/cms/cmssw-patch/CMSSW\_8\_0\_26\_patch1/external/slc6\_amd64\_gcc530/lib/libCore.so  
> #6 0x00007ffff783f145 in TDirectoryFile::Close(char const\*) ()  
> from /cvmfs/cms.cern.ch/slc6\_amd64\_gcc530/cms/cmssw-patch/CMSSW\_8\_0\_26\_patch1/external/slc6\_amd64\_gcc530/lib/libRIO.so  
> #7 0x00007ffff7971352 in TFile::Close(char const\*) ()

Debugging with gdb or valgrind does not indicate any issues. Any suggestions how to find the bug?

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [July 14, 2018, 4:41pm UTC](https://root-forum.cern.ch/t/crash-involving-tfile-close/29790/2 "2018-07-14T16:41:42Z")

</div>

Try with the [AddressSanitizer](https://root-forum.cern.ch/t/addresssanitizer-memory-error-detector/21046).

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [July 28, 2018, 4:41pm UTC](https://root-forum.cern.ch/t/crash-involving-tfile-close/29790/3 "2018-07-28T16:41:43Z")

</div>

Closed on July 28, 2018, 4:41pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
