Bug 99323 - jackd audio server broken?
Summary: jackd audio server broken?
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-multimedia (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-22 22:10 UTC by mark
Modified: 2006-12-20 20:47 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mark 2006-06-22 22:10:16 UTC
I've sent an email to the jackit-devel mailing list as I'm not
sure if this problem is to do with jack or to do with FreeBSD.
I haven't had a reply from the mailing list yet, so I'm assuming
that it's something FreeBSD-specific.

jackd seems to go berserk whenever a client quits.
It happens using any driver, even 'dummy'.

$ jackd -v -d dummy
getting driver descriptor from /usr/local/lib/jack/jack_dummy.so
getting driver descriptor from /usr/local/lib/jack/jack_oss.so
getting driver descriptor from /usr/local/lib/jack/jack_portaudio.so
jackd 0.101.1
Copyright 2001-2005 Paul Davis and others.
jackd 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

JACK compiled with System V SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
loading driver ..
creating dummy driver ... dummy_pcm|48000|1024|21333|2|2
new client: dummy_pcm, id = 1 type 1  <at>  0x805a200 fd = -1
new buffer size 1024
registered port dummy_pcm:capture_1, offset = 4096
registered port dummy_pcm:capture_2, offset = 8192
registered port dummy_pcm:playback_1, offset = 0
registered port dummy_pcm:playback_2, offset = 0
13069 waiting for signals
++ jack_rechain_graph():
client dummy_pcm: internal client, execution_order=0.
-- jack_rechain_graph()
load = 0.0328 max usecs: 14.000, spare = 21319.000
...

Then running jack_simple_client in another terminal:

$ jack_simple_client
engine sample rate: 48000

The server sees this connection:

new client: jack_simple_client, id = 2 type 2  <at>  0x28246000 fd = 7
registered port jack_simple_client:input, offset = 0
registered port jack_simple_client:output, offset = 12288
++ jack_rechain_graph():
client dummy_pcm: internal client, execution_order=0.
client jack_simple_client: start_fd=5, execution_order=0.
client jack_simple_client: wait_fd=6, execution_order=1 (last client).
-- jack_rechain_graph()
connect dummy_pcm:capture_1 and jack_simple_client:input (forward)
++ jack_rechain_graph():
client dummy_pcm: internal client, execution_order=0.
client jack_simple_client: start_fd=5, execution_order=0.
client jack_simple_client: wait_fd=6, execution_order=1 (last client).
-- jack_rechain_graph()
connect jack_simple_client:output and dummy_pcm:playback_1 (output)
++ jack_rechain_graph():
client dummy_pcm: internal client, execution_order=0.
client jack_simple_client: start_fd=5, execution_order=0.
client jack_simple_client: wait_fd=6, execution_order=1 (last client).
-- jack_rechain_graph()
load = 42.3475 max usecs: 18047.000, spare = 3286.000

Now, send a ^C to the client to kill it off and the server goes into
a panic:

cannot read request from client (0/2100/Resource temporarily
unavailable)
could not handle external client request
cannot read request from client (0/2100/Resource temporarily
unavailable)
could not handle external client request
cannot read request from client (0/2100/Resource temporarily
unavailable)
could not handle external client request
cannot read request from client (0/2100/Resource temporarily
unavailable)
could not handle external client request
cannot read request from client (0/2100/Resource temporarily
unavailable)
could not handle external client request
cannot read request from client (0/2100/Resource temporarily
unavailable)
could not handle external client request
cannot read request from client (0/2100/Resource temporarily
unavailable)
could not handle external client request
cannot read request from client (0/2100/Resource temporarily
unavailable)
could not handle external client request
cannot read request from client (0/2100/Resource temporarily
unavailable)
could not handle external client request
cannot read request from client (0/2100/Resource temporarily
unavailable)
could not handle external client request
cannot read request from client (0/2100/Resource temporarily
unavailable)
could not handle external client request
cannot read request from client (0/2100/Resource temporarily
unavailable)
could not handle external client request

It doesn't crash, it just does that seemingly forever. It does this
whenever any client exits, which makes it next to useless currently.

It randomly crashes with a floating point error too:

$ jackd -v -d dummy
getting driver descriptor from /usr/local/lib/jack/jack_dummy.so
getting driver descriptor from /usr/local/lib/jack/jack_oss.so
getting driver descriptor from /usr/local/lib/jack/jack_portaudio.so
jackd 0.101.1
Copyright 2001-2005 Paul Davis and others.
jackd 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

JACK compiled with System V SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
loading driver ..
creating dummy driver ... dummy_pcm|48000|1024|21333|2|2
new client: dummy_pcm, id = 1 type 1  <at>  0x805a200 fd = -1
new buffer size 1024
registered port dummy_pcm:capture_1, offset = 4096
registered port dummy_pcm:capture_2, offset = 8192
registered port dummy_pcm:playback_1, offset = 0
registered port dummy_pcm:playback_2, offset = 0
66253 waiting for signals
++ jack_rechain_graph():
client dummy_pcm: internal client, execution_order=0.
-- jack_rechain_graph()
Floating point exception (core dumped)

#0  0x2808fcad in __udivdi3 () from /usr/local/lib/libjack.so.0
#1  0x281baaea in dummy_driver_wait (driver=0x805a300, extra_fd=-1,
    status=0x1, delayed_usecs=0x1) at cycles.h:34
#2  0x281bb1fb in dummy_driver_run_cycle (driver=0x1) at
dummy_driver.c:72
#3  0x2808b7de in jack_driver_nt_thread (arg=0x805a300) at driver.c:122
#4  0x280b8ab1 in pthread_create () from /usr/lib/libpthread.so.2
#5  0x2817245f in _ctx_start () from /lib/libc.so.6

The crash occurs with any driver (oss, portaudio, dummy).

I tried to compile a debugging version from SVN, but could
not even get a configure script generated under autoconf-2.59.

Fix: 

Source of problem not determined yet.
How-To-Repeat: 
See above.
Comment 1 Arseny Nasokin 2006-06-24 01:33:00 UTC
JackD doesn't like unclear session closing.
It's design lack, not FreeBSD specific. On Linux jackd causes same bug
-- 
   Best regards,
   	Arseny Nasokin
Comment 2 Stefan Walter freebsd_committer freebsd_triage 2006-06-25 14:38:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->multimedia

Assign to maintainer.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2006-06-26 21:32:29 UTC
Responsible Changed
From-To: multimedia->freebsd-multimedia

Canonicalize assignment.
Comment 4 Jeremy Messenger 2006-06-28 19:04:05 UTC
It looks like it's not FreeBSD specific when I took a look at jack's  
mailing list and there are some of people that have reported this. I have  
found a patch, but I don't know if it will helping with your issue. Can  
you test this patch?

http://tinyurl.com/nfx56

If you want me to create a patch that for you can drop in  
audio/jack/files, I will be happy to do it. If it doesn't work, then I  
guess I could try to make CVS works.

Cheers,
Mezz


-- 
mezz7@cox.net  -  mezz@FreeBSD.org
FreeBSD GNOME Team  -  FreeBSD Multimedia Hat (ports, not src)
http://www.FreeBSD.org/gnome/  -  gnome@FreeBSD.org
http://wiki.freebsd.org/multimedia  -  multimedia@FreeBSD.org
Comment 5 dfilter service freebsd_committer freebsd_triage 2006-12-07 19:42:30 UTC
mezz        2006-12-07 19:42:00 UTC

  FreeBSD ports repository

  Modified files:
    audio/jack           Makefile pkg-descr 
  Added files:
    audio/jack/files     patch-jackd_engine.c 
  Log:
  - Fix the jackd getting into infinite loop on client disconnect. [1] [2]
  - Fix a Linuxish, md5sum -> md5 -q (thanks flz) that will put a correct info
    in one of header (jack_md5.h).
  - Remove 'Author' from pkg-descr.
  - Bump the PORTREVISION.
  
  PR:             ports/99323 [1] and ports/106428 [2]
  Reported by:    markzero <markzero@corolla.ath.cx> [1]
  Submitted by:   trasz <trasz@pin.if.uz.zgora.pl> [2]
  
  Revision  Changes    Path
  1.32      +4 -0      ports/audio/jack/Makefile
  1.1       +11 -0     ports/audio/jack/files/patch-jackd_engine.c (new)
  1.2       +0 -1      ports/audio/jack/pkg-descr
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Jeremy Messenger freebsd_committer freebsd_triage 2006-12-07 19:43:25 UTC
State Changed
From-To: open->feedback

Please update your jack to 0.102.20_1 and let me know if it is fix for you. 
Make sure your jack port has files/patch-jackd_engine.c too.
Comment 7 Jeremy Messenger freebsd_committer freebsd_triage 2006-12-20 20:47:04 UTC
State Changed
From-To: feedback->closed

No respone since Dec 7th. It should be fixed as another user has reported 
that it's fixed for him.