[MPlayer-users] Re: bugreport-segmentation fault in getcpuspeed - update

Andreas Markmann andreas.markmann at tc.pci.uni-heidelberg.de
Tue Mar 9 15:02:44 CET 2004


Hello all,

My recent bugreport contained an error, so here's the corrected version:

---  correction  ---
I have checked the list of known bugs now and haven't found this particular 
one in it.
---  end correction  ---

The problem I have has been present in all 1.0 prereleases and is still in the 
current CVS (as of 3rd March 2004).

After ./configure with --enable-gui --enable-largefiles 
--with-win32libdir=/usr/local/win32/ (where I installed the win32 codecs from 
the mplayer webpage) and make, mplayer crashes with a segmentation fault.
(Calling mplayer without options, should just display help screen.)
The same happens when calling mplayer with options for playing a movie.

MPlayer 0.92 works fine for me.

I have an Athlon slot A 650MHz single processor running under SuSE 8.1 updated 
with vanilla 2.4.20 kernel.
---  correction  ---
I am using the _notsc_ kernel option because I have a Via motherboard which
---  end correction  ---
otherwise causes the time to jump (sometimes for whole hours) with the 2.4 
kernels.

The problem seems to be in getcpuspeed() in cpudetect.c (I am no expert on 
system-near programming), so maybe the info in the previous sentence is 
particularly relevant.

---  correction  ---
I am adding a text dump of the bugreport since from viewing some user list 
messages I have the feeling that this is the done thing here.
---  end correction  ---

Thank you for your attention,
Andreas

=======================================================================
search for "gdb" if you want to jump straight to the error message
===  system info ===========================================
System:
SuSE 8.1
$ uname -a
Linux linux 2.4.20 #1 Sun Jun 22 17:16:27 CEST 2003 i686 unknown
$ #kernel launched with notsc option

$ ls -l /lib/libc[.-]*
-rwxr-xr-x    1 root     root      1312470 2002-09-10 18:51 /lib/libc.so.6
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.2/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr 
--with-local-prefix=/usr/local --infodir=/usr/share/info 
--mandir=/usr/share/man --libdir=/usr/lib 
--enable-languages=c,c++,f77,objc,java,ada --enable-libgcj 
--with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib 
--with-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.2
$ ld -v
GNU ld version 2.12.90.0.15 20020717 (SuSE)
$ as --version
GNU assembler 2.12.90.0.15 20020717 (SuSE)
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `i486-suse-linux'.
$ cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 2
model name      : AMD Athlon(tm) Processor
stepping        : 1
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow
bogomips        : 650.44
Video:
Elsa Nvidia GeForce 256 SDR
Sound:
SbLive value, no special drivers (SuSE auto install)
# lspci -vv
00:00.0 Host bridge: VIA Technologies, Inc. VT8371 [KX133] (rev 02)
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort+ >SERR- <PERR-
        Latency: 0
        Region 0: Memory at d8000000 (32-bit, prefetchable) [size=64M]
        Capabilities: [a0] AGP version 2.0
                Status: RQ=31 SBA+ 64bit- FW- Rate=x1,x2,x4
                Command: RQ=0 SBA- AGP+ 64bit- FW- Rate=x4

00:01.0 PCI bridge: VIA Technologies, Inc. VT8371 [KX133 AGP] (prog-if 00 
[Normal decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort+ >SERR- <PERR-
        Latency: 0
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
        Memory behind bridge: dc000000-ddffffff
        Prefetchable memory behind bridge: d0000000-d7ffffff
        BridgeCtl: Parity- SERR- NoISA+ VGA+ MAbort- >Reset- FastB2B-
        Capabilities: [80] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 
21)
        Subsystem: VIA Technologies, Inc. VT82C686/A PCI to ISA Bridge
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping+ SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 0

00:07.1 IDE interface: VIA Technologies, Inc. VT82C586B PIPC Bus Master IDE 
(rev 10) (prog-if 8a [Master SecP PriP])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32
        Region 4: I/O ports at d000 [size=16]
        Capabilities: [c0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:07.2 USB Controller: VIA Technologies, Inc. USB (rev 10) (prog-if 00 
[UHCI])
        Subsystem: VIA Technologies, Inc. (Wrong ID) USB Controller
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32, cache line size 08
        Interrupt: pin D routed to IRQ 9
        Region 4: I/O ports at d400 [size=32]
        Capabilities: [80] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:07.4 Host bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 
30)
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
        Capabilities: [68] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:07.6 Communication controller: VIA Technologies, Inc. AC97 Modem Controller 
(rev 20)
        Subsystem: SILICON Laboratories: Unknown device 4c21
        Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin C routed to IRQ 11
        Region 0: I/O ports at dc00 [size=256]
        Capabilities: [d0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:08.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture 
(rev 11)
        Subsystem: Hauppauge computer works Inc. WinTV/GO
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (4000ns min, 10000ns max)
        Interrupt: pin A routed to IRQ 10
        Region 0: Memory at df002000 (32-bit, prefetchable) [size=4K]
        Capabilities: [44] Vital Product Data
        Capabilities: [4c] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:08.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 
11)
        Subsystem: Hauppauge computer works Inc. WinTV/GO
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (1000ns min, 63750ns max)
        Interrupt: pin A routed to IRQ 10
        Region 0: Memory at df000000 (32-bit, prefetchable) [size=4K]
        Capabilities: [44] Vital Product Data
        Capabilities: [4c] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:09.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 06)
        Subsystem: Creative Labs CT4832 SBLive! Value
        Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (500ns min, 5000ns max)
        Interrupt: pin A routed to IRQ 5
        Region 0: I/O ports at e000 [size=32]
        Capabilities: [dc] Power Management version 1
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:09.1 Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 
06)
        Subsystem: Creative Labs Gameport Joystick
        Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32
        Region 0: I/O ports at e400 [size=8]
        Capabilities: [dc] Power Management version 1
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. 
RTL-8139/8139C/8139C+ (rev 10)
        Subsystem: Realtek Semiconductor Co., Ltd. RT8139
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (8000ns min, 16000ns max)
        Interrupt: pin A routed to IRQ 11
        Region 0: I/O ports at e800 [size=256]
        Region 1: Memory at df001000 (32-bit, non-prefetchable) [size=256]
        Expansion ROM at <unassigned> [disabled] [size=64K]
        Capabilities: [50] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA 
PME(D0-,D1+,D2+,D3hot+,D3cold+)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

01:00.0 VGA compatible controller: nVidia Corporation NV10 [GeForce 256 SDR] 
(rev 10) (prog-if 00 [VGA])
        Subsystem: Elsa AG: Unknown device 0c41
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
        Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 248 (1250ns min, 250ns max)
        Interrupt: pin A routed to IRQ 10
        Region 0: Memory at dc000000 (32-bit, non-prefetchable) [size=16M]
        Region 1: Memory at d0000000 (32-bit, prefetchable) [size=128M]
        Expansion ROM at <unassigned> [disabled] [size=64K]
        Capabilities: [60] Power Management version 1
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [44] AGP version 2.0
                Status: RQ=31 SBA+ 64bit- FW+ Rate=x1,x2,x4
                Command: RQ=31 SBA- AGP+ 64bit- FW- Rate=x4


===  w/o  --enable-debug=3  ================================
gdb ./mplayer
0x0807ad07 in GetCpuFriendlyName ()
===  with --enable-debug=3  ================================
gdb ./mplayer
(gdb) r
Starting program: /lindata/rpms/mplayer/main/mplayer
[New Thread 1024 (LWP 10184)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale

MPlayer dev-CVS-040302-13:37-3.2 (C) 2000-2004 MPlayer Team


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 10184)]
GetCpuSpeed () at cpudetect.c:216
216       __asm __volatile ("rdtsc":"=A"(retval)::"memory");
(gdb) c
Continuing.
Cannot find user-level thread for LWP 10184: generic error
(gdb) bt
#0  GetCpuSpeed () at cpudetect.c:216
#1  0x0807a992 in GetCpuFriendlyName (regs=0xbfffcfc0, regs2=0xbfffcfb0)
    at cpudetect.c:283
#2  0x0807a690 in GetCpuCaps (caps=0x83001c0) at cpudetect.c:139
#3  0x08073712 in main (argc=1, argv=0xbffff394) at mplayer.c:758
#4  0x407314a2 in __libc_start_main () from /lib/libc.so.6
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x807a6d9 to 0x807a719:
0x807a6d9 <GetCpuCaps+761>:     rol    %cl
0x807a6db <GetCpuCaps+763>:     call   0x906cbf4
0x807a6e0 <GetCpuCaps+768>:     add    %al,(%eax)
0x807a6e2 <GetCpuCaps+770>:     add    $0x8,%eax
0x807a6e5 <GetCpuCaps+773>:     mov    %eax,(%esi)
0x807a6e7 <GetCpuCaps+775>:     jmp    0x807a639 <GetCpuCaps+601>
0x807a6ec <GetCpuCaps+780>:     lea    0x0(%esi,1),%esi
0x807a6f0 <GetCpuSpeed>:        push   %ebp
0x807a6f1 <GetCpuSpeed+1>:      mov    %esp,%ebp
0x807a6f3 <GetCpuSpeed+3>:      push   %edi
0x807a6f4 <GetCpuSpeed+4>:      push   %esi
0x807a6f5 <GetCpuSpeed+5>:      push   %ebx
0x807a6f6 <GetCpuSpeed+6>:      sub    $0x2c,%esp
0x807a6f9 <GetCpuSpeed+9>:      rdtsc
0x807a6fb <GetCpuSpeed+11>:     mov    %edx,%esi
0x807a6fd <GetCpuSpeed+13>:     mov    %eax,%ebx
0x807a6ff <GetCpuSpeed+15>:     call   0x81e24a0 <GetTimer>
0x807a704 <GetCpuSpeed+20>:     mov    %eax,%edi
0x807a706 <GetCpuSpeed+22>:     movl   $0xc350,(%esp,1)
0x807a70d <GetCpuSpeed+29>:     call   0x81e2450 <usec_sleep>
0x807a712 <GetCpuSpeed+34>:     call   0x81e24a0 <GetTimer>
0x807a717 <GetCpuSpeed+39>:     mov    %eax,%ecx
End of assembler dump.
(gdb) info all-registers
eax            0x8331948        137566536
ecx            0x1      1
edx            0x1      1
ebx            0xbfffcfc0       -1073754176
esp            0xbfffcec0       0xbfffcec0
ebp            0xbfffcef8       0xbfffcef8
esi            0x83001c0        137363904
edi            0xbfffcfc0       -1073754176
eip            0x807a6f9        0x807a6f9
eflags         0x210286 2163334
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x0      0
gs             0x7      7
st0            0        (raw 0x00000000000000000000)
st1            0        (raw 0x00000000000000000000)
st2            0        (raw 0x00000000000000000000)
st3            0        (raw 0x00000000000000000000)
st4            0        (raw 0x00000000000000000000)
st5            0        (raw 0x00000000000000000000)
st6            0        (raw 0x00000000000000000000)
st7            0        (raw 0x00000000000000000000)
fctrl          0x37f    895
fstat          0x0      0
ftag           0xffff   65535
fiseg          0x0      0
fioff          0x0      0
foseg          0x0      0
fooff          0x0      0
fop            0x0      0
xmm0           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),     
-nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm1           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),     
-nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm2           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),     
-nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm3           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),     
-nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm4           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),     
-nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm5           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),     
-nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm6           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),     
-nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm7           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff),     
-nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
mxcsr          0x1f80   8064
orig_eax       0xffffffff       -1




More information about the MPlayer-users mailing list