jackaudio/jack2 — Issue #6: segfault at stop when compiled with --profile
Author: adiknoth
Created: 2012-03-08 17:42:31+00:00
State: open

(gdb) run
Starting program: /tmp/jacktest/bin/jackd -n test -d dummy -C 2 -P 2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
jackdmp 1.9.9
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
[New Thread 0x7ffff41fa700 (LWP 31668)]
[New Thread 0x7ffff37f8700 (LWP 31669)]
ALSA lib conf.c:1220:(parse_def) show is not a compound
ALSA lib conf.c:1686:(snd_config_load1) _toplevel_:24:26:Unexpected char
ALSA lib conf.c:3406:(config_file_open) /usr/share/alsa/pulse-alsa.conf may be old or corrupted: consider to remove or fix it
[New Thread 0x7fffeee91700 (LWP 31670)]
JACK server starting in realtime mode with priority 10
Engine profiling activated, beware 197 MBytes are needed to record profiling points...
[New Thread 0x7ffff7fd1700 (LWP 31671)]
[New Thread 0x7ffff7f50700 (LWP 31673)]
[New Thread 0x7ffff7ecf700 (LWP 31675)]
^CJack main caught signal 2
[Thread 0x7ffff7ecf700 (LWP 31675) exited]
[Thread 0x7ffff7f50700 (LWP 31673) exited]
[Thread 0x7ffff7fd1700 (LWP 31671) exited]
Write server and clients timing data...

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7871719 in Jack::JackEngineProfiling::~JackEngineProfiling (this=0x7fffdd2253e2, __in_chrg=)
at ../common/JackEngineProfiling.cpp:65
65 for (unsigned int j = 0; j < fMeasuredClient; j++) {
(gdb) bt
#0 0x00007ffff7871719 in Jack::JackEngineProfiling::~JackEngineProfiling (this=0x7fffdd2253e2, __in_chrg=)
at ../common/JackEngineProfiling.cpp:65
#1 0x00007ffff7886c77 in Jack::JackEngineControl::~JackEngineControl (this=0x7fffdd225000, __in_chrg=)
at ../common/JackEngineControl.h:126
#2 0x00007ffff7885015 in Jack::JackServer::~JackServer (this=0x7ffff0c00010, __in_chrg=)
at ../common/JackServer.cpp:75
#3 0x00007ffff7890118 in jackctl_server_close (server_ptr=0x605890) at ../common/JackControlAPI.cpp:856
#4 0x000000000040292b in main (argc=9, argv=0x7fffffffe418) at ../common/Jackdmp.cpp:547

Here, fMeasuredClient cannot be accessed:

(gdb) p fMeasuredClient
Cannot access memory at address 0x7fffe9821706

Maybe it's a toolchain issue or side effect. I'll see if I can bisect it to a certain commit.