<html>
  <head>

    
  </head>
  <body text="#000000" bgcolor="#ffffff">
    David,<br>
    <br>
    Most of the grid jobs that we submitted over the weekend were hung
    in mid-processing by hd_ana and had to be killed.&nbsp; The features of
    these hangs all seem to be the same.&nbsp; There are three threads, which
    I will call the main thread and two children.&nbsp; There is a deadlock
    between the main thread and the second child, both in
    "__lll_lock_wait_private()".&nbsp; I give the stack backtraces below.&nbsp;
    The hd_ana binaries I am running are default i686 builds (i87 math,
    no debug, default optimization) and so have no symbols, but by
    poking around on the stack I can reconstruct what happened.&nbsp; The
    error occurred in the second child thread, call to operator
    new(unsigned int) which triggered a segfault (signal 11).&nbsp; The code
    then entered the sighandler provided by root, which seems to be
    opening a child process -- very funny behavior for a severe crash
    recovery process, but anyway -- and deadlocks with the main thread
    waiting for some event that never happens.<br>
    <ol>
      <li>We might want to rethink using the default root signal
        handling mechanism, or replace it with something more
        appropriate to the JANA framework.&nbsp; The root mechanism may not
        be thread-safe, or if it is, there seems to be some interference
        with the thread handling mechanism in JANA, which is causing
        this lockup.</li>
      <li>Then there is the root cause of the segfault in
        DTrackCandidate_factory_CDC::FindThetaZRegression().&nbsp; Have you
        run into this before?</li>
    </ol>
    -Richard J.<br>
    <br>
    <br>
    #0&nbsp; 0x40000402 in __kernel_vsyscall ()<br>
    #1&nbsp; 0x008d9783 in __lll_lock_wait_private () from /lib/libc.so.6<br>
    #2&nbsp; 0x00868a2a in _L_lock_43 () from /lib/libc.so.6<br>
    #3&nbsp; 0x008618cb in ptmalloc_lock_all () from /lib/libc.so.6<br>
    #4&nbsp; 0x0088cb2f in fork () from /lib/libc.so.6<br>
    #5&nbsp; 0x00854bab in _IO_proc_open@@GLIBC_2.1 () from /lib/libc.so.6<br>
    #6&nbsp; 0x00854e0a in <a href="mailto:popen@@GLIBC_2.1">popen@@GLIBC_2.1</a> () from /lib/libc.so.6<br>
    #7&nbsp; 0x40220114 in TUnixSystem::OpenPipe(char const*, char const*) ()
    from /usr/local/root/lib/libCore.so<br>
    #8&nbsp; 0x40227060 in TUnixSystem::StackTrace() () from
    /usr/local/root/lib/libCore.so<br>
    #9&nbsp; 0x4022480e in TUnixSystem::DispatchSignals(ESignals) () from
    /usr/local/root/lib/libCore.so<br>
    #10 0x402248dd in SigHandler(ESignals) () from
    /usr/local/root/lib/libCore.so<br>
    #11 0x4021daa4 in sighandler(int) () from
    /usr/local/root/lib/libCore.so<br>
    #12 &lt;signal handler called&gt;<br>
    #13 0x00864e3f in _int_malloc () from /lib/libc.so.6<br>
    #14 0x00866e97 in malloc () from /lib/libc.so.6<br>
    #15 0x00d66ab7 in operator new(unsigned int) () from
    /usr/lib/libstdc++.so.6<br>
    #16 0x081706be in
    DTrackCandidate_factory_CDC::FindThetaZRegression(DTrackCandidate_factory_CDC::DCDCSeed&amp;)
    ()<br>
    #17 0x08174c15 in
    DTrackCandidate_factory_CDC::evnt(jana::JEventLoop*, int) ()<br>
    #18 0x08157bff in
    jana::JFactory&lt;DTrackCandidate&gt;::Get(std::vector&lt;DTrackCandidate
    const*, std::allocator&lt;DTrackCandidate const*&gt; &gt;&amp;) ()<br>
    #19 0x08159918 in jana::JFactory&lt;DTrackCandidate&gt;*
    jana::JEventLoop::GetFromFactory&lt;DTrackCandidate&gt;(std::vector&lt;DTrackCandidate
    const*, std::allocator&lt;DTrackCandidate const*&gt; &gt;&amp;, char
    const*, jana::JEventLoop::data_source_t&amp;) ()<br>
    #20 0x0815e1e3 in jana::JFactory&lt;DTrackCandidate&gt;*
    jana::JEventLoop::Get&lt;DTrackCandidate&gt;(std::vector&lt;DTrackCandidate
    const*, std::allocator&lt;DTrackCandidate const*&gt; &gt;&amp;, char
    const*) ()<br>
    #21 0x08166f5d in DTrackCandidate_factory::evnt(jana::JEventLoop*,
    int) ()<br>
    <br>
  </body>
</html>