Bug#692562: jackd1: bus error on beagleboard
Samuel Casa
samuelcasa9 at gmail.com
Wed Nov 7 13:46:04 UTC 2012
Package: jackd1
Version: 1:0.121.3+20120418git75e3e20b-2.1
Severity: normal
dear maintainer,
when i try to start jackd the process causes a bus error on my arm system.
root at beagleboard:~# apt-get install jackd1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libjack0
Suggested packages:
jack-tools meterbridge
Recommended packages:
qjackctl
The following NEW packages will be installed:
jackd1 libjack0
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 352 kB of archives.
After this operation, 846 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.debian.org/debian/ wheezy/main libjack0 armhf
1:0.121.3+20120418git75e3e20b-2.1 [52.7 kB]
Get:2 http://ftp.debian.org/debian/ wheezy/main jackd1 armhf
1:0.121.3+20120418git75e3e20b-2.1 [299 kB]
Fetched 352 kB in 0s (476 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libjack0:armhf.
(Reading database ... 17035 files and directories currently installed.)
Unpacking libjack0:armhf (from
.../libjack0_1%3a0.121.3+20120418git75e3e20b-2.1_armhf.deb) ...
Selecting previously unselected package jackd1.
Unpacking jackd1 (from
.../jackd1_1%3a0.121.3+20120418git75e3e20b-2.1_armhf.deb) ...
Processing triggers for man-db ...
Setting up libjack0:armhf (1:0.121.3+20120418git75e3e20b-2.1) ...
Setting up jackd1 (1:0.121.3+20120418git75e3e20b-2.1) ...
real time? yes!
root at beagleboard:~# /usr/bin/jackd -v --realtime --realtime-priority
99 --port-max 64 --driver alsa --capture hw:0 --device hw:0 --duplex
--inchannels 2 --nperiods 8 --outchannels 2 --playback hw:0 --period
32 --rate 16000 --shorts
jackd 0.122.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
getting driver descriptor from /usr/lib/arm-linux-gnueabihf/jack/jack_oss.so
getting driver descriptor from /usr/lib/arm-linux-gnueabihf/jack/jack_net.so
getting driver descriptor from /usr/lib/arm-linux-gnueabihf/jack/jack_dummy.so
getting driver descriptor from /usr/lib/arm-linux-gnueabihf/jack/jack_alsa.so
JACK compiled with System V SHM support.
server `default' registered
loading driver ..
registered builtin port type 32 bit float mono audio
registered builtin port type 8 bit raw midi
clock source = system clock via clock_gettime
start poll on 3 fd's
new client: alsa_pcm, id = 1 type 1 @ 0x11749b0 fd = -1
apparent rate = 16000
creating alsa driver ... hw:0|hw:0|32|8|16000|2|2|nomon|swmeter|-|16bit
control device hw:0
configuring for 16000Hz, period = 32 frames (2.0 ms), buffer = 8 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 20 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 20 periods for playback
new buffer size 32
resizing port buffer segment for type 0, one buffer = 128 bytes
resizing port buffer segment for type 1, one buffer = 128 bytes
registered port system:capture_1, offset = 128
registered port system:capture_2, offset = 256
registered port system:playback_1, offset = 0
registered port system:playback_2, offset = 0
++ jack_sort_graph
++ jack_rechain_graph():
-- jack_rechain_graph()
-- jack_sort_graph
12368 waiting for signals
2012 Nov 7 09:02:21 beagleboard [153051.836120] Unhandled fault:
alignment exception (0x801) at 0x400fb1e6
Bus error
root at beagleboard:~# dmesg
...
[91362.478790] Alignment trap: not handling instruction edc67a06 at [<401b9af4>]
[91362.488769] Unhandled fault: alignment exception (0x801) at 0x400a01e6
root at beagleboard:~# strace /usr/bin/jackd -v --realtime
--realtime-priority 99 --port-max 64 --driver alsa --capture hw:0
--device hw:0 --duplex --inchannels 2 --nperiods 8 --outchannels 2
--playback hw:0 --period 32 --rate 16000 --shorts
...
stat64("/tmp/jack-0/default/jack-ack-fifo-12429-1", 0xbee10090) = -1
ENOENT (No such file or directory)
mknod("/tmp/jack-0/default/jack-ack-fifo-12429-1", S_IFIFO|0666) = 0
open("/tmp/jack-0/default/jack-ack-fifo-12429-1",
O_RDWR|O_CREAT|O_NONBLOCK, 0666) = 9
futex(0x4015360c, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x40153608,
{FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x401535e8, FUTEX_WAKE_PRIVATE, 1++ jack_sort_graph
) = 1
read(7, 0xbee11124, 16) = -1 EAGAIN (Resource
temporarily unavailable)
read(9, 0xbee11124, 16) = -1 EAGAIN (Resource
temporarily unavailable)
futex(0x4015360c, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x40153608,
{FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x401535e8, FUTEX_WAKE_PRIVATE, 1++ jack_rechain_graph():
) = 1
futex(0x4015360c, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x40153608,
{FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x401535e8, FUTEX_WAKE_PRIVATE, 1-- jack_rechain_graph()
) = 1
futex(0x4015360c, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x40153608,
{FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x401535e8, FUTEX_WAKE_PRIVATE, 1-- jack_sort_graph
) = 1
sched_get_priority_max(SCHED_FIFO) = 99
mmap2(NULL, 524288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x414e6000
mprotect(0x414e6000, 4096, PROT_NONE) = 0
clone(child_stack=0x41564fa8,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID,
parent_tidptr=0x415654d8, tls=0x41565930, child_tidptr=0x415654d8) =
12432
sched_setscheduler(12432, SCHED_OTHER, { 0 }) = 0
futex(0x41565684, FUTEX_WAKE_PRIVATE, 1) = 1
mmap2(NULL, 524288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x415cc000
mprotect(0x415cc000, 4096, PROT_NONE) = 0
clone(child_stack=0x4164afa8,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID,
parent_tidptr=0x4164b4d8, tls=0x4164b930, child_tidptr=0x4164b4d8) =
12433
sched_setscheduler(12433, SCHED_OTHER, { 0 }) = 0
futex(0x4164b684, FUTEX_WAKE_PRIVATE, 1) = 1
ioctl(10, 0x4140, 0x4138a000) = 0
ioctl(10, 0xc0844123, 0x1b7d868) = 0
ioctl(10, 0xc0844123, 0x1b7d868) = 0
ioctl(10, 0xc0844123, 0x1b7d868) = 0
ioctl(10, 0xc0844123, 0x1b7d868) = 0
ioctl(10, 0x4142, 0x1b7d868) = 0
futex(0x1b7cc78, FUTEX_WAKE_PRIVATE, 1) = 1
rt_sigaction(SIGHUP, {0xa871, ~[RTMIN RT_1],
SA_RESTART|SA_RESETHAND|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGINT, {0xa871, ~[RTMIN RT_1],
SA_RESTART|SA_RESETHAND|0x4000000}, 2012 Nov 7 09:03:28 beagleboardHF
[153118.296173] Unhandled fault: alignment exception (0x801) at
0x400481e6
<unfinished ...>
+++ killed by SIGBUS +++
Bus error
was able to fix it with modified compiler flags:
root at beagleboard:/mnt/fast_disk/jack_build/jackd# apt-get source jackd1
root at beagleboard:/mnt/fast_disk/jack_build/jackd# apt-get build-dep jackd1
root at beagleboard:/mnt/fast_disk/jack_build/jackd# dpkg-source -x
jack-audio-connection-kit_0.121.3+20120418git75e3e20b-2.1.dsc
modifications (hack) in configure.ac, cflags:
JACK_OPT_CFLAGS="-O0 -mcpu=cortex-a8"
my compiler flags:
| Compiler full flags................................... : -g -O2
-fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -Wall -I$(top_srcdir)/config -I$(top_srcdir)
-I$(top_srcdir) -I$(top_srcdir)/include -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -Wall -g -O0 -mcpu=cortex-a8
default compiler flags from configure:
| Compiler full flags................................... : -g -O2
-fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -Wall -I$(top_srcdir)/config -I$(top_srcdir)
-I$(top_srcdir) -I$(top_srcdir)/include -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -Wall -g
root at beagleboard:/mnt/fast_disk/jack_build/jackd/jack-audio-connection-kit-0.121.3+20120418git75e3e20b#
dpkg-source --commit
root at beagleboard:/mnt/fast_disk/jack_build/jackd/jack-audio-connection-kit-0.121.3+20120418git75e3e20b#
dpkg-buildpackage -j2 -us -uc
root at beagleboard:/mnt/fast_disk/jack_build/jackd# dpkg -i
libjack0_0.121.3+20120418git75e3e20b-2.1_armhf.deb
jackd1_0.121.3+20120418git75e3e20b-2.1_armhf.deb
/usr/bin/jackd --realtime --realtime-priority 99 --port-max 64
--driver alsa --capture hw:0 --device hw:0 --duplex --inchannels 2
--nperiods 8 --outchannels 2 --playback hw:0 --period 32 --rate 16000
--shorts
root at beagleboard:/mnt/fast_disk/jack_build/jackd# ps aux | grep jackd
root 13405 24.8 4.1 20732 20492 ? SLsl 11:31 0:07
/usr/bin/jackd --realtime --realtime-priority 99 --port-max 64
--driver alsa --capture hw:0 --device hw:0 --duplex --inchannels 2
--nperiods 8 --outchannels 2 --playback hw:0 --period 32 --rate 16000
--shorts
root 13490 0.0 0.1 1592 564 pts/2 S+ 11:32 0:00 grep jackd
root at beagleboard:/mnt/fast_disk/jack_build/jackd# jack_lsp
system:capture_1
system:capture_2
system:playback_1
system:playback_2
works!
i tried jff to compile with other cflags:
* -O3 -pipe -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon
-ftree-vectorize -mfloat-abi=hard -ffast-math
-fsingle-precision-constant -> does not work, bus error
* -O0 -mcpu=cortex-a8 -mfpu=neon -> does not work, bus error
...
seems as the compiler does not optimize proper for the cortex a8 /
neon in this case / version.
i have to check my flags again to confirm this.
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: armhf (armv7l)
Kernel: Linux 3.0.17+
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
Versions of packages jackd1 depends on:
ii coreutils 8.13-3.2
ii debconf [debconf-2.0] 1.5.46
ii libasound2 1.0.25-4
ii libc6 2.13-35
ii libgcc1 1:4.7.1-7
ii libjack0 1:0.121.3+20120418git75e3e20b-2.1
ii libreadline6 6.2-8+b1
ii libsamplerate0 0.1.8-5
ii libsndfile1 1.0.25-5
ii multiarch-support 2.13-35
Versions of packages jackd1 recommends:
ii libpam-modules 1.1.3-7.1
pn qjackctl <none>
Versions of packages jackd1 suggests:
pn jack-tools <none>
pn meterbridge <none>
-- debconf information:
* jackd/tweak_rt_limits: true
beagleboard xm, debian wheezy (debootstrap, armhf port)
root at beagleboard:~# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian
4.6.3-11' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --enable-plugin --enable-objc-gc
--disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16
--with-float=hard --with-mode=thumb --enable-checking=release
--build=arm-linux-gnueabihf --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-11)
best
More information about the pkg-multimedia-maintainers
mailing list