Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 470 - All demo apps included with media-libs/smpeg segfault
Summary: All demo apps included with media-libs/smpeg segfault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-31 17:49 UTC by Ben Beuchler
Modified: 2003-02-04 19:42 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Beuchler 2002-01-31 17:49:01 UTC
The mpeg players included with media-libs/smpeg segfault upon startup.
Comment 1 Ben Beuchler 2002-01-31 17:57:57 UTC
I suppose I should be a bit more specific:
glmovie and plaympeg are the apps I've tested.  They all segfault immediately 
on startup.  I'm running a fresh r14 install.
Comment 2 Daniel Robbins (RETIRED) gentoo-dev 2002-02-01 15:31:16 UTC
can you do an strace on them and see where they're segfaulting?
Comment 3 Ben Beuchler 2002-02-01 16:50:49 UTC
STRACE OF PLAYMPEG:

execve("/usr/bin/plaympeg", ["plaympeg"], [/* 30 vars */]) = 0
brk(0)                                  = 0x804cddc
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0x40016000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or 
directory)
open("/usr/lib/i686/mmx/libsmpeg-0.4.so.0", O_RDONLY) = -1 ENOENT (No such 
file or directory)
stat64("/usr/lib/i686/mmx", 0xbfffefd4) = -1 ENOENT (No such file or 
directory)
open("/usr/lib/i686/libsmpeg-0.4.so.0", O_RDONLY) = -1 ENOENT (No such file 
or directory)
stat64("/usr/lib/i686", 0xbfffefd4)     = -1 ENOENT (No such file or 
directory)
open("/usr/lib/mmx/libsmpeg-0.4.so.0", O_RDONLY) = -1 ENOENT (No such file 
or directory)
stat64("/usr/lib/mmx", 0xbfffefd4)      = -1 ENOENT (No such file or 
directory)
open("/usr/lib/libsmpeg-0.4.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\215"..., 1024) 
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=278244, ...}) = 0
old_mmap(NULL, 394296, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40017000
mprotect(0x40057000, 132152, PROT_NONE) = 0
old_mmap(0x40057000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x3f000) = 0x40057000
old_mmap(0x4005b000, 115768, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4005b000
close(3)                                = 0
open("/usr/lib/libSDL-1.2.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\320"..., 1024) 
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=345352, ...}) = 0
old_mmap(NULL, 379436, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40078000
mprotect(0x400ca000, 43564, PROT_NONE)  = 0
old_mmap(0x400ca000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x51000) = 0x400ca000
old_mmap(0x400cc000, 35372, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400cc000
close(3)                                = 0
open("/usr/lib/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=25358, ...}) = 0
old_mmap(NULL, 25358, PROT_READ, MAP_PRIVATE, 3, 0) = 0x400d5000
close(3)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000D\0\000"..., 
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=84512, ...}) = 0
old_mmap(NULL, 85496, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400dc000
mprotect(0x400e9000, 32248, PROT_NONE)  = 0
old_mmap(0x400ea000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0xd000) = 0x400ea000
close(3)                                = 0
open("/usr/lib/libm.so.6", O_RDONLY)    = -1 ENOENT (No such file or 
directory)
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`7\0\000"..., 1024) 
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=149532, ...}) = 0
old_mmap(NULL, 136308, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400f1000
mprotect(0x40112000, 1140, PROT_NONE)   = 0
old_mmap(0x40112000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x20000) = 0x40112000
close(3)                                = 0
open("/usr/lib/libc.so.6", O_RDONLY)    = -1 ENOENT (No such file or 
directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\370\223"..., 1024) 
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1267976, ...}) = 0
old_mmap(NULL, 1225540, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40113000
mprotect(0x40234000, 41796, PROT_NONE)  = 0
old_mmap(0x40234000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x120000) = 0x40234000
old_mmap(0x4023b000, 13124, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4023b000
close(3)                                = 0
open("/usr/lib/libasound.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 M\0\000"..., 1024) 
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=98920, ...}) = 0
old_mmap(NULL, 99952, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4023f000
mprotect(0x40256000, 5744, PROT_NONE)   = 0
old_mmap(0x40256000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x16000) = 0x40256000
close(3)                                = 0
open("/usr/lib/libesd.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@ \0\000"..., 1024) 
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=30780, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0x40258000
old_mmap(NULL, 33664, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40259000
mprotect(0x40260000, 4992, PROT_NONE)   = 0
old_mmap(0x40260000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x6000) = 0x40260000
close(3)                                = 0
open("/usr/lib/libaudiofile.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20z\0\000"..., 
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=136548, ...}) = 0
old_mmap(NULL, 137288, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40262000
mprotect(0x40281000, 10312, PROT_NONE)  = 0
old_mmap(0x40281000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x1e000) = 0x40281000
close(3)                                = 0
open("/usr/lib/libX11.so.6", O_RDONLY)  = -1 ENOENT (No such file or 
directory)
open("/usr/lib/libX11.so.6", O_RDONLY)  = -1 ENOENT (No such file or 
directory)
open("/usr/X11R6/lib/libX11.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\n\1"..., 1024) = 
1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=833588, ...}) = 0
old_mmap(NULL, 815544, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40284000
mprotect(0x40348000, 12728, PROT_NONE)  = 0
old_mmap(0x40348000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0xc3000) = 0x40348000
old_mmap(0x4034b000, 440, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4034b000
close(3)                                = 0
open("/usr/lib/libXext.so.6", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/usr/lib/libXext.so.6", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/usr/X11R6/lib/libXext.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220(\0"..., 1024) = 
1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=58596, ...}) = 0
old_mmap(NULL, 60668, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4034c000
mprotect(0x4035a000, 3324, PROT_NONE)   = 0
old_mmap(0x4035a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0xd000) = 0x4035a000
close(3)                                = 0
open("/usr/lib/libdl.so.2", O_RDONLY)   = -1 ENOENT (No such file or 
directory)
open("/usr/lib/libdl.so.2", O_RDONLY)   = -1 ENOENT (No such file or 
directory)
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\34\34\0"..., 1024) 
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=10192, ...}) = 0
old_mmap(NULL, 12252, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4035b000
mprotect(0x4035d000, 4060, PROT_NONE)   = 0
old_mmap(0x4035d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x1000) = 0x4035d000
close(3)                                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0x4035e000
mprotect(0x40078000, 335872, PROT_READ|PROT_WRITE) = 0
mprotect(0x40078000, 335872, PROT_READ|PROT_EXEC) = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
Comment 4 Daniel Robbins (RETIRED) gentoo-dev 2002-02-01 19:30:16 UTC
Try some of the sample mpegs from http://portablehole.net/~jano/fridge/  These
mpegs worked fine, but if you give glmovie an invalid mpeg it seems to segfault.
Comment 5 Ben Beuchler 2002-02-02 00:44:47 UTC
Sorry.  Still segfaults.  plaympeg (which was my most reliable mpg player on Slackware) 
segfaults even without any arguments.  It's supposed to display usage info.  Strace output shows 
that it doesn't even get to the point of opening the .mpg file before it segfaults...
Comment 6 Daniel Robbins (RETIRED) gentoo-dev 2002-02-02 11:39:12 UTC
ok, try an "ltrace" (dev-util/ltrace) and see if that gives us more info.
Comment 7 Ben Beuchler 2002-02-02 12:41:46 UTC
OK.  This one's just funny:

insyte@petra insyte $ ltrace plaympeg
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
insyte@petra insyte $ ltrace plaympeg xd.mpg
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

Adding the -S flag to trace system calls returns output pretty much identical 
to strace.

Am I to understand that plaympeg/glmovie are working fine during your tests?  
This is a vanilla install of Gentoo r14...
Comment 8 Ben Beuchler 2002-02-02 12:51:02 UTC
For what it's worth:

petra root # ldd /usr/bin/plaympeg
        libsmpeg-0.4.so.0 => /usr/lib/libsmpeg-0.4.so.0 (0x40017000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x40078000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x400dc000)
        libm.so.6 => /lib/libm.so.6 (0x400f1000)
        libc.so.6 => /lib/libc.so.6 (0x40113000)
        libasound.so.1 => /usr/lib/libasound.so.1 (0x4023f000)
        libesd.so.0 => /usr/lib/libesd.so.0 (0x40259000)
        libaudiofile.so.0 => /usr/lib/libaudiofile.so.0 (0x40262000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40284000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x4034c000)
        libdl.so.2 => /lib/libdl.so.2 (0x4035b000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Comment 9 Daniel Robbins (RETIRED) gentoo-dev 2002-02-02 13:00:17 UTC
Are any other SDL-based apps working ok?  What version of libSDL
(media-libs/libsdl) do you have installed?  You might want to try rebuilding
libsdl and smpeg with fewer USE options defined (try turning off esd and alsa in
particular.)  

# ldd /usr/bin/plaympeg 
        libsmpeg-0.4.so.0 => /usr/lib/libsmpeg-0.4.so.0 (0x40017000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x40076000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x400da000)
        libm.so.6 => /lib/libm.so.6 (0x400ef000)
        libc.so.6 => /lib/libc.so.6 (0x40111000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4023d000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40306000)
        libdl.so.2 => /lib/libdl.so.2 (0x40315000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


Comment 10 Ben Beuchler 2002-02-02 13:27:29 UTC
Latest versions of both libsdl and smpeg:
libsdl-1.2.3
smpeg-0.4.4-r1

I just rebuilt without alsa or esd, and it still segfaults immediately:
insyte@petra insyte $ ldd /usr/bin/plaympeg
        libsmpeg-0.4.so.0 => /usr/lib/libsmpeg-0.4.so.0 (0x40017000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x40078000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x400da000)
        libm.so.6 => /lib/libm.so.6 (0x400ef000)
        libc.so.6 => /lib/libc.so.6 (0x40111000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4023d000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40306000)
        libaa.so.1 => /usr/lib/libaa.so.1 (0x40315000)
        libdl.so.2 => /lib/libdl.so.2 (0x40330000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
        libncurses.so.5 => /lib/libncurses.so.5 (0x40333000)
        libgpm.so.1 => /usr/lib/libgpm.so.1 (0x4037a000)

Tuxracer and gltron both link against libSDL and they're working fine.  I 
couldn't find any other ebuilds to try that list smpeg as a requirement, aside 
from smpeg-xmms, which another person has already reported as segfaulting on 
startup.  Oh, and pygame.  But I don't think that would be exceptionally useful 
as a testcase.
Comment 11 Daniel Robbins (RETIRED) gentoo-dev 2002-02-02 14:02:45 UTC
Try recompiling libsdl and smpeg with these USE settings:

USE="gnome gtk slang readline gpm berkdb gdbm tcpd pam libwww ssl X
nls mitshm perl python gif sdl vorbis ogg opengl mozilla"
Comment 12 Ben Beuchler 2002-02-02 15:27:55 UTC
That did it!  I'll do some experimenting later today and see if I can figure out exactly which of my 
$USE settings was causing problems.  But on the off chance that you can spot the culprit, here's 
what I've been using:

USE="readline gpm berkdb gdbm pam libwww ssl nls mitshm python gif sdl 
vorbis ogg gtk X qt opengl mozilla objprelink mmx tex aalib sse"

I had been using esd and alsa 
as well, but I removed those earlier per your recommendation.
Comment 13 Ben Beuchler 2002-02-02 15:43:22 UTC
It appears that media-libs/smpeg does NOT like --enable-mmx.  I removed 'mmx' from my $USE and it 
works great!  Thanks for the help.  For what it's worth, I was building this stuff on a Dell Inspiron 
8100, with a 1GHz PIII, so it certainly *should* support MMX.  Sounds like an smpeg bug.  I'd be 
curious to see if anyone can reproduce it.
Comment 14 Ben Beuchler 2002-02-02 15:45:48 UTC
Now I feel like an idiot.  Another bug discussing the xmms-smpeg plugin mentioned the same thing: 
smpeg crashes when given --enable-xmms.  Perhaps it would be a good idea to remove it from the 
.ebuild...  ;-)
Comment 15 Martin Schlemmer (RETIRED) gentoo-dev 2002-02-02 17:08:56 UTC
Hope drobbins dont mind me fixing, but I had the same problem ;)
Should be fixed in smpeg-0.4.4-r2.