|
Boost Testing : |
From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2007-05-29 23:39:26
Platform: Solaris x86, gcc 4.2.0, Boost CVS HEAD
I'm running the Boost Regression tests on a machine at home and
several of the asio test programs appear to be eating up all physical
memory and hitting std::bad_alloc.
The out-of-memory condition seems to be getting swallowed up by
Boost.Test, resulting in endless loops of this (according to truss):
lwp_sigmask(SIG_SETMASK, 0x00000400, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
setcontext(0x08046A70)
Incurred fault #6, FLTBOUNDS %pc = 0xD2792661
siginfo: SIGSEGV SEGV_MAPERR addr=0xA4AF5444
Received signal #11, SIGSEGV [caught]
siginfo: SIGSEGV SEGV_MAPERR addr=0xA4AF5444
lwp_sigmask(SIG_SETMASK, 0x00000400, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
setcontext(0x08046A70)
Incurred fault #6, FLTBOUNDS %pc = 0xD2792661
siginfo: SIGSEGV SEGV_MAPERR addr=0xA4AF5444
Received signal #11, SIGSEGV [caught]
siginfo: SIGSEGV SEGV_MAPERR addr=0xA4AF5444
When I run one of these test programs under the debugger, here's the
stack trace when gdb first detects the OOM:
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.10"...
(gdb) run
Starting program:
/home/cae/boost-regression/CVS-HEAD/boost/libs/asio/test/io_service
warning: Temporarily disabling breakpoints for unloaded shared library
"/usr/lib/ld.so.1"
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
Running 1 test case...
[New LWP 1]
[New LWP 2]
[New LWP 3]
[LWP 2 exited]
[New LWP 2]
[LWP 3 exited]
[New LWP 3]
Program received signal SIGSEGV, Segmentation fault.
0xd27a8ab1 in __cxa_allocate_exception () from
./libboost_system-gcc42-mt-d-1_35.so.1.35.0
(gdb) where
#0 0xd27a8ab1 in __cxa_allocate_exception () from
./libboost_system-gcc42-mt-d-1_35.so.1.35.0
#1 0x0804d528 in throw_exception () at io_service.cpp:80
#2 0x080658d5 in boost::asio::asio_handler_invoke<void (*)()> (
function=0x804d518 <throw_exception()>)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/asio/handler_invoke_hook.hpp:63
#3 0x080658ef in asio_handler_invoke_helpers::invoke<void (*)(), void (*)()> (
function=@0x8045834, context=0x8045834)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/asio/detail/handler_invoke_helpers.hpp:39
#4 0x0806b69e in
boost::asio::detail::task_io_service<boost::asio::detail::select_reactor<false>
>:
:handler_wrapper<void (*)()>::do_call (base=0x80ed600)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/asio/detail/task_io_service.hpp:412
#5 0x0805e598 in
boost::asio::detail::task_io_service<boost::asio::detail::select_reactor<false>
>:
:handler_base::call (this=0x80ed600)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/asio/detail/task_io_service.hpp:361
#6 0x080731cf in
boost::asio::detail::task_io_service<boost::asio::detail::select_reactor<false>
>:
:do_one (this=0x80ef5d8, lock=@0x8045950, this_idle_thread=0x804591c,
ec=@0x804598c)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/asio/detail/task_io_service.hpp:258
#7 0x0807347a in
boost::asio::detail::task_io_service<boost::asio::detail::select_reactor<false>
>:
:run (this=0x80ef5d8, ec=@0x804598c)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/asio/detail/task_io_service.hpp:89
#8 0x0807354c in boost::asio::io_service::run (this=0x8045a58)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/asio/impl/io_service.ipp:57
#9 0x0805823d in io_service_test () at io_service.cpp:223
#10 0x08068d81 in
boost::unit_test::ut_detail::invoker<boost::unit_test::ut_detail::unused>::invoke<
void (*)()> (this=0x8046df7, f=@0x80ef16c)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/utils/callback.hpp:56
#11 0x08068da5 in
boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused,
void (*)()>::invoke (this=0x80ef168)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/utils/callback.hpp:89
#12 0x0806ff60 in
boost::unit_test::callback0<boost::unit_test::ut_detail::unused>::operator()
(
this=0x80eef90) at
/home/cae/boost-regression/CVS-HEAD/boost/boost/test/utils/callback.hpp:118
#13 0x0806ff82 in boost::unit_test::(anonymous
namespace)::zero_return_wrapper_t<boost::unit_test::c
allback0<boost::unit_test::ut_detail::unused> >::operator() (this=0x80ef19c)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/unit_test_monitor.ipp:41
#14 0x0806ff9d in
boost::unit_test::ut_detail::invoker<int>::invoke<boost::unit_test::(anonymous
nam
espace)::zero_return_wrapper_t<boost::unit_test::callback0<boost::unit_test::ut_detail::unused>
> >
(this=0x8046e87, f=@0x80ef19c)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/utils/callback.hpp:42
#15 0x0806ffbb in boost::unit_test::ut_detail::callback0_impl_t<int,
boost::unit_test::(anonymous na
mespace)::zero_return_wrapper_t<boost::unit_test::callback0<boost::unit_test::ut_detail::unused>
> >
::invoke (this=0x80ef198)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/utils/callback.hpp:89
#16 0x08070542 in boost::unit_test::callback0<int>::operator() (this=0x80473f4)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/utils/callback.hpp:118
#17 0x08059582 in boost::execution_monitor::catch_signals
(this=0x80eb9f4, F=@0x80473f4,
catch_system_errors=true, timeout=0)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/execution_monitor.ipp:432
#18 0x080599c0 in boost::execution_monitor::execute (this=0x80eb9f4,
F=@0x80473f4,
catch_system_errors=true, timeout=0)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/execution_monitor.ipp:225
#19 0x0805a75c in
boost::unit_test::unit_test_monitor_t::execute_and_translate
(this=0x80eb9f4,
tc=@0x80eef68)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/unit_test_monitor.ipp:65
#20 0x0807eaa8 in boost::unit_test::framework_impl::visit
(this=0x80eb660, tc=@0x80eef68)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/framework.ipp:135
#21 0x0804c8b2 in boost::unit_test::traverse_test_tree (tc=@0x80eef68,
V=@0x80eb660)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/unit_test_suite.ipp:154
#22 0x08053b96 in boost::unit_test::traverse_test_tree (id=65536, V=@0x80eb660)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/unit_test_suite.ipp:193
#23 0x080537b9 in boost::unit_test::traverse_test_tree
(suite=@0x80ee520, V=@0x80eb660)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/unit_test_suite.ipp:168
#24 0x08053bb5 in boost::unit_test::traverse_test_tree (id=2, V=@0x80eb660)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/unit_test_suite.ipp:195
#25 0x080537b9 in boost::unit_test::traverse_test_tree
(suite=@0x80ee4d8, V=@0x80eb660)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/unit_test_suite.ipp:168
#26 0x08053bb5 in boost::unit_test::traverse_test_tree (id=1, V=@0x80eb660)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/unit_test_suite.ipp:195
#27 0x0805b0f7 in boost::unit_test::framework::run (id=1, continue_test=true)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/framework.ipp:396
#28 0x0805b3ac in boost::unit_test::unit_test_main (argc=1, argv=0x8047a6c)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/unit_test_main.ipp:61
#29 0x0805b5be in main (argc=0, argv=0x0)
at /home/cae/boost-regression/CVS-HEAD/boost/boost/test/impl/unit_test_main.ipp:99
(gdb)
I think this is a problem in both the asio test programs for using too
much memory, and in Boost.Test swallowing the error and going into an
infinite loop.
-- Caleb Epstein