Discussion:
Bug#687182: program seg faults on armhs
Add Reply
Armin Wagner
2012-09-10 16:10:01 UTC
Reply
Permalink
Package: mpg321
Version: 0.2.13

The program crashed with a seg fault on armhs.

$ mpg321 --verbose audiotest_scelsi.mp3
[...]
Playing MPEG stream from audiotest_scelsi.mp3 ...
MPEG 1.0, Layer: III, Freq: 44100, mode: Stereo, modext: 0, BPF : 4480
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0.
Bitrate: 224 Kbits/s, Extension value: 0
Audio: 1:1 conversion, rate: 44100, encoding: signed 16 bit, channels: 2
Segmentation fault4], Time: 00:00.02 [03:11.59],

I'm running Ubuntu 12.04 with a PIO_ONLY kernel on an ARM hard-float device (beabglebone) with an attached USB-soundcard (Z305). I'm aware that the problem might be the result of my non-standard configuration and not of mpg321 itself.

However, I have to note that mp3 playback generally works with mpg123. I tested mpg321 version 0.2.13 and version 0.3.2. Both are segfaulting.
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Nanakos Chrysostomos
2012-09-10 19:10:01 UTC
Reply
Permalink
Hi,
can you please be more verbose?
Try to attach an strace log of the output please.

Regards,
Chris
Post by Armin Wagner
Package: mpg321
Version: 0.2.13
The program crashed with a seg fault on armhs.
$ mpg321 --verbose audiotest_scelsi.mp3
[...]
Playing MPEG stream from audiotest_scelsi.mp3 ...
MPEG 1.0, Layer: III, Freq: 44100, mode: Stereo, modext: 0, BPF : 4480
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0.
Bitrate: 224 Kbits/s, Extension value: 0
Audio: 1:1 conversion, rate: 44100, encoding: signed 16 bit, channels: 2
Segmentation fault4], Time: 00:00.02 [03:11.59],
I'm running Ubuntu 12.04 with a PIO_ONLY kernel on an ARM hard-float device (beabglebone) with an attached USB-soundcard (Z305). I'm aware that the problem might be the result of my non-standard configuration and not of mpg321 itself.
However, I have to note that mp3 playback generally works with mpg123. I tested mpg321 version 0.2.13 and version 0.3.2. Both are segfaulting.
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Nanakos Chrysostomos
2012-09-11 07:40:02 UTC
Reply
Permalink
Hello,
of course it helps. The problem seems to be the libmad library.
Can you please try madplay and if the same thing happens then surely
the problem is libmad. I don't have an armhs machine to make some
tests.
Hello,
Thank you for the fast reply. I'm not very experienced in debugging on
$ trace -o trace.txt mpg321 audiotest_scelsi.mp3
$ gdb 'mpg321' core
[�]
Reading symbols from /usr/bin/mpg321...(no debugging symbols
found)...done.
[New LWP 1175]
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/arm-linux-gnueabihf/libthread_db.so.1".
Core was generated by `mpg321 audiotest_scelsi.mp3'.
Program terminated with signal 11, Segmentation fault.
#0 0x4005a760 in mad_layer_III () from
/usr/lib/arm-linux-gnueabihf/libmad.so.0
disass 0x4005a760
$ sudo apt-cache show libmad0
Package: libmad0
Priority: optional
Section: libs
Installed-Size: 126
Original-Maintainer: Mad Maintainers
Architecture: armhf
Source: libmad
Version: 0.15.1b-7ubuntu1
Depends: libc6 (>= 2.4)
Pre-Depends: multiarch-support
Filename: pool/main/libm/libmad/libmad0_0.15.1b-7ubuntu1_armhf.deb
If the problem comes from libmad it would explain why mpg123 (mpglib) is
working okay.
https://bugs.launchpad.net/ubuntu/+source/libmad/+bug/989846
Regards,
Armin
Hi,
can you please be more verbose?
Try to attach an strace log of the output please.
Regards,
Chris
Post by Armin Wagner
Package: mpg321
Version: 0.2.13
The program crashed with a seg fault on armhs.
$ mpg321 --verbose audiotest_scelsi.mp3
[...]
Playing MPEG stream from audiotest_scelsi.mp3 ...
MPEG 1.0, Layer: III, Freq: 44100, mode: Stereo, modext: 0, BPF : 448
0
Post by Armin Wagner
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0.
Bitrate: 224 Kbits/s, Extension value: 0
Audio: 1:1 conversion, rate: 44100, encoding: signed 16 bit, channels: 2
Segmentation fault4], Time: 00:00.02 [03:11.59],
I'm running Ubuntu 12.04 with a PIO_ONLY kernel on an ARM hard-float
device (beabglebone) with an attached USB-soundcard (Z305). I'm aware
that the problem might be the result of my non-standard configuration
and not of mpg321 itself.
However, I have to note that mp3 playback generally works with mpg123.
I tested mpg321 version 0.2.13 and version 0.3.2. Both are segfaulting.
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
наб
2024-11-06 17:50:01 UTC
Reply
Permalink
Control: reassign -1 libmad0
After compiling libmad 0.15.1b myself everything works again.
The necessary steps are documented here: https://igw.tuwien.ac.at/ceat/node/2#comment-162
The site is dead so inlining
-- >8 --
compiling libmad and mpg321 (because of seg fault)

Unfortunately my favorite player (which I'm using as a workaround for the missing mp3 support in Py3k) keeps crashing with a seg fault (see debian bug #687182). Strace showed me that libmad might be the culprit here (compare: Ubuntu bug #989846 ) so I decided to deinstall all related packages and compile the 0.15.1b version myself. Some notes:

cc1: error: unrecognized command line option '-fforce-mem'

fforce-mem is a deprecated gcc optimization option (see: gcc 4.3 changes). I had to remove the corresponding line (optimize="$optimize -fforce-addr) in the configure file.

A few lines above the architecture gets selected. Here I inserted the following line:

armv7*) arch="-marm" ;;

If you don't do this you will get an "selected processor does not support Thumb mode" error (thanks to Nikolai for this hint) Afterwards I also used the configure --disable-aso parameter 
 just to be on the save side.

After successfully compiling libmad I compiled madplay. The "error: id3tag.h was not found" error made me install the libid3tag0-dev package.

And the mpg321 configuration stopped with the following message:

checking for snd_mixer_selem_get_playback_volume in -lasound... no
configure: error: "ALSA lib is required to compile mpg321."

Of course alsalib is installed, but the dev package is missing: sudo apt-get install libasound2-dev

Testing mpg321 brought up the following error: "ALSA lib confmisc.c:768:(parse_card) cannot find card '0'". I have to specify the audio device. aplay -l helps here:

**** List of PLAYBACK Hardware Devices ****
card 1: Z305 [ Logitech Z305], device 0: USB Audio [USB Audio]

mpg321 -o alsa -a hw:1,0 scelsi.mp3

It works. Finally.
-- >8 --

So this a libmad ARM baseline issue on the submitter's Beagleboard
(this is a Beagleboard forum).

Loading...