Opened 12 years ago

Last modified 12 years ago

#2039 new defect

mplayer hangs in fill_audio_out_buffers () after seeking

Reported by: bugzilla@… Owned by: reimar
Priority: normal Component: core
Version: HEAD Severity: major
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

mplayer stops playback and hangs in a loop (usec_sleep, function fill_audio_out_buffers in line 2142 in mplayer.c) after continually seeking in a mp3 or Ogg/Vorbis file. I am using the JACK audio output module, though this happens also when using ALSA.

Steps to reproduce:

  1. Start mplayer with any long audiofile (mplayer -ao jack <anyfile>)
  2. Press and hold cursor left key to seek forward
  3. Mplayer freezes after a few dozen seconds at random file positions
  1. Mplayer still responds to SIGINT; has to be given twice to exit (" MPlayer interrupted by signal 2 in module: play_audio").
Ouput of mplayer -v -ao jack 2011on45-1.ogg =

simon@intellistation:~$ mplayer -v -ao jack 2011on45-1.ogg
MPlayer SVN-r34676-4.6 (C) 2000-2012 MPlayer Team
CPU vendor name: GenuineIntel max cpuid level: 10
CPU: Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz (Family: 6, Model: 15, Stepping: 6)
extended cpuid-level: 8
extended cache-info: 268468288
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSSE3: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 SSSE3 CMOV
get_path('codecs.conf') -> '/home/simon/.mplayer/codecs.conf'
Reading optional codecs config file /home/simon/.mplayer/codecs.conf: No such file or directory
Reading optional codecs config file /usr/local/etc/mplayer/codecs.conf: No such file or directory
Using built-in default codecs.conf.
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/simon/.mplayer/fonts'
Configuration: --enable-debug=3
CommandLine: '-v' '-ao' 'jack' '2011on45-1.ogg'
Using nanosleep() timing
get_path('input.conf') -> '/home/simon/.mplayer/input.conf'
Reading optional input config file /home/simon/.mplayer/input.conf: No such file or directory
Reading optional input config file /usr/local/etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
get_path('2011on45-1.ogg.conf') -> '/home/simon/.mplayer/2011on45-1.ogg.conf'

Playing 2011on45-1.ogg.
get_path('sub/') -> '/home/simon/.mplayer/sub/'
[file] File size is 115008438 bytes
STREAM: [file] 2011on45-1.ogg
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
libavformat version 54.0.100 (internal)
Configuration: --enable-gpl --enable-postproc
LAVF_check: Ogg
libavformat file format detected.
[ogg @ 0x89027a0]All info found
==> Found audio stream: 0
======= WAVE Format =======
Format Tag: 22127 (0x566F)
Channels: 2
Samplerate: 44100
avg byte/sec: 16000
Block align: 1
bits/sample: 0
cbSize: 4234
==========================================================================
[lavf] stream 0: audio (vorbis), -aid 0
LAVF: 1 audio and 0 video streams found
LAVF: build 3539044
Load subtitles in ./
get_path('sub/') -> '/home/simon/.mplayer/sub/'
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 192000 + 131072 = 323072 bytes for output buffer.
FFmpeg's libavcodec audio codec
libavcodec version 54.1.100 (internal)
Configuration: --enable-gpl --enable-postproc
INFO: libavcodec "vorbis" init OK!
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Trying preferred audio driver 'jack', options '[none]'
AO: [jack] 44100Hz 2ch floatle (4 bytes per sample)
AO: Description: JACK audio output
AO: Author: Reimar D�ffinger <Reimar.Doeffinger@…>
AO: Comment: based on ao_sdl.c
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/floatle...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[libaf] Adding filter format
[format] Changing sample format from little-endian 16-bit signed int to little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian 32-bit float conversion
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[format] Changing sample format from little-endian 16-bit signed int to little-endian 32-bit float
[format] Accelerated little-endian 16-bit signed int to little-endian 32-bit float conversion
Video: no video
Freeing 0 unused video chunks.
Starting playback...
[libaf] Reallocating memory in module format, old len = 0, new len = 135173
Increasing filtered audio buffer size from 0 to 135168
A: 831.4 (13:51.3) of 7250.0 ( 2:00:50.0) 0.0%

============= End output of mplayer -v -ao jack 2011on45-1.ogg ========

============= GDB backtrace of PID 18108 ==============================
#0 0xb788a424 in kernel_vsyscall ()
#1 0xb70a2b16 in nanosleep ()

from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0

#2 0x081effb4 in usec_sleep (usec_delay=46000) at osdep/timer-linux.c:42
#3 0x080d496a in fill_audio_out_buffers () at mplayer.c:2142
#4 main (argc=4, argv=0xbfc395d4) at mplayer.c:3699

(gdb) disassemble $pc-32
Dump of assembler code for function kernel_sigreturn:

0xb788a400 <+0>: pop %eax
0xb788a401 <+1>: mov $0x77,%eax
0xb788a406 <+6>: int $0x80
0xb788a408 <+8>: nop

End of assembler dump.

(gdb) info all-registers
eax 0xfffffdfc -516
ecx 0x0 0
edx 0xa138b48 169053000
ebx 0xbfc38438 -1077705672
esp 0xbfc38408 0xbfc38408
ebp 0xbfc39528 0xbfc39528
esi 0x0 0
edi 0x2710 10000
eip 0xb788a424 0xb788a424 <kernel_vsyscall+16>
eflags 0x293 [ CF AF SF IF ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
st0 0 (raw 0x00000000000000000000)
st1 0 (raw 0x00000000000000000000)
st2 0 (raw 0x00000000000000000000)
st3 0 (raw 0x00000000000000000000)
st4 0 (raw 0x00000000000000000000)
st5 352800 (raw 0x4011ac44000000000000)
st6 0 (raw 0x00000000000000000000)
st7 6428212.2448979342266284220386296511 (raw 0x4015c42c687d634314b9)
fctrl 0x37f 895
fstat 0x20 32
ftag 0xffff 65535
fiseg 0x73 115
fioff 0x80d491c 135088412
foseg 0x7b 123
fooff 0x8ad1634 145561140
fop 0x30d 781
xmm0 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {

0x8000000000000000, 0x8000000000000000}, v16_int8 = {0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},

v8_int16 = {0x0, 0x0, 0x0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff},
v4_int32 = {0x0, 0xffff0000, 0xffffffff, 0xffffffff}, v2_int64 = {

0xffff000000000000, 0xffffffffffffffff},

uint128 = 0xffffffffffffffffffff000000000000}

xmm1 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},

v16_int8 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0,

0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0xffff, 0xffff, 0xffff, 0x0, 0x0,
0x0, 0x0, 0x0}, v4_int32 = {0xffffffff, 0xffff, 0x0, 0x0}, v2_int64 = {
0xffffffffffff, 0x0}, uint128 = 0x00000000000000000000ffffffffffff}

xmm2 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},

v16_int8 = {0x3a, 0x20, 0x32, 0x34, 0x20, 0x25, 0x0, 0x0, 0x0, 0x0, 0x0,

0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x203a, 0x3432, 0x2520, 0x0, 0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x3432203a, 0x2520, 0x0, 0x0}, v2_int64 = {
0x25203432203a, 0x0}, uint128 = 0x0000000000000000000025203432203a}

xmm3 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},

v16_int8 = {0x0, 0x40, 0xff, 0xbc, 0x0, 0x80, 0x8f, 0xbc, 0x0, 0x80, 0xdf,

0xbc, 0x0, 0xc0, 0x32, 0xbd}, v8_int16 = {0x4000, 0xbcff, 0x8000, 0xbc8f,
0x8000, 0xbcdf, 0xc000, 0xbd32}, v4_int32 = {0xbcff4000, 0xbc8f8000,
0xbcdf8000, 0xbd32c000}, v2_int64 = {0xbc8f8000bcff4000,
0xbd32c000bcdf8000}, uint128 = 0xbd32c000bcdf8000bc8f8000bcff4000}

xmm4 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},

v16_int8 = {0x0, 0x60, 0x1a, 0xbd, 0x0, 0x10, 0xb8, 0xbd, 0x0, 0x0, 0x6,

0xbc, 0x0, 0xf0, 0xb0, 0xbd}, v8_int16 = {0x6000, 0xbd1a, 0x1000, 0xbdb8,
0x0, 0xbc06, 0xf000, 0xbdb0}, v4_int32 = {0xbd1a6000, 0xbdb81000,
0xbc060000, 0xbdb0f000}, v2_int64 = {0xbdb81000bd1a6000,
0xbdb0f000bc060000}, uint128 = 0xbdb0f000bc060000bdb81000bd1a6000}

xmm5 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},

v16_int8 = {0x0, 0x0, 0x41, 0x3c, 0x0, 0x50, 0x86, 0xbd, 0x0, 0x80, 0xe2,

0xbc, 0x0, 0x10, 0x80, 0xbd}, v8_int16 = {0x0, 0x3c41, 0x5000, 0xbd86,
0x8000, 0xbce2, 0x1000, 0xbd80}, v4_int32 = {0x3c410000, 0xbd865000,
0xbce28000, 0xbd801000}, v2_int64 = {0xbd8650003c410000,
0xbd801000bce28000}, uint128 = 0xbd801000bce28000bd8650003c410000}

xmm6 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},

v16_int8 = {0x0, 0xd0, 0xa3, 0xbd, 0x0, 0xa0, 0x65, 0xbd, 0x0, 0x70, 0xa8,

0xbd, 0x0, 0xa0, 0x15, 0xbd}, v8_int16 = {0xd000, 0xbda3, 0xa000, 0xbd65,
0x7000, 0xbda8, 0xa000, 0xbd15}, v4_int32 = {0xbda3d000, 0xbd65a000,
0xbda87000, 0xbd15a000}, v2_int64 = {0xbd65a000bda3d000,
0xbd15a000bda87000}, uint128 = 0xbd15a000bda87000bd65a000bda3d000}

xmm7 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},

v16_int8 = {0x0, 0x80, 0x48, 0xbc, 0x0, 0x80, 0xd7, 0xbc, 0x0, 0xb0, 0x90,

0x3d, 0x0, 0x0, 0x90, 0xbc}, v8_int16 = {0x8000, 0xbc48, 0x8000, 0xbcd7,
0xb000, 0x3d90, 0x0, 0xbc90}, v4_int32 = {0xbc488000, 0xbcd78000,
0x3d90b000, 0xbc900000}, v2_int64 = {0xbcd78000bc488000,
0xbc9000003d90b000}, uint128 = 0xbc9000003d90b000bcd78000bc488000}

mxcsr 0x1fa0 [ PE IM DM ZM OM UM PM ]
mm0 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,

0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}

mm1 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,

0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}

mm2 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,

0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}

mm3 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,

0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}

mm4 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,

0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}

mm5 {uint64 = 0xac44000000000000, v2_int32 = {0x0, 0xac440000},

v4_int16 = {0x0, 0x0, 0x0, 0xac44}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0,

0x44, 0xac}}

mm6 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,

0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}

mm7 {uint64 = 0xc42c687d634314b9, v2_int32 = {0x634314b9,

0xc42c687d}, v4_int16 = {0x14b9, 0x6343, 0x687d, 0xc42c}, v8_int8 = {0xb9,
0x14, 0x43, 0x63, 0x7d, 0x68, 0x2c, 0xc4}}

====================== End of GDB output ===============================

System information:
Linux intellistation 3.1.0-1-686-pae #1 SMP Tue Jan 10 05:42:54 UTC 2012 i686 GNU/Linux
Debian testing wheezy
libc version 2.13
gcc version 4.6.2 (Debian 4.6.2-12)
GNU ld (GNU Binutils for Debian) 2.22
GNU assembler (GNU Binutils for Debian) 2.22

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
stepping : 6
cpu MHz : 600.000
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dts tpr_shadow
bogomips : 4799.84
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

Thanks!

Change History (3)

comment:1 by bugzilla@…, 12 years ago

"2. Press and hold cursor left key to seek forward" should, of course, read "2. Press and hold cursor RIGHT key to seek forward". ;-)

comment:2 by reimar, 12 years ago

Not reproducible here.
What sound card are you using?
I think it is almost certain this is driver (or at least ALSA) bug which causes your sound card to "hang" after a few reinits or something like that.
I added a abort and error message for this case to make sure you can still exit normally with e.g. q but it won't be able to play audio.
Even my workaround does not work as described above, please tell me, the issue might be slightly different than I thought then and I'll have another look.

comment:3 by bugzilla@…, 12 years ago

I am using a RME Hammerfall HDSP Cardbus audio interface in combination with JACK jackdmp SVN HEAD (r4778) and ALSA driver version 1.0.24 (snd_hdsp).

Using MPlayer SVN-r34707 I get only a short hickup, something like "audio got stuck" flashes briefly and then seeking continues, mplayer plays fine. The commit seems to fix it somehow (glitch aside)...

Thanks for debugging on Sunday & greetings from Upper Bavaria! ;-)

Note: See TracTickets for help on using tickets.