pulseaudio crashed with SIGABRT in subscribe_callback()

Bug #896602 reported by siucdude
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
Medium
David Henningsson

Bug Description

I see all the old bugs have a fix,,, well here it breaks again.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: pulseaudio 1:1.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-1.3-generic 3.2.0-rc2
Uname: Linux 3.2.0-1-generic x86_64
NonfreeKernelModules: wl
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: siucdude 5677 F.... pulseaudio
 /dev/snd/pcmC0D0p: siucdude 5677 F...m pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf4700000 irq 47'
   Mixer name : 'Conexant CX20561 (Hermosa)'
   Components : 'HDA:14f15051,17aa3c2b,00100000'
   Controls : 16
   Simple ctrls : 8
CheckboxSubmission: 436b39225e95524b1259e913c38499a0
CheckboxSystem: 3e53d3ea5811723345f19eff5070f9ab
Date: Sat Nov 26 10:04:15 2011
ExecutablePath: /usr/bin/pulseaudio
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100318)
ProcCmdline: /usr/bin/pulseaudio --start --log-target=syslog
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Signal: 6
SourcePackage: pulseaudio
StacktraceTop:
 ?? () from /usr/lib/pulse-1.1/modules/module-stream-restore.so
 ?? () from /usr/lib/libpulsecore-1.1.so
 pa_mainloop_dispatch () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
 pa_mainloop_iterate () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
 pa_mainloop_run () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
Title: pulseaudio crashed with SIGABRT in pa_mainloop_dispatch()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare
dmi.bios.date: 09/29/2009
dmi.bios.vendor: LENOVO
dmi.bios.version: 0CCN58WW(V1.24)
dmi.board.name: JIWA1
dmi.board.vendor: LENOVO
dmi.board.version: REFERENCE
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnLENOVO:bvr0CCN58WW(V1.24):bd09/29/2009:svnLENOVO:pn4151/200:pvrLenovo3000G530:rvnLENOVO:rnJIWA1:rvrREFERENCE:cvnNoEnclosure:ct10:cvrN/A:
dmi.product.name: 4151/200
dmi.product.version: Lenovo 3000 G530
dmi.sys.vendor: LENOVO

Revision history for this message
siucdude (siucdude) wrote :
visibility: private → public
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 subscribe_callback (c=<optimized out>, t=<optimized out>, idx=<optimized out>, userdata=<optimized out>) at modules/module-stream-restore.c:1306
 defer_cb (m=<optimized out>, de=<optimized out>, userdata=0xa34160) at pulsecore/core-subscribe.c:174
 dispatch_defer (m=0xa2ea00) at pulse/mainloop.c:704
 pa_mainloop_dispatch (m=0xa2ea00) at pulse/mainloop.c:920
 pa_mainloop_iterate (m=0xa2ea00, block=<optimized out>, retval=0x7fffa54d4414) at pulse/mainloop.c:960

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in pulseaudio (Ubuntu):
importance: Undecided → Medium
summary: - pulseaudio crashed with SIGABRT in pa_mainloop_dispatch()
+ pulseaudio crashed with SIGABRT in subscribe_callback()
tags: removed: need-amd64-retrace
Revision history for this message
David Henningsson (diwic) wrote : volume_writable and save_volume crash

This bug [1] is still reported as present in 3.0, so I tried to track it
down, but I'm not sure what the best fix is. Here's where it crashes:

module-stream-restore.c:
         if (sink_input->save_volume &&
pa_sink_input_is_volume_readable(sink_input)) {
             pa_assert(sink_input->volume_writable);

According to this code, volume_writeable must be true if save_volume is
true. It apparently isn't always so.

But what is the right solution?
  1) Ignore volume_writable, i e, just remove the assertion, or
  2) If volume_writable is false, skip saving the volume, but not mute
and route, or
  3) If volume_writable is false, skip saving the sink input completely

Or, should one
  4) Change everywhere that sets save_volume to "true" to also check for
volume_writable and if so never set save_volume to true?

I'm not sure what the thoughts are behind these two variables, so
looking for advice here.

--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

[1] https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/896602

Changed in pulseaudio (Ubuntu):
assignee: nobody → David Henningsson (diwic)
status: New → In Progress
Revision history for this message
David Henningsson (diwic) wrote : [PATCH] sink-input/source-output: Don't set save_volume if volume is not writable

This fixes a later assertion failure in module-stream-restore.

Buglink: https://bugs.launchpad.net/bugs/896602
Signed-off-by: David Henningsson <email address hidden>
---
 src/pulsecore/sink-input.c | 3 +++
 src/pulsecore/source-output.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 6131bd3..8b9ee72 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -376,6 +376,9 @@ int pa_sink_input_new(
         data->save_volume = FALSE;
     }

+ if (!data->volume_writable)
+ data->save_volume = false;
+
     pa_return_val_if_fail(pa_cvolume_compatible(&data->volume, &data->sample_spec), -PA_ERR_INVALID);

     if (!data->muted_is_set)
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index d942419..96245c7 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -309,6 +309,9 @@ int pa_source_output_new(
         data->save_volume = FALSE;
     }

+ if (!data->volume_writable)
+ data->save_volume = false;
+
     pa_return_val_if_fail(pa_cvolume_compatible(&data->volume, &data->sample_spec), -PA_ERR_INVALID);

     if (!data->volume_factor_is_set)
--
1.7.9.5

Revision history for this message
David Henningsson (diwic) wrote : Re: [pulseaudio-discuss] volume_writable and save_volume crash

On 05/14/2013 11:46 AM, Tanu Kaskinen wrote:
> On Tue, 2013-05-14 at 10:31 +0200, David Henningsson wrote:
>> This bug [1] is still reported as present in 3.0, so I tried to track it
>> down, but I'm not sure what the best fix is. Here's where it crashes:
>>
>> module-stream-restore.c:
>> if (sink_input->save_volume &&
>> pa_sink_input_is_volume_readable(sink_input)) {
>> pa_assert(sink_input->volume_writable);
>>
>> According to this code, volume_writeable must be true if save_volume is
>> true. It apparently isn't always so.
>>
>> But what is the right solution?
>> 1) Ignore volume_writable, i e, just remove the assertion, or
>> 2) If volume_writable is false, skip saving the volume, but not mute
>> and route, or
>> 3) If volume_writable is false, skip saving the sink input completely
>>
>> Or, should one
>> 4) Change everywhere that sets save_volume to "true" to also check for
>> volume_writable and if so never set save_volume to true?
>>
>> I'm not sure what the thoughts are behind these two variables, so
>> looking for advice here.
>
> If volume_writable is false, it doesn't make sense to save the volume,
> because the volume should only be saved when the user sets the volume,
> but the user can't set the volume if it's not writable. So, I think 1 is
> not good. 2 is something that could be considered, but 3 is not. I would
> prefer 4 in some form, but it's bad if every place where save_volume is
> enabled needs to check volume_writable. I think
> pa_sink_input_set_save_volume() would make sense. The function would
> fail if saving the volume is not allowed. The callers could check if the
> function fails, but I don't think that would be necessary in most cases.

Save_volume was not set in very many places, so I believe the just sent
patch would suffice?

--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

Revision history for this message
David Henningsson (diwic) wrote : Re: [PATCH] sink-input/source-output: Don't set save_volume if volume is not writable

On 05/15/2013 02:28 PM, David Henningsson wrote:
> This fixes a later assertion failure in module-stream-restore.

There were no comments, so I pushed this one now.

>
> Buglink: https://bugs.launchpad.net/bugs/896602
> Signed-off-by: David Henningsson <email address hidden>
> ---
> src/pulsecore/sink-input.c | 3 +++
> src/pulsecore/source-output.c | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
> index 6131bd3..8b9ee72 100644
> --- a/src/pulsecore/sink-input.c
> +++ b/src/pulsecore/sink-input.c
> @@ -376,6 +376,9 @@ int pa_sink_input_new(
> data->save_volume = FALSE;
> }
>
> + if (!data->volume_writable)
> + data->save_volume = false;
> +
> pa_return_val_if_fail(pa_cvolume_compatible(&data->volume, &data->sample_spec), -PA_ERR_INVALID);
>
> if (!data->muted_is_set)
> diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
> index d942419..96245c7 100644
> --- a/src/pulsecore/source-output.c
> +++ b/src/pulsecore/source-output.c
> @@ -309,6 +309,9 @@ int pa_source_output_new(
> data->save_volume = FALSE;
> }
>
> + if (!data->volume_writable)
> + data->save_volume = false;
> +
> pa_return_val_if_fail(pa_cvolume_compatible(&data->volume, &data->sample_spec), -PA_ERR_INVALID);
>
> if (!data->volume_factor_is_set)
>

--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

Changed in pulseaudio (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
David Henningsson (diwic) wrote :

This bug fix went into PulseAudio 4.0, which is now released into Saucy.

Changed in pulseaudio (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Ertan Günay (ergunay) wrote :

This problem happened while watching a video from youtube.
I was using facebook and the video was in fb page and the browser was mozilla firefox.
Actually it happens sometimes, but I don't know the real reason of this problem.
Because it is not a permanent problem.

Revision history for this message
Ertan Günay (ergunay) wrote :

I happened again.
This is second same error today.

Revision history for this message
Ertan Günay (ergunay) wrote :

I mean It happened :)

Revision history for this message
Ertan Günay (ergunay) wrote :

It happened again.
As I noticed, It happens while listening radio in Rhytymbox.

Revision history for this message
Ertan Günay (ergunay) wrote :

This problem occurs every day more than 10 times.
I cannot listen a online radio continuously.

kernel ver: 4.3.0-040300rc3-generic

Thanks
Ertan

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.