mplayer pulseaudio freeze

Bug #212493 reported by Immolo
22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PulseAudio
New
Unknown
mplayer (Ubuntu)
Invalid
Undecided
Unassigned
pulseaudio (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After updating to version 1.0rc2-4.2.3 of mplayer it has become unusable with the pulseaudio plugin as when they are used together mplayer plays one frame of the video then freezes playback but if you change the audio plugin to alsa the video plays fine. Unsure of what the problem is as I'm unable to find a log of pulseaudio.

Revision history for this message
rai4shu2 (rai4shu2) wrote :

I'm using mplayer 2:1.0~rc2-0ubuntu13, and if I use -ao=pulse (rather than alsa), it works mostly as expected. If I seek around a lot, pulseaudio does tend to crash, and I have to restart pulseaudio.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 or 9.04?

Changed in mplayer:
status: New → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to New. Thanks again!.

Changed in mplayer:
status: Incomplete → Invalid
Revision history for this message
Stefano Rivera (stefanor) wrote :

I see the same behaviour in current jaunty. Video seems to be jerky for a fraction of a second directly after resuming / seeking, then it settles into steady playback. This has the side-affect of making repetitive seeking irritatingly slow. Playback seems generally unsteady. Killing pulseaudio and using alsa stops this misbehaviour.

The best way to recreate it seems to be to pause a video, adjust the volume using the volume keys / mixer, and toggle play/pause until it hangs.

From the following debugging, it looks like the issue is in communication with the pulseaudio unix socket:

Breakpoint 1, 0x00007fb692647e90 in read () from /lib/libpthread.so.0
(gdb) bt
#0 0x00007fb692647e90 in read () from /lib/libpthread.so.0
#1 0x00007fb687f8ce3d in ?? () from /usr/lib/libxcb.so.1
#2 0x00007fb687f8d3c8 in xcb_poll_for_event () from /usr/lib/libxcb.so.1
#3 0x00007fb69289fa3d in ?? () from /usr/lib/libX11.so.6
#4 0x00007fb6928a0345 in _XEventsQueued () from /usr/lib/libX11.so.6
#5 0x00007fb692888e4d in XPending () from /usr/lib/libX11.so.6
#6 0x00000000004ad498 in vo_x11_check_events ()
#7 0x00000000004b20f1 in ?? ()
#8 0x00000000004e85a2 in mp_input_get_cmd ()
#9 0x00000000004757b7 in main ()

[ 7fb68869edd7] ioctl(0, TIOCGWINSZ, {ws_row=44, ws_col=180, ws_xpixel=0, ws_ypixel=0}) = 0
[ 7fb6886990eb] write(1, "A: 67.3 V: 67.4 A-V: -0.149 ct:"..., 73) = 73
[ 7fb68869f842] select(5, [0 4], NULL, NULL, {0, 0}) = 0 (Timeout)
[ 7fb692647edb] read(4, 0x1ad2674, 4096) = -1 EAGAIN (Resource temporarily unavailable)
[ 7fb6926487e1] nanosleep({0, 98093000}, NULL) = 0
[ 7fb68869edd7] ioctl(0, TIOCGWINSZ, {ws_row=44, ws_col=180, ws_xpixel=0, ws_ypixel=0}) = 0
[ 7fb6886990eb] write(1, "A: 67.3 V: 67.4 A-V: -0.149 ct:"..., 73) = 73
[ 7fb68869f842] select(5, [0 4], NULL, NULL, {0, 0}) = 0 (Timeout)
[ 7fb692647edb] read(4, 0x1ad2674, 4096) = -1 EAGAIN (Resource temporarily unavailable)
[ 7fb6926487e1] nanosleep({0, 98093000}, ^C <unfinished ...>

Changed in mplayer:
status: Invalid → Confirmed
Revision history for this message
djobbito (gilbertvaudein) wrote :

I have exactly the same behavior with jaunty installed on my laptop. When you play a movie, the pause it, it freeze and stick like that. You need to quit mplayer and replay it at the same position to continue the movie.

Very annoying problem.

Revision history for this message
Jan D (jandeyk-gmail) wrote :

Same problem here too. Mplayer plays just one frame after resuming from pause, then stops.
To continue i have to "seek" back or forth.
Using ALSA instead of PulseAudio fixes the problem.

Running Jaunty (the problem also exists in 8.10)

Revision history for this message
Jithin Emmanuel (jithin1987) wrote :

I also have the same problem with jaunty. How do I make mplayer to use alsa?

Revision history for this message
Gonzhauser (gonzhauser) wrote :

mplayer -ao alsa <video>

Also seeking with the arrow keys is a workaround for me.

Revision history for this message
Gonzhauser (gonzhauser) wrote :

My backtrace is:

#0 0xb8049430 in __kernel_vsyscall ()
#1 0xb7ebb8f6 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x08743862 in usec_sleep ()
(gdb) thread 2
[Switching to thread 2 (Thread 0xb19e0b90 (LWP 6585))]#0 0xb8049430 in __kernel_vsyscall ()
(gdb) bt
#0 0xb8049430 in __kernel_vsyscall ()
#1 0xb651bae7 in *__GI___poll (fds=0x8c9dbc8, nfds=2, timeout=332) at ../sysdeps/unix/sysv/linux/poll.c:87
#2 0xb7b0d912 in poll_func (ufds=0x8c9dbc8, nfds=2, timeout=332, userdata=0x8c5b810) at pulse/thread-mainloop.c:71
#3 0xb7afd3c0 in pa_mainloop_poll (m=0x8c5b770) at pulse/mainloop.c:857
#4 0xb7afed43 in pa_mainloop_iterate (m=0x8c5b770, block=1, retval=0x0) at pulse/mainloop.c:923
#5 0xb7afee14 in pa_mainloop_run (m=0x8c5b770, retval=0x0) at pulse/mainloop.c:941
#6 0xb7b0d6c3 in thread (userdata=0x8c391c0) at pulse/thread-mainloop.c:90
#7 0xb7b37f12 in internal_thread_func (userdata=0x8c77df8) at pulsecore/thread-posix.c:72
#8 0xb7eb44ff in start_thread (arg=0xb19e0b90) at pthread_create.c:297
#9 0xb652649e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Revision history for this message
xtknight (xt-knight) wrote :

Well mine's not crashing. Just pausing a video for over a couple seconds will cause PulseAudio to kill the audio connection and make mplayer act all weird.

D: module-suspend-on-idle.c: Sink alsa_output.hw_0_0 becomes idle.
I: module-suspend-on-idle.c: Sink alsa_output.hw_0_0 idle for too long, suspending ...
I: module-alsa-sink.c: Device suspended... <----------- boom.
D: sink-input.c: Requesting rewind due to uncorking
I: module-alsa-sink.c: Trying resume...
D: module-alsa-sink.c: hwbuf_unused=0
D: module-alsa-sink.c: setting avail_min=1
I: module-alsa-sink.c: Resumed successfully...
I: module-alsa-sink.c: Starting playback.
D: module-suspend-on-idle.c: Sink alsa_output.hw_0_0 becomes busy.

Revision history for this message
Daniel T Chen (crimsun) wrote :

xtknight, you could try unloading module-suspend-on-idle (or not loading it at all from /etc/pulse/default.pa) before starting mplayer. I presume the error is reproducible if you use -ao alsa ?

Revision history for this message
xtknight (xt-knight) wrote :

Daniel T Chen:

No weirdness occurs with -ao alsa.

But, when I don't load 'module-suspend-on-idle' the problem still happens in -ao pulse. I just don't get the suspending messages.

The last message (with "pulseaudio -vvv"), instead, is:
D: sink-input.c: Requesting rewind due to corking
D: sink-input.c: Requesting rewind due to uncorking

And the problems with mplayer persist. No extra messages from running mplayer with extra verbosity ("-v -v -v").

Revision history for this message
xtknight (xt-knight) wrote :

Also, this occurs on both of my audio output (sink) devices. It is not isolated to only one alsa driver causing the issue.

Revision history for this message
Lars Düsing (lars.duesing) wrote :

I can confirm this problem. Problem occurs even on totem.
killing pulseaudio helps.

Interestingly there are some words on mplayer-current-svn about problems with pulseaudio.

Revision history for this message
Lars Düsing (lars.duesing) wrote :

Sorry, forgot to mention pulseaudio-bug-id:

http://www.pulseaudio.org/ticket/440

Benjamin Drung (bdrung)
Changed in pulseaudio:
importance: Undecided → Unknown
status: New → Unknown
Changed in pulseaudio:
status: Unknown → New
Changed in pulseaudio:
status: New → Fix Released
Revision history for this message
xtknight (xt-knight) wrote :

I attached a debdiff of a quilt patch created based on the PulseAudio git commit e61728e67a656c0bbd12b13bb4c1777d0e3163f4 which has been tested and successfully resolves the problem.

Original patch URL: http://git.0pointer.de/?p=pulseaudio.git;a=patch;h=e61728e67a656c0bbd12b13bb4c1777d0e3163f4

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
xtknight (xt-knight) wrote :

There's already a patch for PulseAudio so the bug isn't really in mplayer.

Changed in mplayer (Ubuntu):
status: Confirmed → Invalid
Changed in pulseaudio:
status: Fix Released → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.