Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113857 - media-video/mplayer-1.0_pre7-r1 mp3 playback crashes on alpha (fix attached)
Summary: media-video/mplayer-1.0_pre7-r1 mp3 playback crashes on alpha (fix attached)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Alpha Linux
: High major (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-28 17:24 UTC by Thomas Cort (RETIRED)
Modified: 2006-03-03 04:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Adds -mieee to CFLAGS on alpha (mplayer-1.0_pre7-r1.ebuild.patch,386 bytes, patch)
2005-11-28 17:25 UTC, Thomas Cort (RETIRED)
Details | Diff
patches mplayer's configure script to add -mieee to alpha CFLAGS (mplayer-1.0_pre7-alpha.patch,341 bytes, patch)
2005-11-29 05:21 UTC, Thomas Cort (RETIRED)
Details | Diff
Patches mplayer's ebuild to apply alpha patch (mplayer-1.0_pre7-r1.ebuild.patch,475 bytes, patch)
2005-11-29 05:22 UTC, Thomas Cort (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Cort (RETIRED) gentoo-dev 2005-11-28 17:24:28 UTC
media-video/mplayer-1.0_pre7-r1 plays wav and ogg files without a problem, but
crashes when attempting to play mp3 files. I re-compiled mplayer with
USE="debug" and ran it in gdb. Output below:



tcort@pan ~ $ gdb mplayer
GNU gdb 6.3
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 "alpha-unknown-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) run /exports/music/Raffi_-_Bananaphone.mp3
Starting program: /usr/bin/mplayer /exports/music/Raffi_-_Bananaphone.mp3
[Thread debugging using libthread_db enabled]
[New Thread 2199023420624 (LWP 27771)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/share/locale

MPlayer 1.0pre7try2-3.3.5 (C) 2000-2005 MPlayer Team
CPU: Digital Alpha


85 audio & 196 video codecs
Playing /exports/music/Raffi_-_Bananaphone.mp3.
Cache fill:  0.00% (0 bytes)    Audio file detected.
Clip info:
 Title: Bananaphone
 Artist: Raffi
 Album: Bananaphone
 Year:
 Comment:
 Track: 1
 Genre: Unknown
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 2199023420624 (LWP 27771)]
0x0000000120155d7c in demux_audio_fill_buffer (ds=0x120726b30) at demuxer.h:218
218     demuxer.h: No such file or directory.
        in demuxer.h
(gdb) quit
The program is running.  Exit anyway? (y or n) y



As you can see, there was a SIGFPE (floating-point exception). This is because
the media-video/mplayer-1.0_pre7-r1 ebuild unsets CFLAGS and CXXFLAGS (unless
USE="custom-cflags"). However, the alpha architecture needs CFLAGS="-mieee" to
do some (maybe all?) floating-point operations.

Quote from the -mieee section of the gcc-3.3.5 man page:
"The Alpha architecture implements floating-point hardware optimized
for maximum performance.  It is mostly compliant with the IEEE
floating point standard.  However, for full compliance, software
assistance is required.  This option generates code fully IEEE com-
pliant code except that the inexact-flag is not maintained (see
below).  If this option is turned on, the preprocessor macro
"_IEEE_FP" is defined during compilation.  The resulting code is
less efficient but is able to correctly support denormalized num-
bers and exceptional IEEE values such as not-a-number and
plus/minus infinity.  Other Alpha compilers call this option
-ieee_with_no_inexact."

I patched the ebuild to append-flags "-mieee" if use alpha, and mp3 playback
works fine. The patch will be attached to this bug.

Reproducible: Always
Steps to Reproduce:
1. mplayer anymp3.mp3

Actual Results:  
See gdb output above.

Expected Results:  
The music should have played.

Portage 2.0.51.22-r3 (default-linux/alpha/2005.0, gcc-3.3.5,
glibc-2.3.4.20041102-r1, 2.6.15-rc2-git4 alpha)
=================================================================
System uname: 2.6.15-rc2-git4 alpha EV56
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="alpha"
AUTOCLEAN="yes"
CBUILD="alpha-unknown-linux-gnu"
CFLAGS="-mieee -O2 -mcpu=ev56 -pipe"
CHOST="alpha-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mieee -O2 -mcpu=ev56 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://cs.ubishops.ca/pub/gentoo
http://mirror.arcticnetwork.ca/pub/gentoo/ http://adelie.polymtl.ca/
http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.arcticnetwork.ca/pub/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.ca.gentoo.org/gentoo-portage"
USE="alpha X aac aim alsa arts audiofile berkdb bitmap-fonts bzip2 crypt cups
curl eds encode esd exif expat fam flac font-server foomaticdb gd gdbm gif glut
gmp gnome gpm gstreamer gtk gtk2 icq imlib jabber jpeg kde lcms libg++ libwww
lua mad mhash mikmod mng motif mozilla mp3 mpeg msn nas ncurses nls nocd nptl
nptlonly offensive ogg oggvorbis openal opengl oscar oss pam pcre pdflib perl
png python qt quicktime readline sdl shorten sndfile spell ssl tcpd tiff
truetype truetype-fonts type1-fonts udev vorbis xml2 xmms xv xvid yahoo zlib
linguas_en userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL
Comment 1 Thomas Cort (RETIRED) gentoo-dev 2005-11-28 17:25:57 UTC
Created attachment 73770 [details, diff]
Adds -mieee to CFLAGS on alpha
Comment 2 Luca Barbato gentoo-dev 2005-11-29 00:31:01 UTC
I'd put it directly in the standard mplayer cflags since I expect this issue not
gentoo specific, isn't it?
Comment 3 Thomas Cort (RETIRED) gentoo-dev 2005-11-29 05:21:28 UTC
Created attachment 73791 [details, diff]
patches mplayer's configure script to add -mieee to alpha CFLAGS
Comment 4 Thomas Cort (RETIRED) gentoo-dev 2005-11-29 05:22:41 UTC
Created attachment 73792 [details, diff]
Patches mplayer's ebuild to apply alpha patch
Comment 5 Thomas Cort (RETIRED) gentoo-dev 2005-11-29 06:54:53 UTC
Submitted bug upstream
http://marc.theaimsgroup.com/?l=mplayer-dev-eng&m=113327102802667&w=1

Guillaume Poirier replied and will commit to CVS during the week.
Comment 6 Thomas Cort (RETIRED) gentoo-dev 2005-12-01 19:54:42 UTC
A status update...

The mplayer devs believe that this segfault is fixed in CVS. However none of
them can cite the specific problem that caused the segfault, why adding -mieee
fixed the problem, when it was patched, or where the patch is. Unfortunately, I
cannot test the CVS version because the CVS version requires a new version of
ffmpeg which doesn't compile on my alpha system. Even when passing mplayer's
configure script --disable's for all options it still requires ffmpeg.

It should be noted that -mieee does cause a performance hit ( around 5%
according to http://skarpsey.dyndns.org/alpha-lfs/#mieee ). However, it is
either take the 5% performance hit, or live with not being able to listen to
mp3s and perhaps other formats that I didn't test.
Comment 7 Luca Barbato gentoo-dev 2005-12-03 00:27:46 UTC
ok, then we must fist fix ffmpeg and then move to a newer mplayer (I told that
weeks ago and for a reason or another I couldn't manage to snapshot it properly)
Comment 8 Thomas Cort (RETIRED) gentoo-dev 2005-12-17 09:44:22 UTC
I emerged media-video/ffmpeg-0.4.9_p20051216 today and built manually the CVS version of mplayer. mp3 playback with today's CVS co of mplayer's code works without crashing on my alpha. I compiled it without the -mieee cflag, so the problem in this bug is indeed fixed in mplayer's CVS.
Comment 9 Luca Barbato gentoo-dev 2005-12-17 10:55:57 UTC
hopefully I'll either provide an updated snapshot or we'll get a new upstream release soon
Comment 10 Thomas Cort (RETIRED) gentoo-dev 2006-03-03 04:30:39 UTC
MP3 playback works fine with the new snapshot media-video/mplayer-1.0.20060302.