Incorrectly handled TFile::Open() results in Seg Fault

Hi,

I’ve been struggling with this for a while now on 6.06.06. I have come to the conclusion that it’s a bug in ROOT somewhere. It seems to present itself when ROOT wants to clean its memory and exit, but instead finds that the object is not there. Here’s and example with Valgrind running on top:

root [0] TFile * test = TFile::Open("root://eoslhcb.cern.ch//eos/lhcb/user/k/kgizdov/data/tuples.root")
(TFile *) 0x3466bf0
root [1] test->Close()
root [2] .q

 *** Break *** segmentation violation
==4006== 
==4006== HEAP SUMMARY:
==4006==     in use at exit: 101,598 bytes in 300 blocks
==4006==   total heap usage: 2,164 allocs, 1,864 frees, 1,381,412 bytes allocated
==4006== 
==4006== Searching for pointers to 300 not-freed blocks
==4006== Checked 220,016 bytes
==4006== 
==4006== LEAK SUMMARY:
==4006==    definitely lost: 16 bytes in 1 blocks
==4006==    indirectly lost: 176 bytes in 4 blocks
==4006==      possibly lost: 0 bytes in 0 blocks
==4006==    still reachable: 101,406 bytes in 295 blocks
==4006==         suppressed: 0 bytes in 0 blocks
==4006== Rerun with --leak-check=full to see details of leaked memory
==4006== 
==4006== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==4006== 
==4006== 1 errors in context 1 of 1:
==4006== Syscall param writev(vector[...]) points to uninitialised byte(s)
==4006==    at 0x5E37B60: __writev_nocancel (in /usr/lib/libc-2.24.so)
==4006==    by 0x6101BAC: ??? (in /usr/lib/libxcb.so.1.1.0)
==4006==    by 0x6101FAC: ??? (in /usr/lib/libxcb.so.1.1.0)
==4006==    by 0x610202C: xcb_writev (in /usr/lib/libxcb.so.1.1.0)
==4006==    by 0x4E7718D: _XSend (in /usr/lib/libX11.so.6.3.0)
==4006==    by 0x4E6C50C: XPutImage (in /usr/lib/libX11.so.6.3.0)
==4006==    by 0x538E465: xpmCreatePixmapFromImage (in /usr/lib/libXpm.so.4.11.0)
==4006==    by 0x538EDA4: XpmReadFileToPixmap (in /usr/lib/libXpm.so.4.11.0)
==4006==    by 0x403C7A: ROOT::ROOTX::LoadROOTSplashscreenPixmap(char const*, bool) (in /usr/bin/root)
==4006==    by 0x403A99: ROOT::ROOTX::CreateSplashscreenImageAndShapeMask() (in /usr/bin/root)
==4006==    by 0x404DF6: PopupLogo(bool) (in /usr/bin/root)
==4006==    by 0x403455: main (in /usr/bin/root)
==4006==  Address 0x6d9a16a is 74 bytes inside a block of size 32,148 alloc'd
==4006==    at 0x4C29BBE: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4006==    by 0x4E79B90: _XAllocScratch (in /usr/lib/libX11.so.6.3.0)
==4006==    by 0x4E6BC5F: ??? (in /usr/lib/libX11.so.6.3.0)
==4006==    by 0x4E6C50C: XPutImage (in /usr/lib/libX11.so.6.3.0)
==4006==    by 0x538E465: xpmCreatePixmapFromImage (in /usr/lib/libXpm.so.4.11.0)
==4006==    by 0x538EDA4: XpmReadFileToPixmap (in /usr/lib/libXpm.so.4.11.0)
==4006==    by 0x403C7A: ROOT::ROOTX::LoadROOTSplashscreenPixmap(char const*, bool) (in /usr/bin/root)
==4006==    by 0x403A99: ROOT::ROOTX::CreateSplashscreenImageAndShapeMask() (in /usr/bin/root)
==4006==    by 0x404DF6: PopupLogo(bool) (in /usr/bin/root)
==4006==    by 0x403455: main (in /usr/bin/root)
==4006==  Uninitialised value was created by a heap allocation
==4006==    at 0x4C29BBE: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4006==    by 0x538F9C7: ??? (in /usr/lib/libXpm.so.4.11.0)
==4006==    by 0x5392C43: xpmParseDataAndCreate (in /usr/lib/libXpm.so.4.11.0)
==4006==    by 0x538EBC2: XpmReadFileToImage (in /usr/lib/libXpm.so.4.11.0)
==4006==    by 0x538ED5F: XpmReadFileToPixmap (in /usr/lib/libXpm.so.4.11.0)
==4006==    by 0x403C7A: ROOT::ROOTX::LoadROOTSplashscreenPixmap(char const*, bool) (in /usr/bin/root)
==4006==    by 0x403A99: ROOT::ROOTX::CreateSplashscreenImageAndShapeMask() (in /usr/bin/root)
==4006==    by 0x404DF6: PopupLogo(bool) (in /usr/bin/root)
==4006==    by 0x403455: main (in /usr/bin/root)
==4006== 
==4006== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Could someone have a look?

Thanks

Dear kgizdov,

Can you specify the system/architecture where you get this?

G Ganis

Hi,

I get this on my laptop - Arch Linux x64, my office PC - Scientific Linux 7 x64, my office buddy’s laptop - Fedora 23 x64. Sometimes I even get it on LXPLUS.

Thanks.