also link libjack, just to be sure
[jack_interposer.git] / README
blob20d860ec7816554a428f0250c6c14aac5dd3aeee
1 jack_interposer
3 jack_interposer is a small library that can be used for troubleshooting
4 misbehaving JACK applications. No recompile of the application under test is 
5 neccessary, though you get more useful backtraces when the application is
6 compiled with debugging symbols in.
8 == Building ==
10 $ make
12 == Usage ==
14 You can simply add this library to your LD_PRELOAD environment:
16 $ export LD_PRELOAD=/home/arnouten/dev/jack_interposer/jack_interposer.so
18 Then run the program you wish to analyze: it will abort as soon as a 
19 non-rt-safe operation is performed from the jack process callback thread:
21 $ lmms
22 cannot connect output ports. you'll have to do connections at your own!
23 malloc(24) is called while in rt section
24 Aborted
25
27 To get a more useful backtrace, run the application in gdb:
29 $ gdb lmms
30 *snip*
31 (gdb) run
32 *snip*
33 malloc(24) is called while in rt section
35 Program received signal SIGABRT, Aborted.
36 [Switching to Thread 0xb35bdb70 (LWP 18358)]
37 0xb7fe1424 in __kernel_vsyscall ()
38 (gdb) 
40 Finally, use 'bt' to produce the actual backtrace:
42 (gdb) bt
43 #0  0xb7fe1424 in __kernel_vsyscall ()
44 #1  0xb6b138c0 in raise () from /lib/i686/cmov/libc.so.6
45 #2  0xb6b16df5 in abort () from /lib/i686/cmov/libc.so.6
46 #3  0xb7fddbf9 in malloc () from /home/arnouten/dev/jack_interposer/jack_interposer.so
47 #4  0xb72bee1d in qMalloc(unsigned int) () from /usr/lib/libQtCore.so.4
48 #5  0x080da586 in audioJACK::processCallback(unsigned int, void*) ()
49 #6  0x080dae08 in audioJACK::staticProcessCallback(unsigned int, void*) ()
50 #7  0xb7fddc4d in interposed_process_callback () from /home/arnouten/dev/jack_interposer/jack_interposer.so
51 #8  0xb708659e in ?? () from /usr/lib/libjack.so.0
52 #9  0xb708a34f in ?? () from /usr/lib/libjack.so.0
53 #10 0xb725b585 in start_thread () from /lib/i686/cmov/libpthread.so.0
54 #11 0xb6bb818e in clone () from /lib/i686/cmov/libc.so.6
55 (gdb) 
57 Looks like LMMS is using some QT helper classes that are performing malloc()'s!
59 == Limitations ==
61 jack_interposer currently only works for single-CPU machines, or machines 
62 configured to run the application under test on a single CPU.
64 == Related applications ==
66 http://trac.jackaudio.org/wiki/WalkThrough/Dev/Tools