Ubuntu

pulseaudio crashed with SIGFPE in snd_pcm_mmap_begin()

Reported by LoonyPhoenix on 2009-08-12
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
alsa-lib (Ubuntu)
Medium
Daniel T Chen

Bug Description

Binary package hint: pulseaudio

Another random pulseaudio bug...

ProblemType: Crash
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: victor 5041 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0x44080000 irq 22'
   Mixer name : 'Analog Devices AD1981'
   Components : 'HDA:11d41981,11790311,00100200 HDA:11c13026,11790001,00100700'
   Controls : 14
   Simple ctrls : 12
CrashCounter: 1
Date: Wed Aug 12 21:59:33 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/pulseaudio
Package: pulseaudio 1:0.9.16~test4-0ubuntu4
ProcCmdline: /usr/bin/pulseaudio --start --log-target=syslog
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-5.24-generic
Signal: 8
SourcePackage: pulseaudio
StacktraceTop:
 snd_pcm_mmap_begin () from /usr/lib/libasound.so.2
 pa_alsa_safe_mmap_begin ()
 ?? () from /usr/lib/pulse-0.9.16/modules/libalsa-util.so
 ?? () from /usr/lib/libpulsecommon-0.9.16.so
 start_thread () from /lib/tls/i686/cmov/libpthread.so.0
Title: pulseaudio crashed with SIGFPE in snd_pcm_mmap_begin()
Uname: Linux 2.6.31-5-generic i686
UserGroups: adm admin audio cdrom dialout dip fax fuse lpadmin netdev plugdev sambashare sudo tape video

LoonyPhoenix (loonyphoenix) wrote :

StacktraceTop:snd_pcm_mmap_begin (pcm=0x8597ec8, areas=0xb7db62e4,
pa_alsa_safe_mmap_begin (pcm=0x8597ec8, areas=0xb7db62e4,
thread_func (userdata=0x853d0c8)
internal_thread_func (userdata=0x853d040)
start_thread () from /lib/tls/i686/cmov/libpthread.so.0

Changed in pulseaudio (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
visibility: private → public
Daniel T Chen (crimsun) on 2009-08-16
affects: pulseaudio (Ubuntu) → alsa-lib (Ubuntu)
Changed in alsa-lib (Ubuntu):
assignee: nobody → Daniel T Chen (crimsun)
status: New → Triaged
Daniel T Chen (crimsun) wrote :

Is this crash triggered immediately when you log in, or has audio been playing for a while?

In a Terminal, please use 'killall pulseaudio && pulseaudio -vvvv' as Lennart recommends below. You'll need to check the debug output for the buffer_size value.

Quoting from the e-mail thread on the upstream development mailing list:
---
On Mon, 17.08.09 08:49, Takashi Iwai (<email address hidden>) wrote:

>
> At Sun, 16 Aug 2009 18:24:35 -0400,
> Daniel Chen wrote:
> >
> > Hi,
> >
> > In https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/412677
> > we're debugging an issue where snd_pcm_mmap_begin(), at line 6409 with
> >
> > *offset = *pcm->appl.ptr % pcm->buffer_size;
> >
> > appears to have pcm->buffer_size == 0. What's the correct approach in
> > handling this corner case?
>
> We could add a sanity check in the function, of course.
> But relying on it doesn't sound nice.
>
> At least, the caller should be surely at the certain state that the
> buffer has been set up, i.e. checking whether snd_pcm_state() returns
> SETUP or better condition.

Hmm, this bug is triggered in PA apparently. PA doesn't call
snd_pcm_mmap_begin() before the setup finished completely. Not sure
what's going on here, but this smells as if pcm->buffer_size is not
properly initialized.

Daniel, does this happen right-away on PA startup? Or does it
happen sometime while playing?

Could you get us the output of the PA startup phase when running
"pulsaudio -vvvv"? This should show us to which value the buffer_size
is initialized in the snd_pcm_t.

Lennart
---

LoonyPhoenix (loonyphoenix) wrote :

I don't even remember which pulseaudio bug this is (I've reported several), and whether it still persists, and they look the same to me anyway, but for what it's worth I don't remember a pulseaudio bug immediately upon logon :)

Here's my 'killall pulseaudio && pulseaudio -vvvv' output:

victor@victor-laptop:~$ killall pulseaudio && pulseaudio -vvvv
I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: core-rtclock.c: Timer slack is set to 50 us.
I: core-util.c: Failed to acquire high-priority scheduling: No such file or directory
I: main.c: This is PulseAudio 0.9.16-test4
D: main.c: Compilation host: i486-pc-linux-gnu
D: main.c: Compilation CFLAGS: -g -O2 -g -Wall -O3 -Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
D: main.c: Running on host: Linux i686 2.6.31-6-generic #25-Ubuntu SMP Fri Aug 14 16:25:04 UTC 2009
D: main.c: Found 2 CPUs.
I: main.c: Page size is 4096 bytes
D: main.c: Compiled with Valgrind support: no
D: main.c: Running in valgrind mode: no
D: main.c: Optimized build: yes
D: main.c: All asserts enabled.
I: main.c: Machine ID is 5e9192e1640abf42b2a25c9a4a78593d.
I: main.c: Session ID is 5e9192e1640abf42b2a25c9a4a78593d-1250522408.213824-395439946.
I: main.c: Using runtime directory /home/victor/.pulse/5e9192e1640abf42b2a25c9a4a78593d-runtime.
I: main.c: Using state directory /home/victor/.pulse.
I: main.c: Running in system mode: no
E: pid.c: Daemon already running.
E: main.c: pa_pid_file_create() failed.
victor@victor-laptop:~$

On Mon, Aug 17, 2009 at 11:33 AM, LoonyPhoenix<email address hidden> wrote:
> E: pid.c: Daemon already running.
> E: main.c: pa_pid_file_create() failed.

Ok, you need:

echo autospawn = no|tee -a ~/.pulse/client.conf
killall pulseaudio
pulseaudio -vvvv

LoonyPhoenix (loonyphoenix) wrote :

Ok, here it is. I killed the process with ctrl-c in the end because it had obviously initialized and was responding to me change volume. I'm sure you don't need that info :)

Daniel T Chen (crimsun) wrote :

On Sun, Sep 27, 2009 at 4:55 PM, Launchpad Bug Tracker
<email address hidden> wrote:
> ** Branch linked: lp:~crimsun/alsa-lib/ubuntu.new

Please reproduce this crash using the version of libasound2 in the
ubuntu-audio-dev PPA (when it's available shortly).

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package alsa-lib - 1.0.20-3ubuntu6

---------------
alsa-lib (1.0.20-3ubuntu6) karmic; urgency=low

  * debian/patches/Fix-fpe-snd_pcm_mmap_begin.patch: Handle attempts
    to div by zero (LP: #412677)

 -- Daniel T Chen <email address hidden> Sun, 27 Sep 2009 16:49:08 -0400

Changed in alsa-lib (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers