Re: [Jack-Devel] jack2/ubuntu issue: jack2 does not quit

PrevNext  Index
DateFri, 20 Apr 2012 14:13:25 +0200
From David Henningsson <[hidden] at canonical dot com>
To[hidden] at jackaudio dot org
In-Reply-ToTim Blechmann [Jack-Devel] jack2/ubuntu issue: jack2 does not quit
On 04/08/2012 11:27 AM, Tim Blechmann wrote:
> after upgrading to ubuntu 12.04, jackd2 does not quit correctly:
>
> hitting `quit' gives me the following message:
>
> 11:17:31.920 Client deactivated.
> 11:17:31.936 D-BUS: JACK server could not be stopped. Sorry
> 11:17:31.937 ALSA connection graph change.
> Sun Apr  8 11:17:31 2012: Client 'qjackctl' with PID 3821 is out
> Sun Apr  8 11:17:31 2012: Stopping jack server...
> Sun Apr  8 11:17:31 2012: Client 'system' with PID 0 is out
> Sun Apr  8 11:17:31 2012: Client 'PulseAudio JACK Sink' with PID 2727 is out
> Sun Apr  8 11:17:31 2012: Client 'PulseAudio JACK Source' with PID 2727 is out
> Sun Apr  8 11:17:31 2012: [1m[31mERROR: Abort![0m
> Sun Apr  8 11:17:31 2012: [1m[31mERROR: info.si_signo = 6[0m
> Sun Apr  8 11:17:31 2012: [1m[31mERROR: info.si_errno = 0[0m
> Sun Apr  8 11:17:31 2012: [1m[31mERROR: Segmentation Fault![0m

So I got this as well, and the "Segmentation Fault!" here is fixed by 
the patch I sent a few days ago. But the Abort remains and I can't seem 
to get to it. I can get a stack trace out of when the abort happens, and 
I'm attaching that stack trace.

Judging from the trace, it seems like the following happens:
1) the main thread of jackd sends the cancel signal to the RT thread.
2) the RT thread starts unwinding (processing "catch" sections in code)
3) for some reason that I haven't figured out, std::terminate is called, 
which according to 
http://www.cplusplus.com/reference/std/exception/terminate/ is "Function 
automatically called when the exception handling process has to be 
abandoned for some circumstance that makes impossible to continue with 
it. The terminate handler by default simply calls abort."

So something goes wrong during the unwinding, or there is no catch-all, 
or something else happens. Any idea on how to continue the debugging?


-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
Program received signal SIGABRT, Aborted.
0x00007f879da4d445 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	../nptl/sysdeps/unix/sysv/linux/raise.c: Filen eller katalogen finns inte.
(gdb) bt full
#0  0x00007f879da4d445 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
        resultvar = 0
        pid = <optimized out>
        selftid = 4085
#1  0x00007f879da50bab in __GI_abort () at abort.c:91
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x100000000, sa_sigaction = 0x100000000}, sa_mask = {__val = {0, 140220441943112, 
              140220462752992, 0, 140220457506416, 0, 0, 4294967295, 0, 0, 8, 3051784, 0, 0, 140220455379473, 140220457508864}}, 
          sa_flags = -1631565964, sa_restorer = 0x5}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007f879e9ad69d in __gnu_cxx::__verbose_terminate_handler () at ../../../../src/libstdc++-v3/libsupc++/vterminate.cc:95
        terminating = true
        t = <optimized out>
#3  0x00007f879e9ab846 in __cxxabiv1::__terminate (handler=<optimized out>) at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:40
No locals.
#4  0x00007f879e9ab873 in std::terminate () at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:50
No locals.
#5  0x00007f879e9ab489 in __cxxabiv1::__gxx_personality_v0 (version=<optimized out>, actions=<optimized out>, exception_class=<optimized out>, 
    ue_header=<optimized out>, context=0x7f879ece0420) at ../../../../src/libstdc++-v3/libsupc++/eh_personality.cc:669
        action_record = <optimized out>
        p = <optimized out>
        thrown_ptr = <optimized out>
        info = {Start = 140220455152768, LPStart = 140220455152768, ttype_base = 0, TType = 0x7f879e6ee220 "\377\233\204\001\001h\030\005", 
          action_table = 0x7f879e6ee211 "\002", ttype_encoding = 155 '\233', call_site_encoding = 1 '\001'}
        landing_pad = 0
        ip = <optimized out>
        handler_switch_value = 0
        foreign_exception = true
        found_type = <optimized out>
        language_specific_data = 0x7f879e6ee1e8 "\377\233\065\001$\034\005"
        ip_before_insn = 0
#6  0x00007f879d51668d in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
No symbol table info available.
#7  0x00007f879d516a92 in _Unwind_ForcedUnwind () from /lib/x86_64-linux-gnu/libgcc_s.so.1
No symbol table info available.
#8  0x00007f879e4546a0 in __GI___pthread_unwind (buf=<optimized out>) at unwind.c:130
        ibuf = <optimized out>
        self = <optimized out>
#9  0x00007f879e44c7da in __do_cancel () at ../nptl/pthreadP.h:265
No locals.
---Type <return> to continue, or q <return> to quit---
#10 sigcancel_handler (sig=<optimized out>, si=<optimized out>, ctx=<optimized out>) at nptl-init.c:221
        curval = <optimized out>
#11 sigcancel_handler (sig=<optimized out>, si=<optimized out>, ctx=<optimized out>) at nptl-init.c:174
        pid = <optimized out>
        oldval = <optimized out>
#12 <signal handler called>
No symbol table info available.
#13 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:132
No locals.
#14 0x00007f879e450080 in _L_lock_903 () from /lib/x86_64-linux-gnu/libpthread.so.0
No symbol table info available.
#15 0x00007f879e44ff19 in __pthread_mutex_lock (mutex=0x106de08) at pthread_mutex_lock.c:82
        __PRETTY_FUNCTION__ = "__pthread_mutex_lock"
        type = 17227272
#16 0x00007f879e6b6cc2 in Jack::JackServer::Notify(int, int, int) () from /usr/lib/x86_64-linux-gnu/libjackserver.so.0
No symbol table info available.
#17 0x00007f879e6c799f in ?? () from /usr/lib/x86_64-linux-gnu/libjackserver.so.0
No symbol table info available.
#18 0x00007f879e6caa1b in ?? () from /usr/lib/x86_64-linux-gnu/libjackserver.so.0
No symbol table info available.
#19 0x00007f879e6a87f0 in Jack::JackPosixThread::ThreadHandler(void*) () from /usr/lib/x86_64-linux-gnu/libjackserver.so.0
No symbol table info available.
#20 0x00007f879e44de9a in start_thread (arg=0x7f879ece2700) at pthread_create.c:308
        __res = <optimized out>
        pd = 0x7f879ece2700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {1, 1735969408611266255, 140736620825840, 140220461623744, 17313504, 3, 
                -1794583953695822129, -1794584999493095729}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, 
              cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#21 0x00007f879db094bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
No locals.
#22 0x0000000000000000 in ?? ()
No symbol table info available.
PrevNext  Index

1334924014.11165_0.ltw:2,a <4F9152E5.8070401 at canonical dot com>