BIND 10 #2423: log4cplus threads and python Segmentation fault in notify_out_test.py

BIND 10 Development do-not-reply at isc.org
Thu Nov 1 18:50:30 UTC 2012


#2423: log4cplus threads and python Segmentation fault in notify_out_test.py
-------------------------------------+-------------------------------------
            Reporter:  jreed         |                        Owner:
                Type:  defect        |                       Status:  new
            Priority:  medium        |                    Milestone:  New
           Component:  Unclassified  |  Tasks
           Sensitive:  0             |                     Keywords:
         Sub-Project:  Core          |              Defect Severity:  N/A
Estimated Difficulty:  0             |  Feature Depending on Ticket:
         Total Hours:  0             |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
 On three NetBSD 6.0 systems, when log4cplus-1.1.0 is built with threads
 (the default) it fails like:

 {{{
 Running test: notify_out_test.py
 ..............[1]   Segmentation fault (core dumped) PYTHONPATH=/home...
 *** Error code 139
 }}}

 For example:
 http://git.bind10.isc.org/~tester/builder/BIND10/20121030163907-NetBSD6-i386-GCC/logs/unittests.out

 This happens with python31 and python32. Here is a backtrace:

 {{{

 Core was generated by `python3.2'.
 Program terminated with signal 11, Segmentation fault.
 #0  0xbae55082 in std::string::assign(char const*, unsigned int) ()
    from /usr/lib/libstdc++.so.7
 (gdb) bt
 #0  0xbae55082 in std::string::assign(char const*, unsigned int) ()
    from /usr/lib/libstdc++.so.7
 #1  0xbb0721a1 in
 log4cplus::detail::clear_tostringstream(std::basic_ostringstream<char,
 std::char_traits<char>, std::allocator<char> >&) ()
    from /usr/pkg/lib/liblog4cplus-1.1.so.5
 #2  0xbb072285 in log4cplus::detail::get_macro_body_oss() ()
    from /usr/pkg/lib/liblog4cplus-1.1.so.5
 #3  0xbb242dfd in isc::log::LoggerImpl::outputRaw (this=0xba75b500,
     severity=@0xba3ff444, message=...) at logger_impl.cc:141
 #4  0xbb241854 in isc::log::Logger::output (this=0xbb5e5b20,
     severity=@0xba3ff444, message=...) at logger.cc:129
 #5  0xbb81b451 in ~Formatter (this=0xba3ff440, __in_chrg=<optimized
 out>)
     at ../../../../../src/lib/log/log_formatter.h:167
 #6  (anonymous
 namespace)::Logger_performOutput<boost::_bi::bind_t<isc::log::Formatter<isc:
 :log::Logger>,
 boost::_mfi::mf1<isc::log::Formatter<isc::log::Logger>,
 isc::log::Logger, char const* const&>,
 boost::_bi::list2<boost::_bi::value<isc::log::Logger*>, boost::arg<2> >
 > > (function=..., args=0xbb5ff22c,
     dbgLevel=false) at log.cc:538
 #7  0xbb81bd1f in (anonymous namespace)::Logger_info
 (po_self=0xba7941e0,
     args=0xbb5ff22c) at log.cc:581
 #8  0xbbabf054 in PyCFunction_Call () from
 /usr/pkg/lib/libpython3.2.so.1.0
 #9  0xbbb121ed in PyEval_EvalFrameEx () from
 /usr/pkg/lib/libpython3.2.so.1.0
 #10 0xbbb12066 in PyEval_EvalFrameEx () from
 /usr/pkg/lib/libpython3.2.so.1.0
 #11 0xbbb13ba1 in PyEval_EvalCodeEx () from
 /usr/pkg/lib/libpython3.2.so.1.0
 #12 0xbbaad599 in function_call () from /usr/pkg/lib/libpython3.2.so.1.0
 #13 0xbba8a08c in PyObject_Call () from /usr/pkg/lib/libpython3.2.so.1.0
 #14 0xbbb10e93 in PyEval_EvalFrameEx () from
 /usr/pkg/lib/libpython3.2.so.1.0
 #15 0xbbb12066 in PyEval_EvalFrameEx () from
 /usr/pkg/lib/libpython3.2.so.1.0
 #16 0xbbb12066 in PyEval_EvalFrameEx () from
 /usr/pkg/lib/libpython3.2.so.1.0
 #17 0xbbb13ba1 in PyEval_EvalCodeEx () from
 /usr/pkg/lib/libpython3.2.so.1.0
 #18 0xbbaad4b1 in function_call () from /usr/pkg/lib/libpython3.2.so.1.0
 #19 0xbba8a08c in PyObject_Call () from /usr/pkg/lib/libpython3.2.so.1.0
 #20 0xbba9d195 in method_call () from /usr/pkg/lib/libpython3.2.so.1.0
 #21 0xbba8a08c in PyObject_Call () from /usr/pkg/lib/libpython3.2.so.1.0
 #22 0xbbb0c381 in PyEval_CallObjectWithKeywords ()
    from /usr/pkg/lib/libpython3.2.so.1.0
 #23 0xbbb445c8 in t_bootstrap () from /usr/pkg/lib/libpython3.2.so.1.0
 #24 0xbba514ea in ?? () from /usr/lib/libpthread.so.1
 #25 0xbb968ea0 in ___lwp_park50 () from /usr/lib/libc.so.12
 #26 0xba200000 in ?? ()
 #27 0xbbac0b2e in PyObject_GetAttr () from
 /usr/pkg/lib/libpython3.2.so.1.0
 #28 0xbbb0dd30 in PyEval_EvalFrameEx () from
 /usr/pkg/lib/libpython3.2.so.1.0
 #29 0xbb99487b in free () from /usr/lib/libc.so.12
 #30 0xbbb44058 in PyObject_GC_Del () from
 /usr/pkg/lib/libpython3.2.so.1.0
 #31 0xbbaac830 in PyFrame_BlockPop () from
 /usr/pkg/lib/libpython3.2.so.1.0
 #32 0xbb9925b0 in ?? () from /usr/lib/libc.so.12
 ---Type <return> to continue, or q <return> to quit---
 Backtrace stopped: previous frame inner to this frame (corrupt stack?)
 }}}

 This problem does not happen with log4cplus-1.0.4 nor when log4cplus-1.1.0
 is built --without-threads.

 I do not see the problem on a FreeBSD system.

 I first brought this up on mailing list; here is the thread:
 https://lists.isc.org/pipermail/bind10-dev/2012-October/004011.html

-- 
Ticket URL: <http://bind10.isc.org/ticket/2423>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list