Trunk: Segfault when compiling with cling

Hi,

I’m running OSX 10.8 on a “retina” Mac and had some problems with the cursor being offset from the GUI when using the Cocoa interface. Because of that I tried the trunk version, and was glad to see the issue fixed.
Later I discovered that it hadn’t compiled PyROOT which I needed as well… So after enabling cling to allow for PyROOT (funny dependency) I could compile ROOT with PyROOT. Now it compiled but ROOT segfaults:

[code]root hist-data12_8TeV.periodA.Muons.root

*** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:

Thread 5 (process 74773):
#0 0x00007fff96aaa122 in __psynch_mutexwait ()
#1 0x00007fff8e950d9d in pthread_mutex_lock ()
#2 0x00007fff8e27c28d in __cxa_guard_acquire ()
#3 0x00007fff90a34016 in _LSCopyApplicationInformationItemFromSharedMemory ()
#4 0x00007fff90a33f80 in _LSCopyApplicationInformationItem ()
#5 0x00007fff8bb34cce in __105-[NSApplication(NSPersistentUISupport) _disableRelaunchOnLoginIfNotLaunchedByLaunchServicesOrBlacklisted]_block_invoke_0 ()
#6 0x00007fff96a2ff01 in _dispatch_call_block_and_release ()
#7 0x00007fff96a2c0b6 in _dispatch_client_callout ()
#8 0x00007fff96a2d1fa in _dispatch_worker_thread2 ()
#9 0x00007fff8e94dcab in _pthread_wqthread ()
#10 0x00007fff8e938171 in start_wqthread ()

Thread 4 (process 74773):
#0 0x00007fff96aaa6d6 in __workq_kernreturn ()
#1 0x00007fff8e94deec in _pthread_workq_return ()
#2 0x00007fff8e94dcb3 in _pthread_wqthread ()
#3 0x00007fff8e938171 in start_wqthread ()

Thread 3 (process 74773):
#0 0x00007fff96aaad16 in kevent ()
#1 0x00007fff96a2edea in _dispatch_mgr_invoke ()
#2 0x00007fff96a2e9ee in _dispatch_mgr_thread ()

Thread 2 (process 74773):
#0 0x00007fff96aaa6d6 in __workq_kernreturn ()
#1 0x00007fff8e94deec in _pthread_workq_return ()
#2 0x00007fff8e94dcb3 in _pthread_wqthread ()
#3 0x00007fff8e938171 in start_wqthread ()

Thread 1 (process 74773):
#0 0x00007fff96aaa6ac in wait4 ()
#1 0x00007fff8e9d603a in system ()
#2 0x0000000109f9152f in TUnixSystem::StackTrace ()
#3 0x0000000109f8f377 in TUnixSystem::DispatchSignals ()
#4
#5 0x000000010ac30136 in PrintStack ()
#6 0x000000010ac2ffab in CrashHandler ()
#7 0x000000010ac33109 in SignalHandler ()
#8
#9 0x0000000109fc89a2 in cling::ExecutionContext::InitializeBuilder ()
#10 0x0000000109fc938e in cling::ExecutionContext::runStaticInitializersOnce ()
#11 0x0000000109fca5f5 in cling::IncrementalParser::commitCurrentTransaction ()
#12 0x0000000109fca734 in cling::IncrementalParser::Compile ()
#13 0x0000000109fcb705 in cling::Interpreter::Interpreter ()
#14 0x0000000109f475ef in TCintWithCling::TCintWithCling ()
#15 0x0000000109eec8d0 in TROOT::TROOT ()
#16 0x0000000109eec2dc in ROOT::GetROOT ()
#17 0x0000000109ef2091 in global constructors keyed to a ()
#18 0x00007fff6973d378 in __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE ()
#19 0x00007fff6973d762 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE ()
#20 0x00007fff6973a06e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#21 0x00007fff69739fc4 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#22 0x00007fff69739eba in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE ()
#23 0x00007fff6972bfc0 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#24 0x00007fff6972fb04 in __dyld__ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_Pm ()
#25 0x00007fff6972b397 in __dyld__ZN13dyldbootstrap5startEPK12macho_headeriPPKclS2_Pm ()
#26 0x00007fff6972b05e in __dyld__dyld_start ()

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug 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.

#9 0x0000000109fc89a2 in cling::ExecutionContext::InitializeBuilder ()
#10 0x0000000109fc938e in cling::ExecutionContext::runStaticInitializersOnce ()
#11 0x0000000109fca5f5 in cling::IncrementalParser::commitCurrentTransaction ()
#12 0x0000000109fca734 in cling::IncrementalParser::Compile ()
#13 0x0000000109fcb705 in cling::Interpreter::Interpreter ()
#14 0x0000000109f475ef in TCintWithCling::TCintWithCling ()
#15 0x0000000109eec8d0 in TROOT::TROOT ()
#16 0x0000000109eec2dc in ROOT::GetROOT ()
#17 0x0000000109ef2091 in global constructors keyed to a ()
#18 0x00007fff6973d378 in __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE ()
#19 0x00007fff6973d762 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE ()
#20 0x00007fff6973a06e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#21 0x00007fff69739fc4 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#22 0x00007fff69739eba in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE ()
#23 0x00007fff6972bfc0 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#24 0x00007fff6972fb04 in __dyld__ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_Pm ()
#25 0x00007fff6972b397 in __dyld__ZN13dyldbootstrap5startEPK12macho_headeriPPKclS2_Pm ()
#26 0x00007fff6972b05e in __dyld__dyld_start ()

[/code]

And in python as well:

[code]python
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

import ROOT

*** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:

Thread 4 (process 74995):
#0 0x00007fff96aaa122 in __psynch_mutexwait ()
#1 0x00007fff8e950d9d in pthread_mutex_lock ()
#2 0x00007fff8e27c28d in __cxa_guard_acquire ()
#3 0x00007fff90a34016 in _LSCopyApplicationInformationItemFromSharedMemory ()
#4 0x00007fff90a33f80 in _LSCopyApplicationInformationItem ()
#5 0x00007fff8bb34cce in __105-[NSApplication(NSPersistentUISupport) _disableRelaunchOnLoginIfNotLaunchedByLaunchServicesOrBlacklisted]_block_invoke_0 ()
#6 0x00007fff96a2ff01 in _dispatch_call_block_and_release ()
#7 0x00007fff96a2c0b6 in _dispatch_client_callout ()
#8 0x00007fff96a2d1fa in _dispatch_worker_thread2 ()
#9 0x00007fff8e94dcab in _pthread_wqthread ()
#10 0x00007fff8e938171 in start_wqthread ()

Thread 3 (process 74995):
#0 0x00007fff96aaad16 in kevent ()
#1 0x00007fff96a2edea in _dispatch_mgr_invoke ()
#2 0x00007fff96a2e9ee in _dispatch_mgr_thread ()

Thread 2 (process 74995):
#0 0x00007fff96aaa6d6 in __workq_kernreturn ()
#1 0x00007fff8e94deec in _pthread_workq_return ()
#2 0x00007fff8e94dcb3 in _pthread_wqthread ()
#3 0x00007fff8e938171 in start_wqthread ()

Thread 1 (process 74995):
#0 0x00007fff96aaa6ac in wait4 ()
#1 0x00007fff8e9d603a in system ()
#2 0x000000010815a52f in TUnixSystem::StackTrace ()
#3 0x0000000108158377 in TUnixSystem::DispatchSignals ()
#4
#5 0x0000000108df9136 in PrintStack ()
#6 0x0000000108df8fab in CrashHandler ()
#7 0x0000000108dfc109 in SignalHandler ()
#8
#9 0x00000001081919a2 in cling::ExecutionContext::InitializeBuilder ()
#10 0x000000010819238e in cling::ExecutionContext::runStaticInitializersOnce ()
#11 0x00000001081935f5 in cling::IncrementalParser::commitCurrentTransaction ()
#12 0x0000000108193734 in cling::IncrementalParser::Compile ()
#13 0x0000000108194705 in cling::Interpreter::Interpreter ()
#14 0x00000001081105ef in TCintWithCling::TCintWithCling ()
#15 0x00000001080b58d0 in TROOT::TROOT ()
#16 0x00000001080b52dc in ROOT::GetROOT ()
#17 0x00000001080bb091 in global constructors keyed to a ()
#18 0x00007fff66ebb378 in __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE ()
#19 0x00007fff66ebb762 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE ()
#20 0x00007fff66eb806e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#21 0x00007fff66eb7fc4 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#22 0x00007fff66eb7fc4 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#23 0x00007fff66eb7fc4 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#24 0x00007fff66eb7eba in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE ()
#25 0x00007fff66eace38 in __dyld__ZN4dyld15runInitializersEP11ImageLoader ()
#26 0x00007fff66eb287c in __dyld_dlopen ()
#27 0x00007fff8f895dd8 in dlopen ()
#28 0x000000010731bb57 in _PyImport_GetDynLoadFunc ()
#29 0x00000001072f2dc3 in _PyImport_LoadDynamicModule ()
#30 0x00000001072eeaf2 in PyImport_AppendInittab ()
#31 0x00000001072ee644 in PyImport_AppendInittab ()
#32 0x00000001072ec7db in PyImport_ImportModuleLevel ()
#33 0x00000001072bdb1e in _PyBuiltin_Init ()
#34 0x00000001072bc6c6 in PyObject_Call ()
#35 0x00000001072ca018 in PyEval_CallObjectWithKeywords ()
#36 0x00000001072c7f70 in PyEval_EvalFrameEx ()
#37 0x00000001072c4147 in PyEval_EvalCodeEx ()
#38 0x00000001072c39b3 in PyEval_EvalCode ()
#39 0x00000001072eb304 in PyImport_ExecCodeModuleEx ()
#40 0x00000001072ee035 in PyImport_AppendInittab ()
#41 0x00000001072eeaf2 in PyImport_AppendInittab ()
#42 0x00000001072ee644 in PyImport_AppendInittab ()
#43 0x00000001072ec7db in PyImport_ImportModuleLevel ()
#44 0x00000001072bdb1e in _PyBuiltin_Init ()
#45 0x00000001072bc6c6 in PyObject_Call ()
#46 0x00000001072ca018 in PyEval_CallObjectWithKeywords ()
#47 0x00000001072c7f70 in PyEval_EvalFrameEx ()
#48 0x00000001072c4147 in PyEval_EvalCodeEx ()
#49 0x00000001072c39b3 in PyEval_EvalCode ()
#50 0x00000001072ffc70 in PyParser_ASTFromFile ()
#51 0x00000001072ffae9 in PyRun_InteractiveOneFlags ()
#52 0x00000001072ff578 in PyRun_InteractiveLoopFlags ()
#53 0x00000001072ff414 in PyRun_AnyFileExFlags ()
#54 0x0000000107323e27 in Py_Main ()
#55 0x00007fff8f8967e1 in start ()

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug 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.

#9 0x00000001081919a2 in cling::ExecutionContext::InitializeBuilder ()
#10 0x000000010819238e in cling::ExecutionContext::runStaticInitializersOnce ()
#11 0x00000001081935f5 in cling::IncrementalParser::commitCurrentTransaction ()
#12 0x0000000108193734 in cling::IncrementalParser::Compile ()
#13 0x0000000108194705 in cling::Interpreter::Interpreter ()
#14 0x00000001081105ef in TCintWithCling::TCintWithCling ()
#15 0x00000001080b58d0 in TROOT::TROOT ()
#16 0x00000001080b52dc in ROOT::GetROOT ()
#17 0x00000001080bb091 in global constructors keyed to a ()
#18 0x00007fff66ebb378 in __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE ()
#19 0x00007fff66ebb762 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE ()
#20 0x00007fff66eb806e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#21 0x00007fff66eb7fc4 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#22 0x00007fff66eb7fc4 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#23 0x00007fff66eb7fc4 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#24 0x00007fff66eb7eba in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE ()
#25 0x00007fff66eace38 in __dyld__ZN4dyld15runInitializersEP11ImageLoader ()
#26 0x00007fff66eb287c in __dyld_dlopen ()
#27 0x00007fff8f895dd8 in dlopen ()
#28 0x000000010731bb57 in _PyImport_GetDynLoadFunc ()
#29 0x00000001072f2dc3 in _PyImport_LoadDynamicModule ()
#30 0x00000001072eeaf2 in PyImport_AppendInittab ()
#31 0x00000001072ee644 in PyImport_AppendInittab ()
#32 0x00000001072ec7db in PyImport_ImportModuleLevel ()
#33 0x00000001072bdb1e in _PyBuiltin_Init ()
#34 0x00000001072bc6c6 in PyObject_Call ()
#35 0x00000001072ca018 in PyEval_CallObjectWithKeywords ()
#36 0x00000001072c7f70 in PyEval_EvalFrameEx ()
#37 0x00000001072c4147 in PyEval_EvalCodeEx ()
#38 0x00000001072c39b3 in PyEval_EvalCode ()
#39 0x00000001072eb304 in PyImport_ExecCodeModuleEx ()
#40 0x00000001072ee035 in PyImport_AppendInittab ()
#41 0x00000001072eeaf2 in PyImport_AppendInittab ()
#42 0x00000001072ee644 in PyImport_AppendInittab ()
#43 0x00000001072ec7db in PyImport_ImportModuleLevel ()
#44 0x00000001072bdb1e in _PyBuiltin_Init ()
#45 0x00000001072bc6c6 in PyObject_Call ()
#46 0x00000001072ca018 in PyEval_CallObjectWithKeywords ()
#47 0x00000001072c7f70 in PyEval_EvalFrameEx ()
#48 0x00000001072c4147 in PyEval_EvalCodeEx ()
#49 0x00000001072c39b3 in PyEval_EvalCode ()
#50 0x00000001072ffc70 in PyParser_ASTFromFile ()
#51 0x00000001072ffae9 in PyRun_InteractiveOneFlags ()
#52 0x00000001072ff578 in PyRun_InteractiveLoopFlags ()
#53 0x00000001072ff414 in PyRun_AnyFileExFlags ()
#54 0x0000000107323e27 in Py_Main ()
#55 0x00007fff8f8967e1 in start ()

[/code]

Any suggestions? and is this the right place to report issues with svn-trunk anyway…

Thanks!
Morten

Morten,

PyROOT in trunk is on its way to become PyCling and is currently not in a usable shape. If you really need PyROOT and trunk, copy over the bindings/pyroot directory from v5-34-00-patches.

Cheers,
Wim

[quote=“wlav”]Morten,
PyROOT in trunk is on its way to become PyCling and is currently not in a usable shape.
[/quote]

Hi Wim.

Thank you for the explanation, I didn’t realise it was a construction site I stepped into, I’ll just use an older version for PyROOT and look forward to V6.00.00 and LLVM-Nirvana in the future :slight_smile: