Re: [LAD] Possible jack_port_disconnect() problem.

From: Paul Davis <paul@email-addr-hidden>
Date: Tue Nov 26 2019 - 19:10:11 EET

jack clients and the server on linux communicate via reading and writing
through a FIFO. there's nothing unusual about read(2) showing up here - the
client has asked the server for a port disconnect and is waiting for a
response.

On Tue, Nov 26, 2019 at 9:45 AM Ethan Funk <ethan@email-addr-hidden>
wrote:

> After days of testing, I got a crash (of sorts) out of my program. More of
> a hang than a crash. So I attached gdb to the process and looked around. My
> main thread appears to be hung deep inside a jack call, via
> jack_port_disconnect(). This is a point in my code where it cleans up after
> an jack-attached media player that is done playing. The player process
> terminates when it's jack connections are disconnected. I re-started the
> code execution and then stopped it again to find that the main thread was
> still waiting at the same libc_read() spot. After taking a look at the jack
> source code, I didn't find that jack_port_disconnect() would result in a
> read any place down the jack call chain. To be fair to jack, I am still
> mostly unfamiliar with the library structure, so I could be missing
> something. Any insight as to what I might be doing wrong? The port I am
> passing to jack_port_disconnect() appears to be valid, unless my code is
> overwriting memory. Backtrace of the main thread is below.
>
> Thanks all.
> Ethan...
>
> (gdb) bt full
> #0 __libc_read (nbytes=4, buf=0x7fffad4ed248, fd=5) at
> ../sysdeps/unix/sysv/linux/read.c:26
> resultvar = 18446744073709551104
> sc_cancel_oldtype = 0
> __arg3 = <optimized out>
> _a2 = <optimized out>
> sc_ret = <optimized out>
> __value = <optimized out>
> __arg1 = <optimized out>
> _a3 = <optimized out>
> resultvar = <optimized out>
> resultvar = <optimized out>
> __arg2 = <optimized out>
> _a1 = <optimized out>
> #1 __libc_read (fd=5, buf=0x7fffad4ed248, nbytes=4) at
> ../sysdeps/unix/sysv/linux/read.c:24
> No locals.
> #2 0x00007fab6fe13ead in ?? () from /lib/x86_64-linux-gnu/libjack.so.0
> No symbol table info available.
> #3 0x00007fab6fe02e2a in ?? () from /lib/x86_64-linux-gnu/libjack.so.0
> No symbol table info available.
> #4 0x00007fab6fe03768 in ?? () from /lib/x86_64-linux-gnu/libjack.so.0
> No symbol table info available.
> #5 0x00007fab6fdf8598 in ?? () from /lib/x86_64-linux-gnu/libjack.so.0
> No symbol table info available.
> #6 0x0000564ac911610a in releaseQueueRecord (root=0x564ac9134260
> <queueList>, rec=0x7fab3004c910, force=0 '\000') at data.c:473
> [NOTE: this line is: jack_port_disconnect(mixEngine->client, *port); ]
> c = 1
> cmax = 2
> port = 0x564acaf81278
> prev = 0x564ac9134260 <queueList>
> current = 0x7fab3004c910
> instance = 0x564acaf80be0
> logID = 9126049
> tmp = <optimized out>
> #7 0x0000564ac91057c5 in NextListItem (lastStat=2,
> curQueRec=0x564ac9134260 <queueList>, firstp=0x7fffad4ed418,
> sbtime=0x7fffad4ed41c, remtime=0, isPlaying=0x7fffad4ed416 "") at
> automate.c:811
>
> .... Blah, blah, blah....
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev@email-addr-hidden
> https://lists.linuxaudio.org/listinfo/linux-audio-dev
>

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Jan 1 02:16:52 2020

This archive was generated by hypermail 2.1.8 : Wed Jan 01 2020 - 02:16:52 EET