firefox: crashes on viideo stream with pulse.c:200: pulse_new: Assertion `p->context' failed.

Bug #371147 reported by Paul Gevers
60
This bug affects 7 people
Affects Status Importance Assigned to Milestone
PulseAudio
New
Undecided
Unassigned
firefox-3.0 (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Jaunty by tor@flatebo.org

Bug Description

Binary package hint: firefox-3.0

When I try to view the first video at http://www.bergredding.nl/?p=826 my firefox crashes. This is very reproducible. I have three extensions installed (Novell Moonlight 1.0, Unofficial Google Translate Firefox extension 1.3, and Web Developer 1.1.6)

If more information is needed, just let me know.

When I start firefox from a console I get the following output:

paul@etna ~ $ firefox
ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument

ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument

ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument

ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument

ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument

ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument

ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument

E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
firefox: pulse.c:200: pulse_new: Assertion `p->context' failed.
Aborted

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: firefox 3.0.10+nobinonly-0ubuntu0.9.04.1
PackageArchitecture: all
SourcePackage: firefox-3.0
Uname: Linux 2.6.28-11-generic i686

Revision history for this message
Paul Gevers (paul-climbing) wrote :
Revision history for this message
tor@flatebo.org (tor-flatebo) wrote :

I get this same error using eclipse. It works for a while then randomly crashes. Uninstalling pulseaudio package resolves the issue. I was listening to an audio stream through Amarok at the time of the crash.

Revision history for this message
Paul Gevers (paul-climbing) wrote : Re: [Bug 371147] Re: firefox: crashes on viideo stream with pulse.c:200: pulse_new: Assertion `p->context' failed.

> I get this same error using eclipse. It works for a while then randomly
> crashes. Uninstalling pulseaudio package resolves the issue. I was
> listening to an audio stream through Amarok at the time of the crash.

Uninstalling pulseaudio solved the crashing of firefox for me as well.
And still with sound and video.

Paul

Revision history for this message
Bjarne H. Nielsen (bjarne-h-nielsen) wrote :

Uninstalling pulseaudio worked for me as well.

Revision history for this message
John Vivirito (gnomefreak) wrote :

this is not caused by firefox bug pulseaudio

Changed in firefox-3.0 (Ubuntu):
status: New → Invalid
Revision history for this message
Troy Williams (twilliams18) wrote :

I have the same problem, but when I mark pulse audio for removal,
Synaptic Package Manager says it will also remove ubuntu-desktop. I
don't think that would be a good idea. Any suggestions?

On Mon, 2009-05-18 at 20:24 +0000, Bjarne H. Nielsen wrote:
> Uninstalling pulseaudio worked for me as well.
>

Revision history for this message
tor@flatebo.org (tor-flatebo) wrote :

You can go ahead and remove ubuntu-desktop, it won't have any noticable affect. I have done it on two machines so far. Other packages may re-add ubuntu-desktop, which may re-add pulse, then you will just have to remove it again. Hasn't happened to me yet.

Revision history for this message
David McNerney (david-mcnerney) wrote :

You can get around this by using the pulse server. The error message suggests that the problem is in the shm module and the server doesn't use shared memory.

So
grep pulse
kill
edit /etc/default/pulseaudio -> set SYSTEM_START=1
/etc/init.d/pulseaudio restart

Revision history for this message
Chris Sherlock (ta-bu-shi-da-yu) wrote :

The lines in question that are the problem are:

        if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, (off_t) 0)) == MAP_FAILED) {
            pa_log("mmap() failed: %s", pa_cstrerror(errno));
            goto fail;
        }

It should be easy enough to check to see if shared memory is in use, just run:

 mount | grep "shm"

If you get something like the following, then it's enabled:

tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)

Revision history for this message
Chris Sherlock (ta-bu-shi-da-yu) wrote :

The more I look at this, the more I think there is a problem with the function pa_context_new().

Need to file a bug against pulseaudio.

Revision history for this message
Chris Sherlock (ta-bu-shi-da-yu) wrote :

The more I look at this, the more I think there is a problem with the function pa_context_new().

How do we move this one forward?

Revision history for this message
Chris Sherlock (ta-bu-shi-da-yu) wrote :

I have reported this upstream:

http://pulseaudio.org/ticket/595

Revision history for this message
Paul Gevers (paul-climbing) wrote :

> The more I look at this, the more I think there is a problem with the
> function pa_context_new().
>
> How do we move this one forward?

I guess if it really should be fixed upstream look at their bugtracker
(see first if it is already fixed) and file a bug there [1]. If you find
 there that the bug is already fixed, add a link to the appropriate
upstream bug report in this bug report. You might also want to look in
the debian bug tracker to see if it is (or was) there [2].

[1] http://www.pulseaudio.org/wiki/Community#BugsPatchesTranslations
[2] http://bugs.debian.org/pulseaudio

Revision history for this message
Chris Sherlock (ta-bu-shi-da-yu) wrote :

Yup, done already. See my comment before your last one :-)

Revision history for this message
Tpugliese (thomas-pugliese) wrote :

I did a 'rm -fr ~/.pulse*' for all users which fixed the problem on my machine.

see https://bugs.launchpad.net/bugs/274577

Revision history for this message
Chris Sherlock (ta-bu-shi-da-yu) wrote :

This has been fixed upstream by lennart - see the bug I reported earlier on - http://pulseaudio.org/ticket/595

Revision history for this message
Chris Sherlock (ta-bu-shi-da-yu) wrote :

@Tpugliese - that's an unreliable workaround at best, and at worst it stops us from finding what's causing this. Do you know why this works?

Revision history for this message
Tpugliese (thomas-pugliese) wrote : Re: [Bug 371147] Re: firefox: crashes on viideo stream with pulse.c:200: pulse_new: Assertion `p->context' failed.
Download full text (6.6 KiB)

I would say it is pretty reliable. Deleting the ~/.pulse directory
fixed the problem on two systems for me. Make sure firefox is closed
when deleting the files and it will clear up the crash.

I have no idea why it works, nor do I particularly care. I passed
along the workaround for anyone else who, like me, had a broken system
and wanted it fixed. My setup quit working after a power failure so I
speculate that it may be related to file corruption in some file in
the .pulse directory. It could also be related to having FF 3.0 and
3.5 installed simultaneously.

On Sat, Aug 1, 2009 at 1:01 AM, Chris Sherlock<email address hidden> wrote:
> @Tpugliese - that's an unreliable workaround at best, and at worst it
> stops us from finding what's causing this. Do you know why this works?
>
> --
> firefox: crashes on viideo stream with pulse.c:200: pulse_new: Assertion `p->context' failed.
> https://bugs.launchpad.net/bugs/371147
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in PulseAudio sound server: New
> Status in “firefox-3.0” package in Ubuntu: Invalid
>
> Bug description:
> Binary package hint: firefox-3.0
>
> When I try to view the first video at http://www.bergredding.nl/?p=826 my firefox crashes. This is very reproducible. I have three extensions installed (Novell Moonlight 1.0, Unofficial Google Translate Firefox extension 1.3, and Web Developer 1.1.6)
>
> If more information is needed, just let me know.
>
> When I start firefox from a console I get the following output:
>
> paul@etna ~ $ firefox
> ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument
>
> ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument
>
> ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument
>
> ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument
>
> ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument
>
> ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument
>
> ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument
>
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() failed: Cannot allocate memory
> E: shm.c: mmap() fail...

Read more...

Revision history for this message
Chris Sherlock (ta-bu-shi-da-yu) wrote :

I'm quite surprised this works... but more concerned that your workaround might stop something else working. Anyone who reads the workaround has been warned!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.