[test] Untraceable Boost.Test framework internal error: unknown reason

Hi, I'm using Boost 1.37.0 (Ubuntu Jaunty). When I run my testcases, they seem to complete well, but just before the end of the program exit, I get this error from Boost UTF: Boost.Test framework internal error: unknown reason FATAL: exception not rethrown Aborted I spent an hour trying to figure out 1) how to find out where the exception was thrown and 2) if the exception catching in boost could be disabled such that a simple gdb backtrace could point me to it. I have the suspicion that one of the signal handlers that boost UTF installs gets triggered, but I also did not find any way to disable the boost signal handlers. I'm really out of options... Any help/hints (would upgrading boost help?) really appreciated. Peter

Peter Soetens <peter.soetens <at> gmail.com> writes:
Hi,
I'm using Boost 1.37.0 (Ubuntu Jaunty). When I run my testcases, they seem to complete well, but just before the end of the program exit, I get this error from Boost UTF:
Please show simple example. What compiler are you using? Did you try latest boost?
Boost.Test framework internal error: unknown reason FATAL: exception not rethrown Aborted
I spent an hour trying to figure out 1) how to find out where the exception was thrown and 2) if the exception catching in boost could be disabled such that a simple gdb backtrace could point me to it.
I have the suspicion that one of the signal handlers that boost UTF installs gets triggered, but I also did not find any way to disable the boost signal handlers.
I doubt Boost.Test handlers are the issue. You would get more meaningful error message in that case. But you can disable them with --catch_system_errors=no Gennadiy

On Tue, Jun 16, 2009 at 00:24, Gennadiy Rozental <rogeeff@gmail.com> wrote:
Peter Soetens <peter.soetens <at> gmail.com> writes:
Hi,
I'm using Boost 1.37.0 (Ubuntu Jaunty). When I run my testcases, they seem to complete well, but just before the end of the program exit, I get this error from Boost UTF:
Please show simple example.
It's no simple case since I only get this when I use the Xenomai real-time kernel. The point is that maybe Xenomai or the kernel is signalling my process, and that due to the (numerous) catch(...) statements in Boost.Test, these are caught by the library and not by my debugger. The exception may be thrown during the cleanup of a global fixture, in this code: struct InitOrocos { public: InitOrocos(){ } ~InitOrocos(){ __os_exit(); } // probably the cause of the exception (?) }; BOOST_GLOBAL_FIXTURE( InitOrocos ) boost::unit_test::test_suite* init_unit_test_suite(int argc, char** argv) { __os_init(argc, argv); // disable logging of errors or warnings if no ORO_LOGLEVEL was set. if ( log().getLogLevel() == Logger::Warning ) { log(Info) << "Lowering LogLevel to Critical." << endlog(); log().setLogLevel(Logger::Critical); } else { log(Info) << "LogLevel unaltered by test-runner." << endlog(); } // manually adding test suites test_suite* test = BOOST_TEST_SUITE("Name of test suite"); return test; }
What compiler are you using?
GCC 4.3.3 (Ubuntu Jaunty)
Did you try latest boost?
No, but I'd be really pleased if I had it working with 1.37, which is today common with Linux distributions. I'll try 1.39 as well.
Boost.Test framework internal error: unknown reason FATAL: exception not rethrown Aborted
I spent an hour trying to figure out 1) how to find out where the exception was thrown and 2) if the exception catching in boost could be disabled such that a simple gdb backtrace could point me to it.
I have the suspicion that one of the signal handlers that boost UTF installs gets triggered, but I also did not find any way to disable the boost signal handlers.
I doubt Boost.Test handlers are the issue. You would get more meaningful error message in that case. But you can disable them with --catch_system_errors=no
This flag has no effect whatsoever. Peter

On Tue, Jun 16, 2009 at 00:24, Gennadiy Rozental <rogeeff@gmail.com> wrote:
Peter Soetens <peter.soetens <at> gmail.com> writes:
Hi,
I'm using Boost 1.37.0 (Ubuntu Jaunty). When I run my testcases, they seem to complete well, but just before the end of the program exit, I get this error from Boost UTF:
Please show simple example.
I have the same behavior in 1.39 For completeness, this is the backtrace when running in gdb: (gdb) run --log_level=all --catch_system_errors=no ... Leaving test suite "Name of test suite" Leaving test suite "Master Test Suite" 0.002 [ Debug ][Logger] Stopping StartStopManager. 0.002 [ Debug ][Logger] Stopping MainThread. 0.002 [ Info ][Logger] Orocos Logging Deactivated. [New Thread 0x7f7e29c39700 (LWP 6939)] Boost.Test framework internal error: unknown reason FATAL: exception not rethrown Program received signal SIGABRT, Aborted. [Switching to Thread 0x7f7e29c39700 (LWP 6939)] 0x00007f7e280d7fb5 in raise () from /lib/libc.so.6 (gdb) bt #0 0x00007f7e280d7fb5 in raise () from /lib/libc.so.6 #1 0x00007f7e280d9bc3 in abort () from /lib/libc.so.6 #2 0x00007f7e271fc741 in unwind_cleanup () from /lib/libpthread.so.0 #3 0x0000000000479670 in boost::unit_test::unit_test_main (init_func=0x475b98 <init_unit_test_suite(int, char**)>, argc=3, argv=0x7fff31c6e328) at /home/kaltan/src/git/boost_1_39_0/boost/test/impl/unit_test_main.ipp:202 #4 0x00000000004796e2 in main (argc=3, argv=0x7fff31c6e328) at /home/kaltan/src/git/boost_1_39_0/boost/test/impl/unit_test_main.ipp:233 Peter
participants (2)
-
Gennadiy Rozental
-
Peter Soetens