TMapFile crashes with ROOT Version 6.06.08

Dear roottalk wizard,
I have seen this post with root 6.04, where there was a claim it may work in 6.6.8. It doesn’t for me. The same happens with root.exe and rootn.exe. Things worked with root 5.34

[code] root [0] mfile =TMapFile::Create(“mmap.histo”);
Error in TMapFile::TMapFile: no memory mapped file capability available
Use rootn.exe or link application against “-lNew”

[/code]
the file, where I had my histograms doesn’t work anymore. Any chance to get it running? Thank you

Hi,

I think you’re talking about ROOT v6.08.00 (there is no 6.6.8 )… Did you try it?

Cheers, Bertrand.

Thank you very much for the care.
I had for some reason root_v6.06.08.source.tar.gz, now I see it is Old and 6.08 is there. I compiled it today. And I run rootn.exe. I have a file from the past…5.34

root [0]   mfile =TMapFile::Create("mmap.histo"); 
Error in <TMapFile::TMapFile>: no memory mapped file capability available
Use rootn.exe or link application against "-lNew"
root [1] mfile
(TMapFile *) 0x537d050
root [4] mfile->Print()
Memory mapped file:   mmap.histo
Title:                
Option:               file closed
root [5] mfile->Get("b0ch0")
(TObject *) nullptr
root [6] .q

Should I try something else? THanks.

Hi,

This is indeed currently broken on v6, we still need to port libNew to v6.

Cheers,
Philippe.

Ok, thank you for the message, good luck to those who are porting that. Very nice thing, not only I can simply look into actual histograms with other code, send messages to processes from wherever, but I want also to use it to have saved histograms in case of a crash. The earlier it is, the happier I am. Thanks to all.

Hi,

This problem is finally resolved in the master and the v6.08 patch branch (so in v6.10/00 and v6.08/06.

Our apologies for the long delay and thanks for your patience.

Cheers,
Philippe.

1 Like

Dear Philippe,
I just finished compilation of root 6.08.06. It seems ok, but to test TMapFile - using root I do this as previously

root [0]  mfile =TMapFile::Create("mmap.histo"); 
Error in <TMapFile::TMapFile>: no memory mapped file capability available
Use rootn.exe or link application against "-lNew"

and when I run rootn.exe:
rootn.exe Fatal in <operator delete>: storage area overwritten aborting

I think I remember using rootn.exe in the past with root5. I can also have a problem in compilation, but no idea, the root.exe seems to work fine…
Thank you for an advice

Edit: I tried gSystem->Load("libNew") and gSystem->Load("libNew.so") with normal root.exe but it wants rootn.exe anyway.

Hi,

Unfortunately the fix did not actually make it into v6.08/06. It is now really in the patch branch and thus will be part of v6.08/08.

Sorry for the confusion and delay.

Philippe.

1 Like

Just now I have verified, it works with 6.09.02 version. The TMapFile. Good job, thanks, keep it like this. Jar.

Hi
The compiled version of any program with the -lNew crash
the compile command is

g++  -o $1  $1.cpp -std=c++11 `root-config  --new --cflags --glibs`

where $1 is the arg to the compile script.
Using rootn.exe file the program don’t crash
The dump is

*** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f37dbad8dbc in waitpid () from /lib64/libc.so.6
#1  0x00007f37dba5bcc2 in do_system () from /lib64/libc.so.6
#2  0x00007f37e0035b7f in TUnixSystem::StackTrace (this=0x1a7d9c8) at /home/daq/Daq/Work/rootsh/root-v6-08/core/unix/src/TUnixSystem.cxx:2412
#3  0x00007f37e00382ac in TUnixSystem::DispatchSignals (this=0x1a7d9c8, sig=kSigSegmentationViolation) at /home/daq/Daq/Work/rootsh/root-v6-08/core/unix/src/TUnixSystem.cxx:3643
#4  <signal handler called>
#5  0x00007f37dbb50f5b in __strstr_sse42 () from /lib64/libc.so.6
#6  0x00007f37d63816fb in strstr (__needle=0x7f37d7fda754 "_ACLiC_dict", __haystack=0x0) at /usr/include/string.h:333
#7  TCling::RegisterModule (this=0x1b00628, modulename=0x0, headers=0x0, includePaths=0x0, payloadCode=0x0, fwdDeclsCode=0x0, triggerFunc=0x0, fwdDeclsArgToSkip=std::vector of length 0, capacity 0, classesHeaders=0x0, lateRegistration=true, hasCxxModule=false) at /home/daq/Daq/Work/rootsh/root-v6-08/core/metacling/src/TCling.cxx:1689
#8  0x00007f37dfea3512 in TROOT::InitInterpreter (this=0x7f37e0364f80 <ROOT::Internal::GetROOT1()::alloc>) at /home/daq/Daq/Work/rootsh/root-v6-08/core/base/src/TROOT.cxx:2075
#9  0x00007f37dfea38c6 in ROOT::Internal::GetROOT2 () at /home/daq/Daq/Work/rootsh/root-v6-08/core/base/src/TROOT.cxx:388
#10 0x00007f37df7892c2 in TMapFile::WhichMapFile (addr=addr
entry=0x1abba70) at /home/daq/Daq/Work/rootsh/root-v6-08/io/io/src/TMapFile.cxx:1229
#11 0x00007f37df78941e in (anonymous namespace)::FreeIfTMapFile (ptr=0x1abba70) at /home/daq/Daq/Work/rootsh/root-v6-08/io/io/src/TMapFile.cxx:135
#12 0x00007f37dc81c125 in operator delete (ptr=0x1abba78) at /home/daq/Daq/Work/rootsh/root-v6-08/core/newdelete/src/NewDelete.cxx:283
#13 0x00007f37dfea8404 in deallocate (this=0x7f37e0364e90 <(anonymous namespace)::GetModuleHeaderInfoBuffer()::moduleHeaderInfoBuffer>, __p=<optimized out>) at /usr/include/c++/4.8.2/ext/new_allocator.h:110
#14 _M_deallocate (this=0x7f37e0364e90 <(anonymous namespace)::GetModuleHeaderInfoBuffer()::moduleHeaderInfoBuffer>, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/4.8.2/bits/stl_vector.h:174
#15 _M_emplace_back_aux<(anonymous namespace)::ModuleHeaderInfo_t> (this=0x7f37e0364e90 <(anonymous namespace)::GetModuleHeaderInfoBuffer()::moduleHeaderInfoBuffer>) at /usr/include/c++/4.8.2/bits/vector.tcc:430
#16 emplace_back<(anonymous namespace)::ModuleHeaderInfo_t> (this=0x7f37e0364e90 <(anonymous namespace)::GetModuleHeaderInfoBuffer()::moduleHeaderInfoBuffer>) at /usr/include/c++/4.8.2/bits/vector.tcc:101
#17 push_back (__x=<unknown type in /home/daq/root6/lib/libCore.so, CU 0x0, DIE 0x1adca>, this=0x7f37e0364e90 <(anonymous namespace)::GetModuleHeaderInfoBuffer()::moduleHeaderInfoBuffer>) at /usr/include/c++/4.8.2/bits/stl_vector.h:920
#18 TROOT::RegisterModule (modulename=modulename
entry=0x7f37df41a79a "libNet", headers=headers
entry=0x7f37df645400 <(anonymous namespace)::TriggerDictionaryInitialization_libNet_Impl()::headers>, includePaths=includePaths
entry=0x7f37df6453e0 <(anonymous namespace)::TriggerDictionaryInitialization_libNet_Impl()::includePaths>, payloadCode=payloadCode
entry=0x7f37df41a7d0 "\n#line 1 \"libNet dictionary payload\"\n\n#ifndef G__VECTOR_HAS_CLASS_ITERATOR\n  #define G__VECTOR_HAS_CLASS_ITERATOR 1\n#endif\n#ifndef R__SSL\n  #define R__SSL 1\n#endif\n\n#define _BACKWARD_BACKWARD_WARNING_"..., fwdDeclCode=fwdDeclCode
entry=0x0, triggerFunc=triggerFunc
entry=0x7f37df3df940 <(anonymous namespace)::TriggerDictionaryInitialization_libNet_Impl()>, fwdDeclsArgToSkip=std::vector of length 0, capacity 0, classesHeaders=classesHeaders
entry=0x7f37df645800 <(anonymous namespace)::TriggerDictionaryInitialization_libNet_Impl()::classesHeaders>, hasCxxModule=hasCxxModule
entry=false) at /home/daq/Daq/Work/rootsh/root-v6-08/core/base/src/TROOT.cxx:2552
#19 0x00007f37df3df9bd in (anonymous namespace)::TriggerDictionaryInitialization_libNet_Impl () at /home/daq/Daq/Work/rootsh/root-v6-08/build/net/net/G__Net.cxx:3708
#20 0x00007f37e09da4c3 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#21 0x00007f37e09cc1aa in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#22 0x0000000000000001 in ?? ()
#23 0x00007ffec4b40f5e in ?? ()
#24 0x0000000000000000 in ?? ()
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum.
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5  0x00007f37dbb50f5b in __strstr_sse42 () from /lib64/libc.so.6
#6  0x00007f37d63816fb in strstr (__needle=0x7f37d7fda754 "_ACLiC_dict", __haystack=0x0) at /usr/include/string.h:333
#7  TCling::RegisterModule (this=0x1b00628, modulename=0x0, headers=0x0, includePaths=0x0, payloadCode=0x0, fwdDeclsCode=0x0, triggerFunc=0x0, fwdDeclsArgToSkip=std::vector of length 0, capacity 0, classesHeaders=0x0, lateRegistration=true, hasCxxModule=false) at /home/daq/Daq/Work/rootsh/root-v6-08/core/metacling/src/TCling.cxx:1689
#8  0x00007f37dfea3512 in TROOT::InitInterpreter (this=0x7f37e0364f80 <ROOT::Internal::GetROOT1()::alloc>) at /home/daq/Daq/Work/rootsh/root-v6-08/core/base/src/TROOT.cxx:2075
#9  0x00007f37dfea38c6 in ROOT::Internal::GetROOT2 () at /home/daq/Daq/Work/rootsh/root-v6-08/core/base/src/TROOT.cxx:388
#10 0x00007f37df7892c2 in TMapFile::WhichMapFile (addr=addr
entry=0x1abba70) at /home/daq/Daq/Work/rootsh/root-v6-08/io/io/src/TMapFile.cxx:1229
#11 0x00007f37df78941e in (anonymous namespace)::FreeIfTMapFile (ptr=0x1abba70) at /home/daq/Daq/Work/rootsh/root-v6-08/io/io/src/TMapFile.cxx:135
#12 0x00007f37dc81c125 in operator delete (ptr=0x1abba78) at /home/daq/Daq/Work/rootsh/root-v6-08/core/newdelete/src/NewDelete.cxx:283
#13 0x00007f37dfea8404 in deallocate (this=0x7f37e0364e90 <(anonymous namespace)::GetModuleHeaderInfoBuffer()::moduleHeaderInfoBuffer>, __p=<optimized out>) at /usr/include/c++/4.8.2/ext/new_allocator.h:110
#14 _M_deallocate (this=0x7f37e0364e90 <(anonymous namespace)::GetModuleHeaderInfoBuffer()::moduleHeaderInfoBuffer>, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/4.8.2/bits/stl_vector.h:174
#15 _M_emplace_back_aux<(anonymous namespace)::ModuleHeaderInfo_t> (this=0x7f37e0364e90 <(anonymous namespace)::GetModuleHeaderInfoBuffer()::moduleHeaderInfoBuffer>) at /usr/include/c++/4.8.2/bits/vector.tcc:430
#16 emplace_back<(anonymous namespace)::ModuleHeaderInfo_t> (this=0x7f37e0364e90 <(anonymous namespace)::GetModuleHeaderInfoBuffer()::moduleHeaderInfoBuffer>) at /usr/include/c++/4.8.2/bits/vector.tcc:101
#17 push_back (__x=<unknown type in /home/daq/root6/lib/libCore.so, CU 0x0, DIE 0x1adca>, this=0x7f37e0364e90 <(anonymous namespace)::GetModuleHeaderInfoBuffer()::moduleHeaderInfoBuffer>) at /usr/include/c++/4.8.2/bits/stl_vector.h:920
#18 TROOT::RegisterModule (modulename=modulename
entry=0x7f37df41a79a "libNet", headers=headers
entry=0x7f37df645400 <(anonymous namespace)::TriggerDictionaryInitialization_libNet_Impl()::headers>, includePaths=includePaths
entry=0x7f37df6453e0 <(anonymous namespace)::TriggerDictionaryInitialization_libNet_Impl()::includePaths>, payloadCode=payloadCode
entry=0x7f37df41a7d0 "n#line 1 "libNet dictionary payload"nn#ifndef G__VECTOR_HAS_CLASS_ITERATORn  #define G__VECTOR_HAS_CLASS_ITERATOR 1n#endifn#ifndef R__SSLn  #define R__SSL 1n#endifnn#define _BACKWARD_BACKWARD_WARNING_"..., fwdDeclCode=fwdDeclCode
entry=0x0, triggerFunc=triggerFunc
entry=0x7f37df3df940 <(anonymous namespace)::TriggerDictionaryInitialization_libNet_Impl()>, fwdDeclsArgToSkip=std::vector of length 0, capacity 0, classesHeaders=classesHeaders
entry=0x7f37df645800 <(anonymous namespace)::TriggerDictionaryInitialization_libNet_Impl()::classesHeaders>, hasCxxModule=hasCxxModule
entry=false) at /home/daq/Daq/Work/rootsh/root-v6-08/core/base/src/TROOT.cxx:2552
#19 0x00007f37df3df9bd in (anonymous namespace)::TriggerDictionaryInitialization_libNet_Impl () at /home/daq/Daq/Work/rootsh/root-v6-08/build/net/net/G__Net.cxx:3708
#20 0x00007f37e09da4c3 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#21 0x00007f37e09cc1aa in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#22 0x0000000000000001 in ?? ()
#23 0x00007ffec4b40f5e in ?? ()
#24 0x0000000000000000 in ?? ()
===========================================================


Fatal in <operator delete>: storage area overwritten
aborting
Aborted (core dumped)

I have tested with different 6.0x x>= 6.08 patched and not installation of root without success
Any idea?
Thanks
Federico