Bug 207725 - audio/jack: jackd audio server doesn't work under 11.x
Summary: audio/jack: jackd audio server doesn't work under 11.x
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-multimedia (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-05 18:51 UTC by Dan MacDonald
Modified: 2017-07-17 01:44 UTC (History)
7 users (show)

See Also:
bugzilla: maintainer-feedback? (multimedia)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan MacDonald 2016-03-05 18:51:26 UTC
I have tried a variety of combinations of options trying to get jackd to start under PCBSD 11 but nothing works, I only ever get `Bus error`.

My soundcard is working fine but even if I had NO soundcard installed, I should still be able to at least start jackd with the dummy driver but even using the dummy driver as root results in the dreaded `bus error` so I can only conclude its bust.

# jackd -v -d dummy
jackd 0.124.1
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn 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

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_net.so
JACK compiled with System V SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
registered builtin port type 8 bit raw midi
clock source = system clock via clock_gettime
loading driver ..
start poll on 3 fd's
new client: dummy_pcm, uuid = 8589934593 type 1 @ 0x801886000 fd = -1
creating dummy driver ... dummy_pcm|48000|1024|21333|2|2
new buffer size 1024
resizing port buffer segment for type 0, one buffer = 4096 bytes
resizing port buffer segment for type 1, one buffer = 2048 bytes
registered port system:capture_1, offset = 4096
registered port system:capture_2, offset = 8192
registered port system:playback_1, offset = 0
registered port system:playback_2, offset = 0
++ jack_sort_graph
Bus error


jackit-0.124.1_5
Name           : jackit
Version        : 0.124.1_5
Installed on   : Thu Mar  3 21:15:22 2016 GMT
Origin         : audio/jack
Architecture   : freebsd:11:x86:64
Prefix         : /usr/local
Categories     : audio
Licenses       : LGPL21 and GPLv2
Maintainer     : multimedia@FreeBSD.org
WWW            : http://jackaudio.org/
Comment        : Low latency audio server
Options        :
	ALSA           : off
	DOXYGEN        : off
	READLINE       : on
Shared Libs required:
	libcelt0.so.2
	libreadline.so.6
	libdb-5.3.so.0
	libsndfile.so.1
	libsamplerate.so.0
Shared Libs provided:
	libjack.so.0
	libjackserver.so.0
Annotations    :
	icon           : \"http://www.pcbsd.org/appcafe/icons/audio_jack.png\"
Flat size      : 866KiB
Description    :
JACK is a low latency audio server, written for POSIX-conformant operating
systems.  It can connect a number of different applications to an audio
device, as well as allowing them to share audio between themselves.  Its
clients can run in their own processes (i.e. as normal applications), or
can they can run within the JACK server (i.e. as a "plugin").

JACK was designed from the ground up for professional audio work, and its
design focuses on two key areas: synchronous execution of all clients, and
low latency operation.

WWW: http://jackaudio.org/
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2016-03-07 07:36:51 UTC
jackd v1.0 works fine under 9-stable userspace with 11-current kernel, so the problem is likely something in userspace. Can you get the backtrace of the crash from corefile using gdb?
Comment 2 Dan MacDonald 2016-03-16 16:55:49 UTC
Sorry about the late response. Your replies got filtered into my junk folder unfortunately.

I'll try and get a bt for you soon.
Comment 3 Dan MacDonald 2016-03-19 13:01:26 UTC
% gdb --args jackd -r -v -d dummy
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)...
(gdb) run
Starting program: /usr/local/bin/jackd -r -v -d dummy
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New LWP 101122]
(no debugging symbols found)...(no debugging symbols found)...jackd 0.124.1
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn 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

getting driver descriptor from /usr/local/lib/jack/jack_oss.so
[New Thread 801815000 (LWP 101122/jackd)]
(no debugging symbols found)...getting driver descriptor from /usr/local/lib/jack/jack_net.so
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...getting driver descriptor from /usr/local/lib/jack/jack_dummy.so
(no debugging symbols found)...JACK compiled with System V SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
registered builtin port type 8 bit raw midi
clock source = system clock via clock_gettime
loading driver ..
(no debugging symbols found)...start poll on 3 fd's
creating dummy driver ... dummy_pcm|48000|1024|21333|2|2
new client: dummy_pcm, uuid = 8589934593 type 1 @ 0x801880000 fd = -1
new buffer size 1024
resizing port buffer segment for type 0, one buffer = 4096 bytes
resizing port buffer segment for type 1, one buffer = 2048 bytes
registered port system:capture_1, offset = 4096
registered port system:capture_2, offset = 8192
registered port system:playback_2, offset = 0
++ jack_sort_graph

Program received signal SIGBUS, Bus error.
[Switching to Thread 801815000 (LWP 101122/jackd)]
0x000000080083c217 in jack_client_handle_latency_callback () from /usr/local/lib/libjackserver.so.0
(gdb) bt
#0  0x000000080083c217 in jack_client_handle_latency_callback () from /usr/local/lib/libjackserver.so.0
#1  0x0000000800834088 in jack_deliver_event () from /usr/local/lib/libjackserver.so.0
#2  0x00000008008348ec in jack_sort_graph () from /usr/local/lib/libjackserver.so.0
#3  0x0000000800834396 in jack_sort_graph () from /usr/local/lib/libjackserver.so.0
#4  0x0000000800837755 in jack_client_activate () from /usr/local/lib/libjackserver.so.0
#5  0x000000080082f41c in internal_client_request () from /usr/local/lib/libjackserver.so.0
#6  0x000000080082f090 in internal_client_request () from /usr/local/lib/libjackserver.so.0
#7  0x000000080083ee07 in jack_activate () from /usr/local/lib/libjackserver.so.0
#8  0x0000000801c012f2 in driver_finish () from /usr/local/lib/jack/jack_dummy.so
#9  0x000000080082ec6f in jack_engine_load_driver () from /usr/local/lib/libjackserver.so.0
#10 0x0000000000403970 in ?? ()
#11 0x000000000040222f in ?? ()
#12 0x0000000800627000 in ?? ()
#13 0x0000000000000000 in ?? ()
(gdb)
Comment 4 Dan MacDonald 2016-03-19 13:12:15 UTC
Hmmm, that prob wasn't much use was it?

Looks like I need to rebuild jack with debug enabled.
Comment 5 Dan MacDonald 2016-03-20 22:00:27 UTC
% gdb --args jackd -r -v -d dummy
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
(gdb) run
Starting program: /usr/local/bin/jackd -r -v -d dummy
[New LWP 101050]
jackd 0.124.1
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn 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

getting driver descriptor from /usr/local/lib/jack/jack_dummy.so
[New Thread 801815000 (LWP 101050/jackd)]
getting driver descriptor from /usr/local/lib/jack/jack_net.so
getting driver descriptor from /usr/local/lib/jack/jack_oss.so
JACK compiled with System V SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
registered builtin port type 8 bit raw midi
clock source = system clock via clock_gettime
loading driver ..
new client: dummy_pcm, uuid = 8589934593 type 1 @ 0x801878000 fd = -1
creating dummy driver ... dummy_pcm|48000|1024|21333|2|2
start poll on 3 fd's
new buffer size 1024
resizing port buffer segment for type 0, one buffer = 4096 bytes
resizing port buffer segment for type 1, one buffer = 2048 bytes
registered port system:capture_1, offset = 4096
registered port system:capture_2, offset = 8192
registered port system:playback_2, offset = 0
++ jack_sort_graph

Program received signal SIGBUS, Bus error.
[Switching to Thread 801815000 (LWP 101050/jackd)]
jack_client_handle_latency_callback (client=0x801883000, event=0x7fffffffd1a0, is_driver=1) at ../libjack/client.c:710
710		client->latency_cb ( mode, client->latency_cb_arg);
Current language:  auto; currently minimal
(gdb) bt
#0  jack_client_handle_latency_callback (client=0x801883000, event=0x7fffffffd1a0, is_driver=1) at ../libjack/client.c:710
#1  0x00000008008343f8 in jack_deliver_event (engine=0x80186a000, client=0x801877000, event=0x7fffffffd1a0) at engine.c:3014
#2  0x0000000800834d5c in jack_compute_new_latency (engine=0x80186a000) at engine.c:3509
#3  0x00000008008349d2 in jack_sort_graph (engine=0x80186a000) at engine.c:3568
#4  0x000000080083d0f5 in jack_client_activate (engine=0x80186a000, id=8589934593) at clientengine.c:999
#5  0x000000080083077b in do_request (engine=0x80186a000, req=0x7fffffffd720, reply_fd=0x0) at engine.c:1236
#6  0x000000080083062c in internal_client_request (ptr=0x80186a000, request=0x7fffffffd720) at engine.c:1388
#7  0x0000000800843357 in jack_client_deliver_request (client=0x801883000, req=0x7fffffffd720) at ../libjack/client.c:323
#8  0x000000080084762c in jack_activate (client=0x801883000) at ../libjack/client.c:2420
#9  0x0000000801c01808 in dummy_driver_attach (driver=0x801814300) at dummy_driver.c:321
#10 0x000000080084a18d in jack_driver_nt_attach (driver=0x801814300, engine=0x80186a000) at ../libjack/driver.c:90
#11 0x00000008008303d1 in jack_use_driver (engine=0x80186a000, driver=0x801814300) at engine.c:4244
#12 0x0000000800830136 in jack_engine_load_driver (engine=0x80186a000, driver_desc=0x801815500, driver_params=0x0) at engine.c:1036
#13 0x000000000040410b in jack_main (driver_desc=0x801815500, driver_params=0x0, slave_names=0x0, load_list=0x0) at jackd.c:314
#14 0x0000000000403237 in main (argc=5, argv=0x7fffffffe778) at jackd.c:1019
(gdb)
Comment 6 Joe Maloney 2016-05-15 23:08:49 UTC
I am also having this issue.  If I can provide anything to help fix it please let me know.
Comment 7 Michael Beer 2016-09-30 13:56:28 UTC
(In reply to Dan MacDonald from comment #0)
I had the same issue with some FreeBSD11-CURRENT version.
However the issue seems to be gone now in FreeBSD11-RELEASE.
Jack works for me again, for whatever reason!
Comment 8 Atsushi Hasumoto 2017-05-11 01:56:39 UTC
Hi,my name is Atsushi Hasumoto.
I use FreeBSD 11.0p10.
pkg install jackit.
jackd invoke error.


atsushi@localhost:~ % jackd -r -d oss
jackd 0.125.0
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn 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.
loading driver ..
oss_driver: /dev/dsp : 0x10/2/48000 (4096)
oss_driver: indevbuf 4096 B, outdevbuf 4096 B
oss_driver: not using barrier mode, (single thread)
OSS: read() failed: oss_driver.c@1010, count=-1/4096, errno=9
Comment 9 Hans Petter Selasky freebsd_committer freebsd_triage 2017-05-11 06:53:38 UTC
Does your audio device support both recording and playback. Else try only using on of -C and -P options.

--HPS
Comment 10 Atsushi Hasumoto 2017-05-11 10:07:46 UTC
>>Does your audio device support both recording and playback. Else try only using on of >>-C and -P options.

I'm sorry. I don't know device.
I use nvidia HDMI. 
but I use logicool headphone , works fine.

Thank you very much!

Do you know device (nvidia,HDMI) how to use?

cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0016) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0016) (HDMI/DP 8ch)> (play) default
pcm2: <NVIDIA (0x0016) (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA (0x0016) (HDMI/DP 8ch)> (play)
pcm4: <Realtek ALC887 (Rear Analog 7.1/2.0)> (play/rec)
pcm5: <Realtek ALC887 (Front Analog)> (play/rec)
pcm6: <Realtek ALC887 (Rear Digital)> (play)
pcm7: <Realtek ALC887 (Onboard Digital)> (play)
pcm8: <Intel Cougar Point (HDMI/DP 8ch)> (play)
pcm9: <USB audio> (play/rec)
No devices installed from userspace.
Comment 11 Hans Petter Selasky freebsd_committer freebsd_triage 2017-05-11 10:16:34 UTC
I think you need to specify an argument to jackd that it will not try to record from the HDMI connection, and then it will work.

--HPS
Comment 12 Dan MacDonald 2017-05-26 10:13:33 UTC
jack is still not working for me, under HEAD (FBSD12).

Even the dummy driver still gives me a bus error.
Comment 13 Dan MacDonald 2017-05-27 13:23:57 UTC
It looks like this could just be an issue with jack 0.124.1. I have just built jack 0.125 from ports under TrueOS and I can start JACK now.
Comment 14 Yuri Victorovich freebsd_committer freebsd_triage 2017-07-17 01:44:22 UTC
If this is still an issue, it works for me with arguments:
> -r -doss -r44100 -p1024 -n3 -w16 --capture /dev/dsp6 --playback /dev/dsp2

Otherwise, /var/log/jackd.log has an error log.