Ticket #175 (closed defect: fixed)

Opened 4 years ago

Last modified 2 years ago

Simultaneous output freezes clients if removed mid-use

Reported by: coling Owned by: lennart
Milestone: 0.9.16 Component: module-combine-*
Keywords: Cc:

Description

I think the module-rescue isn't working working 100% right when dealing with simultaneous output virtual device.

Clients can freeze if you

  1. Configure the virtual device for simultaneous output via paprefs (3rd tab)
  2. Start a stream playing (e.g. with mplayer)
  3. Use pavucontrol to move the stream to the simultaneous output "device"
  4. Untick the option in paprefs which causes the "device" to be removed.

After the above steps the client freezes. I would expect module-recover-streams to detect this and dump the stream to a real device. Indeed, this is what pavucontrol and the pulseaudio -vv logs report has happened, but this still doesn't stop it freezing the clients.

I have also had a more severe crash in testing where pa played an annoying tone and wouldn't respond to CTRL+C and I had to kill -9 it.

Below is log output from a "normal" failure in the hope it vaguely helps.

D: module-zeroconf-publish.c: Successfully created entry group for colin@jimmy: Simultaneous output to ALSA PCM on front:1 (USB Au.
I: module-combine.c: No master selected, lacking suitable outputs.
D: module-suspend-on-idle.c: Sink alsa_output.pci_8086_27d8_alsa_playback_0 becomes idle.
D: module-suspend-on-idle.c: Sink alsa_output.pci_8086_27d8_alsa_playback_0 becomes idle.
I: sink-input.c: Freeing output 3 "Simultaneous output on ALSA PCM on front:0 (STAC92xx Analog) via DMA"
D: core-subscribe.c: dropped redundant event.
D: core-subscribe.c: dropped redundant event.
D: module-zeroconf-publish.c: Successfully created entry group for colin@jimmy: Simultaneous output to ALSA PCM on front:1 (USB Au.
D: module-suspend-on-idle.c: Sink alsa_output.pci_8086_27d8_alsa_playback_0 becomes busy.
D: module-suspend-on-idle.c: Sink combined becomes idle.
D: module-suspend-on-idle.c: Sink combined becomes idle.
D: sink-input.c: Successfully moved sink input 4 from combined to alsa_output.pci_8086_27d8_alsa_playback_0.
I: module-rescue-streams.c: Sucessfully moved sink input 4 "audio stream" to alsa_output.pci_8086_27d8_alsa_playback_0.
D: module-zeroconf-publish.c: Removing entry group for colin@jimmy: Simultaneous output to ALSA PCM on front:1 (USB Au.
D: module-rescue-streams.c: No source outputs to move away.
D: core-subscribe.c: dropped redundant event.
D: core-subscribe.c: dropped redundant event.
D: module-combine.c: Thread shutting down
I: sink.c: Freeing sink 2 "combined"
I: source.c: Freeing source 4 "combined.monitor"
I: module.c: Unloaded "module-combine" (index: #12).
I: module-volume-restore.c: Saving sink for <pulsecore/protocol-native.c$MPlayer>
I: module-suspend-on-idle.c: Sink alsa_output.usb_device_d8c_c_noserial_if0_alsa_playback_0 idle for too long, suspending ...
I: module-alsa-sink.c: Device suspended...
D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Device, path=/org/freedesktop/Hal/devices/acpi_BAT0, member=PropertyModified
I: module-volume-restore.c: Saving rules...
D: module-volume-restore.c: Successfully saved rules...
D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Device, path=/org/freedesktop/Hal/devices/acpi_BAT0, member=PropertyModified

Change History

Changed 4 years ago by coling

I should also point out that I've had some segfaults with module-combine but have yet to get a backtrace. It's not easily reproducible so it could be that the fault that causes this freeze is also responsible for the segfault (tho' I think this is probably unlikely).

I: sink-input.c: Freeing output 11 "sample:pulse-hotplug"
I: module-volume-restore.c: Saving rules...
D: module-volume-restore.c: Successfully saved rules...
I: module-suspend-on-idle.c: Sink alsa_output.usb_device_d8c_c_noserial_if0_alsa_playback_0 idle for too long, suspending ...
I: module-alsa-sink.c: Device suspended...
D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Device, path=/org/freedesktop/Hal/devices/acpi_BAT0, member=PropertyModified
D: module-gconf.c: Unloading module #20
I: module.c: Unloading "module-combine" (index: #20).
Segmentation fault

Changed 4 years ago by coling

Some more debug:

pulseaudio: modules/module-combine.c:584: sink_process_msg: Assertion `!op->outq_rtpoll_item' failed.

This happened just before pulse exited when playing with combined streams.

Changed 3 years ago by pcwalden

This same fault happened to me when I plugged in a USB sound device, then switched to the combined sink using padevchooser. The pa server crashed, but the client did not freeze. Here is the message log:

Aug 20 13:16:58 walden5 kernel: usb 1-1: USB disconnect, address 2
Aug 20 13:17:07 walden5 kernel: usb 1-1: new full speed USB device using uhci_hcd and address 3
Aug 20 13:17:07 walden5 kernel: usb 1-1: device descriptor read/64, error -71
Aug 20 13:17:08 walden5 kernel: usb 1-1: configuration #1 chosen from 1 choice
Aug 20 13:17:08 walden5 kernel: input: Philips UAC3553B as /devices/pci0000:00/0000:00:07.2/usb1/1-1/1-1:1.2/input/input10
Aug 20 13:17:09 walden5 kernel: input,hidraw0: USB HID v1.00 Device [Philips UAC3553B] on usb-0000:00:07.2-1
Aug 20 13:17:09 walden5 kernel: usb 1-1: New USB device found, idVendor=0471, idProduct=0110
Aug 20 13:17:09 walden5 kernel: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Aug 20 13:17:09 walden5 kernel: usb 1-1: Product: UAC3553B
Aug 20 13:17:09 walden5 kernel: usb 1-1: Manufacturer: Philips
Aug 20 13:17:09 walden5 kernel: ALSA sound/usb/usbaudio.c:2798: 3:1:1: add audio endpoint 0x1
Aug 20 13:17:09 walden5 kernel: ALSA sound/usb/usbaudio.c:1306: current rate 0 is different from the runtime rate 48000
Aug 20 13:17:09 walden5 kernel: ALSA sound/usb/usbaudio.c:2798: 3:1:2: add audio endpoint 0x1
Aug 20 13:17:09 walden5 kernel: ALSA sound/usb/usbaudio.c:1306: current rate 0 is different from the runtime rate 48000
Aug 20 13:17:09 walden5 kernel: ALSA sound/usb/usbmixer.c:988: [1] FU [PCM Playback Switch] ch = 1, val = 0/1/1
Aug 20 13:17:10 walden5 kernel: ALSA sound/usb/usbmixer.c:405: cannot set ctl value: req = 0x4, wValue = 0x201, wIndex = 0x100, type = 4, data = 0x8/0x0
Aug 20 13:17:10 walden5 kernel: ALSA sound/usb/usbmixer.c:988: [1] FU [PCM Playback Volume] ch = 2, val = -10496/0/16
Aug 20 13:17:10 walden5 kernel: ALSA sound/usb/usbmixer.c:405: cannot set ctl value: req = 0x4, wValue = 0x300, wIndex = 0x100, type = 2, data = 0x1/0x0
Aug 20 13:17:10 walden5 kernel: ALSA sound/usb/usbmixer.c:988: [1] FU [Tone Control - Bass] ch = 1, val = -48/48/2
Aug 20 13:17:10 walden5 kernel: ALSA sound/usb/usbmixer.c:405: cannot set ctl value: req = 0x4, wValue = 0x500, wIndex = 0x100, type = 2, data = 0x1/0x0
Aug 20 13:17:11 walden5 kernel: ALSA sound/usb/usbmixer.c:988: [1] FU [Tone Control - Treble] ch = 1, val = -48/48/2
Aug 20 13:17:11 walden5 kernel: ALSA sound/usb/usbmixer.c:988: [1] FU [Auto Gain Control] ch = 1, val = 0/1/1
Aug 20 13:17:11 walden5 kernel: ALSA sound/usb/usbmixer.c:988: [1] FU [Bass Boost] ch = 1, val = 0/1/1
Aug 20 13:17:11 walden5 kernel: usbcore: registered new interface driver snd-usb-audio
Aug 20 13:17:12 walden5 kernel: ALSA sound/usb/usbaudio.c:1353: setting usb interface 1:2
Aug 20 13:17:12 walden5 kernel: ALSA sound/usb/usbaudio.c:1306: current rate 0 is different from the runtime rate 44100
Aug 20 13:21:50 walden5 kernel: ALSA sound/usb/usbaudio.c:1353: setting usb interface 1:2
Aug 20 13:21:51 walden5 kernel: ALSA sound/usb/usbaudio.c:1306: current rate 0 is different from the runtime rate 44100
Aug 20 13:21:51 walden5 pulseaudio[2695]: module-combine.c: Assertion '!op->outq_rtpoll_item' failed at modules/module-combine.c:584, function sink_process_msg(). Aborting.


Changed 3 years ago by pcwalden

Steps to reproduce

1. Add combined sinks in preferences. Add pa server start at log in preference

2. With USB device disconnected, start up and log in. Start paman to see the combined and the internal sound device sinks in the devices tab

3. Plug in USB device, see the usb device appear in paman devices tab

4. start a client (I used vlc), press run button on vlc.

5 See paman disconnect from pa server. pa server has crashed with Assertion '!op->outq_rtpoll_item' failed

Work around. If after the failure above, I log out and log in (do not reboot). The pa server has restarted. I can run vlc without crashing.

This is a pain. If I start up with the USB device connected, My udev (fedora 9) hides the internal sound device with the USB device. So I must start up and then connect the USB device in order to access both of them concurrently. However, connecting the USB device after start up forces me to go through the above failure and work around

Changed 3 years ago by lennart

  • milestone set to 0.9.16

Changed 3 years ago by lennart

  • component changed from daemon to module-combine-*

Changed 2 years ago by lennart

  • status changed from new to closed
  • resolution set to fixed

This is now fixed in PA GIT.

Note: See TracTickets for help on using tickets.