2.7 segfault when RT

6 replies [Last post]
jwm
User offline. Last seen 3 years 39 weeks ago. Offline
Joined: 2007-03-03
Posts:

Hi,

BACKGROUND: Have built ardour2.7 from source on a lenny AMD64 system (from june). Built from src: kernel 2.6.26.6 -rt patched, latest alsa (outside kernel), fftw3, sndfile+SRC, jack (no LV2 yet). Other dependancies met by downloading individual devel debs (consequently upgrading libc6 by a couple of minor-minor versions).

Jack works in realtime mode. Ardour crashes when set to real time mode, but without RT selected, will work fine (it also seems to kill a running jack). jack uses SHM/tmpfs. limits.conf set.

Initially had problems building ardour2 - errors from within <sys/libintl.h> (expected unqualified id before const error). Eventually found the disable_nls.patch ( http://tracker.ardour.org/view.php?id=2378 ) which did the trick.

I tried to compile (ardour) with
scons DEBUG=1
to try and find out more about what's causing the error, but have not seen any extra info.

So what I'm asking is for help getting these debug messages so I can try and track down what's happening.

Cheers,
James.

jwm
User offline. Last seen 3 years 39 weeks ago. Offline
Joined: 2007-03-03
Posts:

Debuggin gets me:

GNU gdb 6.7.1-debian
..
This GDB was configured as "x86_64-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/local/src/Audio/ardour-2.7/gtk2_ardour/ardour-2.7
[Thread debugging using libthread_db enabled]
Ardour/GTK 2.7
(built using 4225 and GCC version 4.3.1)
..
[New Thread 0x7f48f9deb7a0 (LWP 2153)]
loading default ui configuration file gtk2_ardour/ardour2_ui_default.conf
loading user ui configuration file /home/music/.ardour2/ardour2_ui.conf
Loading ui configuration file gtk2_ardour/ardour2_ui_dark.rc

(ardour-2.7:2153): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",
ardour: [INFO]: Ardour will be limited to 1024 open files
loading system configuration file ./ardour_system.rc
loading user configuration file /home/music/.ardour2/ardour.rc
ardour: [INFO]: No H/W specific optimizations in use
[New Thread 0x40fc0950 (LWP 2156)]
[New Thread 0x417c1950 (LWP 2157)]
[New Thread 0x41fc2950 (LWP 2158)]
ardour: [INFO]: looking for control protocols in /home/music/.ardour2/surfaces/:/usr/local/lib64/ardour2/surfaces/
powermate: Opening of powermate failed - No such file or directory
ardour: [INFO]: Control protocol powermate not usable
ardour: [INFO]: Control surface protocol discovered: "Generic MIDI"
ardour: [INFO]: Control surface protocol discovered: "Mackie"
JACK COMMAND: /usr/local/bin/jackd -p 128 -R -P 60 -T -d alsa -n 2 -r 44100 -p 1024 -d hw:0,0
jackd 0.109.2
..
JACK compiled with POSIX SHM support.
loading driver ..
apparent rate = 44100
creating alsa driver ... hw:0,0|hw:0,0|1024|2|44100|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit little-endian
ALSA: use 2 periods for playback
loading bindings from gtk2_ardour/mnemonic-us.bindings
[New Thread 0x42043950 (LWP 2167)]
[New Thread 0x420bda70 (LWP 2168)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x42043950 (LWP 2167)]
0x00007fff01fff534 in ?? ()
(gdb) subgraph starting at ardour timed out (subgraph_wait_fd=16, status = 0, state = Triggered)

**** alsa_pcm: xrun of at least 1228395677483.008 msecs

backtrace
#0 0x00007fff01fff534 in ?? ()
#1 0x00007fff01fff726 in gettimeofday ()
#2 0x00007f48f259c88a in gettimeofday () from /lib/libc.so.6
#3 0x00007f48f59b7f74 in jack_thread_wait (client=0x301f890, status=0) at client.c:1534
#4 0x00007f48f59b80cf in jack_client_thread (arg=) at client.c:1601
#5 0x00007f48f579afc7 in start_thread () from /lib/libpthread.so.0
#6 0x00007f48f25dd5ad in clone () from /lib/libc.so.6
#7 0x0000000000000000 in ?? ()
(gdb) quit

********************************************
********************************************
********************************************
Maybe a problem in jack? But jack runs fine using exactly the command ardour uses.
Using that command to start jack and then starting ardour:

..
ardour: [INFO]: No H/W specific optimizations in use
[New Thread 0x4101a950 (LWP 2275)]
[New Thread 0x4181b950 (LWP 2276)]
[New Thread 0x4201c950 (LWP 2277)]
..
ardour: [INFO]: Control surface protocol discovered: "Mackie"
jackd 0.109.2
..
JACK compiled with POSIX SHM support.
loading driver ..
apparent rate = 44100
creating alsa driver ... hw:0,0|hw:0,0|1024|2|44100|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit little-endian
ALSA: use 2 periods for playback
loading bindings from gtk2_ardour/mnemonic-us.bindings
[New Thread 0x4209d950 (LWP 2286)]
[New Thread 0x42117a70 (LWP 2287)]
/tmp/buildd/gdb-6.7.1/gdb/linux-nat.c:2129: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) subgraph starting at ardour timed out (subgraph_wait_fd=16, status = 0, state = Triggered)

**** alsa_pcm: xrun of at least 1228395677483.008 msecs

jackd watchdog: timeout - killing jackd

Please answer y or n.
/tmp/buildd/gdb-6.7.1/gdb/linux-nat.c:2129: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

----------

Any ideas?

jwm
User offline. Last seen 3 years 39 weeks ago. Offline
Joined: 2007-03-03
Posts:

Hello again,

sorry I think this is not an ardour problem. the same result happens using qjackctl to run jack with -R priorities. I think i need to go over my system config again..

BUT, i don't understand why jackd can run with rt pri from cmdline but not from a GUI?

paul
paul's picture
User offline. Last seen 1 day 6 hours ago. Offline
Joined: 2006-03-16
Posts:

please read http://ardour.org/debugging_ardour for info on how to get a real/complete backtrace

jwm
User offline. Last seen 3 years 39 weeks ago. Offline
Joined: 2007-03-03
Posts:

Hi Paul,

I've followed those instructions, but I had to do so with RT enabled because that's when it crashes.

The backtrace is here:
http://jwm-art.net/ardour_rt_backtrace.txt

Cheers,
James.

jwm
User offline. Last seen 3 years 39 weeks ago. Offline
Joined: 2007-03-03
Posts:

oops

jwm
User offline. Last seen 3 years 39 weeks ago. Offline
Joined: 2007-03-03
Posts:

I believe the problem was not compiling some software with the --with-pic option. I went back through it, starting with libsoundfile/libsamplerate, configuring --with-pic and verything works now. It seems to me to be fairly esoteric where developers take the attitude if you're compiling for 64bit you should know this already.