Bug #16042

Updated by Kyle Knoepfel over 3 years ago

Dear art experts,

while debugging the code, I , and independently, one of my Mu2e colleagues noticed that, unlike art v1,
an art v2-based executable (mu2e) in the very beginning throws an exception, successfully handles it,
and continues. Exception happens before the user code gets executed somewhere in the art internals and
as far as I can tell, it happens for any input .fcl file.

I wonder if this feature is known/needed.

From the user prospective, when encountered for the first time during the debugging session,
this feature is rather confusing: gdb intercepts the exception, and one immediately starts
thinking of a bug in his code. Less experienced people just do not know how to proceed
with the debugging. However, a simple gdb 'continue' helps, so I don't think it is a high
priority issue.

Below is an example of how one can reproduce the issue in the Mu2e environment using
the git head or any of the last tags of the Mu2e offline code.

It would be great if experts could look at it.

-thanks, Pasha

GNU gdb (GDB) 7.12
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) file mu2e
Reading symbols from mu2e...done.
(gdb) set args -c Analyses/test/genReco.fcl -n 10
(gdb) catch throw
Catchpoint 1 (throw)
(gdb) r
Starting program: /cvmfs/ -c Analyses/test/genReco.fcl -n 10
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/".

Catchpoint 1 (exception thrown), __cxxabiv1::__cxa_throw (obj=0x603210, tinfo=0x7fffecfa0840 <typeinfo for int>, dest=0x0) at ../../.././libstdc++-v3/libsupc++/
62 ../../.././libstdc++-v3/libsupc++/ No such file or directory.
(gdb) where
#0 __cxxabiv1::__cxa_throw (obj=0x603210, tinfo=0x7fffecfa0840 <typeinfo for int>, dest=0x0) at ../../.././libstdc++-v3/libsupc++/
#1 0x00007fffedccffeb in tbb::internal::gcc_rethrow_exception_broken () at ../../src/tbb/tbb_misc.cpp:188
#2 0x00007fffedcd4208 in tbb::internal::governor::acquire_resources () at ../../src/tbb/governor.cpp:80
#3 0x00007fffedceb196 in tbb::internal::__TBB_InitOnce::add_ref () at ../../src/tbb/tbb_main.cpp:126
#4 0x00007fffedceb9eb in tbb::internal::__TBB_InitOnce::__TBB_InitOnce (this=0x7fffedf17282 <tbb::internal::__TBB_InitOnceHiddenInstance>) at ../../src/tbb/tbb_main.h:71
#5 0x00007fffedceb95f in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at ../../src/tbb/tbb_main.cpp:75
#6 0x00007fffedceb9a9 in _GLOBAL__sub_I_tbb_main.cpp(void) () at ../../src/tbb/tbb_main.cpp:567
#7 0x00007fffedceee86 in __do_global_ctors_aux () from /cvmfs/
#8 0x00007fffedcb4fbb in _init () from /cvmfs/
#9 0x00007fffeccab518 in ?? ()
#10 0x000000333540e705 in _dl_init_internal () from /lib64/
#11 0x0000003335400b3a in _dl_start_user () from /lib64/
#12 0x0000000000000005 in ?? ()
#13 0x00007fffffff7a28 in ?? ()
#14 0x00007fffffff7a82 in ?? ()
#15 0x00007fffffff7a85 in ?? ()
#16 0x00007fffffff7a9f in ?? ()
#17 0x00007fffffff7aa2 in ?? ()
#18 0x0000000000000000 in ?? ()
(gdb) q
A debugging session is active.

Inferior 1 [process 30974] will be killed.

Quit anyway? (y or n) y