firefox gets 100% cpu and sometimes segfaults when using deb built package libasound2

Bug #1254562 reported by firefoxiscute
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
alsa-lib (Ubuntu)
New
Undecided
Unassigned
ubuntu-meta (Ubuntu)
New
Undecided
Unassigned

Bug Description

See firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=938361
In the backtraces attached there you can see that libasound.so is causing the bug.

It seems that the way libasound gets built determines the way firefox behaves: You get the error only when you use the automated method "apt-get source -b" for building libasound; If you build it manually, there is no error. See detailed instructions below.

Steps to reproduce (1st way):
See firefox bug.

Steps to reproduce (2nd way):

mkdir libasound-deb
cd libasound-deb
apt-get source -b libasound2=1.0.27.2-1ubuntu6
ar p libasound2_1.0.27.2-1ubuntu6_amd64.deb data.tar.gz | tar -xzf -
LD_PRELOAD=`pwd`/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0 firefox http://mozilla.github.io/webrtc-landing/gum_test.html & lsof | grep $! | grep libasound.so
# Now click on "Video", "Audio" or "Video & Audio", it doesn't matter!
# see cpu at constant 100%
sleep 30
kill $!

However, the bug can't be reproduced with the following steps.
Steps to NOT reproduce:

mkdir libasound-manual
cd libasound-manual
apt-get source libasound2=1.0.27.2-1ubuntu6
cd alsa-lib-1.0.27.2/
make clean; ./gitcompile ; autoconf; ./configure --prefix=`pwd`/../; make; make install
LD_PRELOAD=`pwd`/../lib/libasound.so.2.0.0 firefox http://mozilla.github.io/webrtc-landing/gum_test.html & lsof | grep $! | grep libasound.so

Also not reproducible with automatically built package version 2_1.0.25-4ubuntu3.1:

mkdir libasound-old
cd libasound-old
wget http://archive.ubuntu.com/ubuntu/pool/main/a/alsa-lib/libasound2_1.0.25-4ubuntu3.1_amd64.deb
ar p libasound2_1.0.25-4ubuntu3.1_amd64.deb data.tar.gz | tar -xzf -
LD_PRELOAD=`pwd`/../lib/libasound.so.2.0.0 firefox http://mozilla.github.io/webrtc-landing/gum_test.html & lsof | grep $! | grep libasound.so

I've also checked out the sources from upstream, there the bug also doesn't show up. Something in the way the package gets built automatically is messed up.
I've verified the behaviour on two different hardwares.

Revision history for this message
Stephen Malina (stephenmalina) wrote :

This bug prevents me from reinstalling ubuntu-desktop also.

Revision history for this message
firefoxiscute (firefoxiscute) wrote :

Stephen, can you reproduce the bug with invoking something else than getusermedia on firefox?

Please note, there exists a workaround:

mkdir libasound-manual
cd libasound-manual
apt-get source libasound2=1.0.27.2-1ubuntu6
cd alsa-lib-1.0.27.2/
make clean; ./gitcompile ; autoconf; ./configure; make;
sudo make install

affects: ubuntu-desktop-versions → ubuntu-meta (Ubuntu)
Revision history for this message
firefoxiscute (firefoxiscute) wrote :

Somehow the bug disappeared in recent firefox. See bugzilla report for more information.

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.