Ticket #190 (closed defect: fixed)

Opened 9 months ago

Last modified 3 weeks ago

ladspa-sink devices kill pulseaudio if not switched to on-the-fly

Reported by: lorenzo Assigned to: lennart
Priority: normal Milestone: 0.9.12
Component: module-ladspa-sink Severity: major
Keywords: ladspa, mbeq, module-ladspa-sink Cc:

Description

I have the following lines in my /etc/pulseaudio/default.pa:

.nofail load-module module-ladspa-sink sink_name=ladspa_out_sblive channels=2 master=alsa_output.pci_1102_2_alsa_playback_0 plugin=mbeq_1197 label=mbeq control=11.621622,10,4.594594,2.702703,0,0,-1.621622,-0.270270,-5.405406,-3.513514,-8.648648,-5.675676,-4.054054,1.351351,9.189189 load-module module-ladspa-sink sink_name=ladspa_out_usb channels=2 master=alsa_output.usb_device_41e_3010_noserial_if0_alsa_playback_0 plugin=mbeq_1197 label=mbeq control=11.621622,10,4.594594,2.702703,0,0,-1.621622,-0.270270,-5.405406,-3.513514,-8.648648,-5.675676,-4.054054,1.351351,9.189189 load-module module-ladspa-sink sink_name=ladspa_out_usb2 channels=2 master=alsa_output.usb_device_ffffffff_ffffffff_noserial_alsa_playback_0 plugin=mbeq_1197 label=mbeq control=11.621622,10,4.594594,2.702703,0,0,-1.621622,-0.270270,-5.405406,-3.513514,-8.648648,-5.675676,-4.054054,1.351351,9.189189

The 2 USB devices are actually the same device, but it gets 2 different names at different times. I think this is a hal issue. Also, the sink names are the names produced by module-hal-detect, but the sinks do appear, so I don't think this causes a problem other than the fact that I can't make the sink for the USB device appear when it is hotplugged.

My problem occurs whenever I try to play a sound through either of the ladspa_out sinks. I can move any stream to a ladspa_out sink on-the-fly and it plays quite nicely with no trouble. But if I start a stream at one of these sinks, pulseaudio dies. An investigation using pulseaudio -vv reveals the following error:

pulseaudio: pulsecore/sink.c:424: pa_sink_render: Assertion `PA_SINK_OPENED(s->thread_info.state)' failed. Aborted

I only need to run pulseaudio again without killing it to start it, since it is already dead and not hung. However, in order to play the stream I moved to the ladspa_out sink without causing this error again, I need to kill pulseaudio and delete the stream from my .pulse/volume-restore.table. I also am unable to use the ladspa_out sinks as the default sink. If I try this, pulseaudio simply transparently resets the default sink to my soundblaster live card.

This error is 100% reproduceable whenever a stream is set to play through a ladspa-sink. Note that the lines I listed above don't wrap and that they require patching cli-command.c to allow lines of longer than 256 chars in default.pa.

Attachments

ladspa_trace.txt (15.1 kB) - added by tanuk on 06/21/08 18:48:01.
pulseaudio crash backtrace
default.pa (0.6 kB) - added by tanuk on 06/21/08 18:51:09.
The default.pa used in the crashing run

Change History

12/16/07 09:59:43 changed by tanuk

A more compact description of the crash:

The daemon crashes, if the master sink of the ladspa sink is suspended, and a stream is then connected to the ladspa sink.

06/21/08 17:32:20 changed by lennart

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone set to 0.9.11.

The LADSPA plugin in git has been extensively reworked. And this bug is most likely fixed too. Please feel free to reopen if the problem persists and provide a full backtrace.

06/21/08 18:46:56 changed by tanuk

  • status changed from closed to reopened.
  • resolution deleted.
  • component changed from daemon to module-ladspa-sink.

The problem persists, with slightly different symptoms: the assertion is a different one:

E: sink-input.c: Assertion 'i->thread_info.rewrite_nbytes == 0' failed at pulsecore/sink-input.c:1144, function pa_sink_input_request_rewind(). Aborting.

Backtrace is on its way.

06/21/08 18:48:01 changed by tanuk

  • attachment ladspa_trace.txt added.

pulseaudio crash backtrace

06/21/08 18:51:09 changed by tanuk

  • attachment default.pa added.

The default.pa used in the crashing run

06/21/08 18:54:01 changed by tanuk

The same bug affects module-remap-sink.

07/24/08 15:15:40 changed by lennart

  • milestone deleted.

08/10/08 17:57:02 changed by patrys

Seeing this with 0.9.11:

E: module-alsa-sink.c: Error opening PCM device front:0: Device or resource busy E: sink-input.c: Assertion 'i->thread_info.rewrite_nbytes == 0' failed at pulsecore/sink-input.c:1146, function pa_sink_input_request_rewind(). Aborting.

08/15/08 15:02:52 changed by lennart

  • status changed from reopened to closed.
  • resolution set to fixed.
  • milestone set to 0.9.12.

Fix a while back in git.