Bug 1198661

Summary: [abrt] pulseaudio: pa_atomic_load(): pulseaudio killed by SIGSEGV
Product: [Fedora] Fedora Reporter: Raman Gupta <rocketraman>
Component: pulseaudioAssignee: Lennart Poettering <lpoetter>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: lkundrak, lpoetter, rdieter, wtaymans
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/3280074303a221ab784c6009343db3e189a9f6d7
Whiteboard: abrt_hash:87c94ea2bdb8cbb5e0951d5519e1a289c6492168
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-20 20:14:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: exploitable
none
File: limits
none
File: maps
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages none

Description Raman Gupta 2015-03-04 15:23:19 UTC
Description of problem:
This seemed to happen while running a script I have been using for a year or so to switch from headset to speaker output while running some audio through a VoIP app called Zoiper. This crash has never happened in the past. It seems to be a new behavior. The content of the script is:

#!/bin/sh
CARD=0
amixer sset 'Master' mute
pactl set-card-profile alsa_card.pci-0000_00_1b.0 output:analog-surround-40+input:analog-stereo
pactl set-sink-port alsa_output.pci-0000_00_1b.0.analog-surround-40 analog-output-lineout
amixer -c $CARD sset "Auto-Mute Mode" Disabled
amixer -c $CARD sset 'Headphone',1 100 mute
amixer sset 'Master' unmute
echo "speakers" > /var/lib/misc/audio-output-current
notify-send 'Audio' 'Audio playback transferred to speakers.' -t 1000 -i 'audio-card'

Version-Release number of selected component:
pulseaudio-5.0-25.fc21

Additional info:
reporter:       libreport-2.3.0
backtrace_rating: 4
cmdline:        pulseaudio -D
crash_function: pa_atomic_load
executable:     /usr/bin/pulseaudio
kernel:         3.18.7-200.fc21.x86_64
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (10 frames)
 #0 pa_atomic_load at pulsecore/atomic.h:57
 #1 pa_asyncmsgq_send at pulsecore/asyncmsgq.c:143
 #2 pa_sink_input_start_move at pulsecore/sink-input.c:1618
 #3 pa_sink_input_move_to at pulsecore/sink-input.c:1891
 #4 sink_unlink_hook_callback at modules/module-rescue-streams.c:107
 #5 pa_hook_fire at pulsecore/hook-list.c:106
 #6 pa_sink_unlink at pulsecore/sink.c:693
 #7 sink_input_kill_cb at modules/echo-cancel/module-echo-cancel.c:1410
 #8 pa_sink_move_all_finish at pulsecore/sink.c:924
 #9 card_set_profile at modules/alsa/module-alsa-card.c:262

Potential duplicate: bug 725513

Comment 1 Raman Gupta 2015-03-04 15:23:21 UTC
Created attachment 997913 [details]
File: backtrace

Comment 2 Raman Gupta 2015-03-04 15:23:22 UTC
Created attachment 997914 [details]
File: cgroup

Comment 3 Raman Gupta 2015-03-04 15:23:23 UTC
Created attachment 997915 [details]
File: core_backtrace

Comment 4 Raman Gupta 2015-03-04 15:23:24 UTC
Created attachment 997916 [details]
File: dso_list

Comment 5 Raman Gupta 2015-03-04 15:23:24 UTC
Created attachment 997917 [details]
File: environ

Comment 6 Raman Gupta 2015-03-04 15:23:25 UTC
Created attachment 997918 [details]
File: exploitable

Comment 7 Raman Gupta 2015-03-04 15:23:26 UTC
Created attachment 997919 [details]
File: limits

Comment 8 Raman Gupta 2015-03-04 15:23:27 UTC
Created attachment 997920 [details]
File: maps

Comment 9 Raman Gupta 2015-03-04 15:23:28 UTC
Created attachment 997921 [details]
File: open_fds

Comment 10 Raman Gupta 2015-03-04 15:23:28 UTC
Created attachment 997922 [details]
File: proc_pid_status

Comment 11 Raman Gupta 2015-03-04 15:23:29 UTC
Created attachment 997923 [details]
File: var_log_messages

Comment 12 Raman Gupta 2015-03-04 15:56:31 UTC
Update: actually this happens when switching from speaker to headset, not the opposite. The script works fine unless Zoiper with the echo cancellation module is running i.e. Zoiper was started with:

export PULSE_PROP="filter.want=echo-cancel"

If the echo cancellation filter is not requested, then the switch from speaker to headset works fine. Also, I thought this was a new issue but it (probably) isn't -- its because I just enabled this echo cancellation feature.

The script is:

#!/bin/sh
CARD=0
amixer sset 'Master' mute
pactl set-card-profile alsa_card.pci-0000_00_1b.0 output:analog-stereo+input:analog-stereo
pactl set-sink-port alsa_output.pci-0000_00_1b.0.analog-stereo analog-output-headphones
#amixer -c $CARD sset "Auto-Mute Mode" 'Line Out+Speaker'
amixer -c $CARD sset "Auto-Mute Mode" 'Enabled'
amixer -c $CARD sset 'Headphone',1 100 unmute
amixer sset 'Master' unmute
echo "headset" > /var/lib/misc/audio-output-current
notify-send 'Audio' 'Audio playback transferred to headset.' -t 1000 -i 'audio-headset'

The specific command that causes pulseaudio to crash is:

pactl set-card-profile alsa_card.pci-0000_00_1b.0 output:analog-stereo+input:analog-stereo

I can reproduce this reliably (happens every time with echo cancellation on).

Comment 13 Wim Taymans 2015-03-04 16:36:03 UTC
I can reproduce it.

Comment 14 Raman Gupta 2015-03-10 00:14:41 UTC
(In reply to Raman Gupta from comment #12)
> Update: actually this happens when switching from speaker to headset

It actually happens when switching in either direction.

Is there a better place to report this e.g. the PulseAudio freedesktop Bugzilla? Or is this bug tracker monitored by upstream (I see Lennart is copied, but don't know if any "official" upstream integration/reporting mechanism exists).

Comment 15 Raman Gupta 2015-05-12 13:13:18 UTC
Reported to upstream: https://bugs.freedesktop.org/show_bug.cgi?id=90416

Comment 16 Raman Gupta 2015-07-20 20:14:42 UTC
FYI: This is fixed upstream.