X
Tap here to go to the mobile version of the site.

Support Forum

High CPU when trying to get my camera with getusermedia

Posted

I'm trying to develop an application that uses the camera and microphone, and it all works well on different browsers that I've tested, but when I get to Firefox on Linux I get this weird problem that it makes Firefox CPU usage to soar to around 100% (between 96% and 103%) and it'll never actually displays the classic popup with the confirmation to share camera and mic. Do you have this issue contemplated? I've tested this application on Chrome on Windows and on Linux and no problem, also I've tested on the Windows Firefox (23) and it has no issues, it's only on the Linux version (23 also) that I'm currently having this issue. And it is not only on my "probably poorly constructed app" that I'm getting this issue, if I go and test on either www.simpl.info/gum or iambrandonn.github.com/WebcamSwiper I get the same behaviour This is my system info just in case OS: Gentoo Linux Firefox: www-client/firefox-bin-23.0 Extra add-ons: NoScript and Firebug Tried with cleaning up and starting with a fresh version of Firefox? Yes

Let me know if I can give any more info on this. Thanks!

I'm trying to develop an application that uses the camera and microphone, and it all works well on different browsers that I've tested, but when I get to Firefox on Linux I get this weird problem that it makes Firefox CPU usage to soar to around 100% (between 96% and 103%) and it'll never actually displays the classic popup with the confirmation to share camera and mic. Do you have this issue contemplated? I've tested this application on Chrome on Windows and on Linux and no problem, also I've tested on the Windows Firefox (23) and it has no issues, it's only on the Linux version (23 also) that I'm currently having this issue. And it is not only on my "probably poorly constructed app" that I'm getting this issue, if I go and test on either www.simpl.info/gum or iambrandonn.github.com/WebcamSwiper I get the same behaviour This is my system info just in case OS: Gentoo Linux Firefox: www-client/firefox-bin-23.0 Extra add-ons: NoScript and Firebug Tried with cleaning up and starting with a fresh version of Firefox? Yes Let me know if I can give any more info on this. Thanks!

Chosen solution

I experiencing same problem here.

I have found an old bug in alsa-lib project that had been updated recently.

https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/1008600

It is related to snd_device_name_hint and probably to this topic. Also there is a commit in alsa-lib repo that points to that bug.

commit 23bf1dce9438c0cf74357928289aa8f06957c283 Author: David Henningsson <david.henningsson@canonical.com> Date: Fri Sep 13 13:21:44 2013 -0400

   Fix access of freed memory in namehints
   
   Sometimes a hook manipulates the config tree, which makes currently
   running iterators point to freed memory. As a workaround, make two
   copies, one for the iterators and another for the hooks.
   
   BugLink: https://bugs.launchpad.net/bugs/1008600
   Signed-off-by: David Henningsson <david.henningsson@canonical.com>
   Signed-off-by: Takashi Iwai <tiwai@suse.de>

I'm trying to get a patch working on my system to know if these solves the firefox crash.

BTW Im using gentoo 3.10.0-rc2+ and pulseaudio-2.1-r1

Read this answer in context 1

Additional System Details

Application

  • User Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.49 Safari/537.36

More Information

John99 971 solutions 13138 answers

Not sure what your problem may be. I tried using Ubuntu 12.04 on Firefox Canonical 24. With Noscript and Firebug installed and enabled. I stayed under 100% CPU with four windows open in Fifefox. Multi tab browsing, 2x the www.simpl.info/gum & 1x http://iambrandonn.github.com/WebcamSwiper. The camera worked, the picture dispalyed and the page swiping worked.

Having said it works-for-me no script is quite likely to block scripts and cause hangs and Firebug is something I only enable when it is actually needed.

As you have written an app are you able to produce some simple reduced testcase that demonstrates the problem ? If so you could then consider discussing in AMO prior to filing a bug

You may also wish to checkout Gentoo support in case the issue relates to the OS or to the distro build of Firefox.

Not sure what your problem may be. I tried using Ubuntu 12.04 on Firefox Canonical 24. With Noscript and Firebug installed and enabled. I stayed under 100% CPU with four windows open in Fifefox. Multi tab browsing, 2x the www.simpl.info/gum & 1x http://iambrandonn.github.com/WebcamSwiper. The camera worked, the picture dispalyed and the page swiping worked. Having said it works-for-me no script is quite likely to block scripts and cause hangs and Firebug is something I only enable when it is actually needed. As you have written an app are you able to produce some simple reduced testcase that demonstrates the problem ? If so you could then consider discussing in [https://forums.mozilla.org/addons/ AMO] prior to filing a bug You may also wish to checkout Gentoo support in case the issue relates to the OS or to the distro build of Firefox. *Have you tried a mozilla build of Firefox for comparison ? **[[Install Firefox on Linux]]

Question owner

It's weird that you can simply get to that page. I just tried to get to http://www.simpl.info/gum on a fresh and new version of the Mozilla build. I removed the binary build for Gentoo (and I'm guessing is the same thing because it's not compiling the source, but just in case) from my system, removed my profile folder, then I downloaded the build from the site and the first thing that I did is to put that link on the browser and it crashed. I submitted the crash to Mozilla, but it's still weird.

It's weird that you can simply get to that page. I just tried to get to http://www.simpl.info/gum on a fresh and new version of the Mozilla build. I removed the binary build for Gentoo (and I'm guessing is the same thing because it's not compiling the source, but just in case) from my system, removed my profile folder, then I downloaded the build from the site and the first thing that I did is to put that link on the browser and it crashed. I submitted the crash to Mozilla, but it's still weird.
cor-el
  • Top 10 Contributor
  • Moderator
16545 solutions 149393 answers

If you have submitted crash reports then please post the IDs of one or more recent crash reports that have a "bp-" prefix:

  • bp-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

You can find the IDs of the submitted crash reports on the about:crashes page.

  • You can open the about:crashes page via the location bar, like you open a website, or open the crash reports page via "Help > Troubleshooting Information".

See:

If you have submitted crash reports then please post the IDs of one or more recent crash reports that have a "bp-" prefix: *bp-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx You can find the IDs of the submitted crash reports on the <i>about:crashes</i> page. *You can open the <b>about:crashes</b> page via the location bar, like you open a website, or open the crash reports page via "Help > Troubleshooting Information". See: *http://kb.mozillazine.org/Mozilla_Crash_Reporter *https://support.mozilla.org/kb/Mozilla+Crash+Reporter

Question owner

Yeah sorry, I forgot, this is the id of the crash: bp-6c7e4e92-93f2-4aca-a809-eb59c2130812

https://crash-stats.mozilla.com/report/index/bp-6c7e4e92-93f2-4aca-a809-eb59c2130812

Thanks!

Yeah sorry, I forgot, this is the id of the crash: bp-6c7e4e92-93f2-4aca-a809-eb59c2130812 https://crash-stats.mozilla.com/report/index/bp-6c7e4e92-93f2-4aca-a809-eb59c2130812 Thanks!
John99 971 solutions 13138 answers

Sorry, No idea, so if no one else answers by next week bump the question or pm me.

Sorry, No idea, so if no one else answers by next week bump the question or pm me.
kobe 441 solutions 5048 answers

I think the current version of libc-bin is 2.17, can you try updating that?

I think the current version of libc-bin is 2.17, can you try updating that?

Question owner

I've updated to 2.17 and it still crashed, now the crash is this: bp-0ed40596-521c-4f65-b9c3-13c262130814 https://crash-stats.mozilla.com/report/index/bp-0ed40596-521c-4f65-b9c3-13c262130814 Can you give me any more pointers on how to solve this?

Thanks

I've updated to 2.17 and it still crashed, now the crash is this: bp-0ed40596-521c-4f65-b9c3-13c262130814 https://crash-stats.mozilla.com/report/index/bp-0ed40596-521c-4f65-b9c3-13c262130814 Can you give me any more pointers on how to solve this? Thanks
John99 971 solutions 13138 answers

Sorry no ideas at present I will leave it to others.

I did earlier ask if you trying Gentoo support may help,as it is only crashing on that particular OS. Presumably the libc-bin used is 32bit to match your OS and Firefox, I also note Gentoo returns a lot of search results for glibc.


For forum cross referencing purposes

  1. Report for Crash ID bp-6c7e4e92-93f2-4aca-a809-eb59c2130812
  2. Report for Crash ID bp-0ed40596-521c-4f65-b9c3-13c262130814
Sorry no ideas at present I will leave it to others. I did earlier ask if you trying Gentoo support may help,as it is only crashing on that particular OS. Presumably the libc-bin used is 32bit to match your OS and Firefox, I also note Gentoo returns a lot of search results for glibc. ---------- For forum cross referencing purposes # Report for Crash ID bp-6c7e4e92-93f2-4aca-a809-eb59c2130812 #* Crash Signature: libc-2.15.so@0x4595e #Report for Crash ID bp-0ed40596-521c-4f65-b9c3-13c262130814 #* Crash Signature: libc-2.17.so@0x4c20d
cor-el
  • Top 10 Contributor
  • Moderator
16545 solutions 149393 answers

This looks like a problem with ALSA (libasound.so.2.0.0)

Here is a bug where this library is involved:

  • Bug 833161 - Firefox crashes upon receiving Facebook messages in the background.
This looks like a problem with ALSA (libasound.so.2.0.0) Here is a bug where this library is involved: *Bug 833161 - Firefox crashes upon receiving Facebook messages in the background.

Question owner

Hi,

Thanks for answering with the alsa stuff, I tried the workaround mentioned on that bug but still nothing, i've updated all the libraries that I can find related to alsa and still no clues. I have another crash with the new Firefox 23.0.1 and my "updated system", just in case bp-c9b53456-7c44-48cf-bbb4-9a2bf2130819 But still I find it very weird

https://crash-stats.mozilla.com/report/index/c9b53456-7c44-48cf-bbb4-9a2bf2130819

Thanks.

Hi, Thanks for answering with the alsa stuff, I tried the workaround mentioned on that bug but still nothing, i've updated all the libraries that I can find related to alsa and still no clues. I have another crash with the new Firefox 23.0.1 and my "updated system", just in case bp-c9b53456-7c44-48cf-bbb4-9a2bf2130819 But still I find it very weird https://crash-stats.mozilla.com/report/index/c9b53456-7c44-48cf-bbb4-9a2bf2130819 Thanks.
John99 971 solutions 13138 answers

Sorry I have not got any ideas. The new Crash IDs link to reports with the crash signature we have already seen.

Sorry I have not got any ideas. The new Crash IDs link to reports with the crash signature we have already seen.

Question owner

Hi,

I just got back to the issue and I think I found a lead to the problem. As cor-el was saying I guess there's some issues with libasound, and there's the comment on the actual code

http://mxr.mozilla.org/mozilla-release/source/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc#1844

There it says that you shouldn't use -1 because of an access violation and it's still there. If I change that to 0 it gets my camera without any issues and goes through. Is that the problem?

Cheers!

Hi, I just got back to the issue and I think I found a lead to the problem. As cor-el was saying I guess there's some issues with libasound, and there's the comment on the actual code http://mxr.mozilla.org/mozilla-release/source/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc#1844 There it says that you shouldn't use -1 because of an access violation and it's still there. If I change that to 0 it gets my camera without any issues and goes through. Is that the problem? Cheers!

Question owner

Nope, that was not a solution, the check for the -1 is inside and it's all right. If I change that only makes it that somehow the audio is not being recognized (it skips the initial and only sound device) and on the simpl.info page only uses the video, so that works. The problem is in the call on the line 1847 though: http://mxr.mozilla.org/mozilla-release/source/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc#1847 I've been trying to test that with gdb and here's the bt before the call when the problem arises:

Breakpoint 1, webrtc::AudioDeviceLinuxALSA::GetDevicesInfo (this=0x9ac02e70, function=0, playback=false, enumDeviceNo=0, enumDeviceName=0x0, ednLen=0, enumDeviceId=0x0, 
    ediLen=0) at /src/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc:1861
1861            err = LATE(snd_device_name_hint)(card, "pcm", &hints);
(gdb) bt
#0  webrtc::AudioDeviceLinuxALSA::GetDevicesInfo (this=0x9ac02e70, function=0, playback=false, enumDeviceNo=0, enumDeviceName=0x0, ednLen=0, enumDeviceId=0x0, ediLen=0)
    at /src/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc:1861
#1  0xb3cb6fa4 in webrtc::AudioDeviceLinuxALSA::SetRecordingDevice (this=0x9ac02e70, index=0)
    at /src/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc:1007
#2  0xb3cb3d4b in webrtc::AudioDeviceModuleImpl::SetRecordingDevice (this=0xa5664000, index=0)
    at /src/media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc:1581
#3  0xb3c3b28e in webrtc::VoEBaseImpl::Init (this=0x9af2d13c, external_adm=0x0, audioproc=0x0) at /src/media/webrtc/trunk/webrtc/voice_engine/voe_base_impl.cc:443
#4  0xb1ff86fe in mozilla::MediaEngineWebRTC::EnumerateAudioDevices (this=0x9adb6be0, aASources=0x99aff108) at /src/content/media/webrtc/MediaEngineWebRTC.cpp:268
#5  0xb227e244 in mozilla::GetSources<mozilla::MediaEngineAudioSource> (engine=0x9adb6be0, aConstraints=..., 
    aEnumerate=&virtual mozilla::MediaEngine::EnumerateAudioDevices(nsTArray<nsRefPtr<mozilla::MediaEngineAudioSource> >*)) at /src/dom/media/MediaManager.cpp:677
#6  0xb22822e2 in mozilla::GetUserMediaDevicesRunnable::Run (this=0x9adb6b20) at /src/dom/media/MediaManager.cpp:1027
#7  0xb36ccb34 in nsThread::ProcessNextEvent (this=0xa4ced390, mayWait=true, result=0x99aff2cf) at /src/xpcom/threads/nsThread.cpp:622
#8  0xb3652e0a in NS_ProcessNextEvent (thread=0xa4ced390, mayWait=true) at /src/xpcom/glue/nsThreadUtils.cpp:238
#9  0xb36cbacb in nsThread::ThreadFunc (arg=0xa4ced390) at /src/xpcom/threads/nsThread.cpp:250
#10 0xb7b7ce19 in _pt_root (arg=0x9b08b140) at /src/nsprpub/pr/src/pthreads/ptthread.c:204
#11 0xb7fa2e15 in start_thread () from /lib/libpthread.so.0
#12 0xb7d8fa7e in clone () from /lib/libc.so.6


And sometimes I get a segfault that has the following bt: 
Program received signal SIGSEGV, Segmentation fault.
0xb7ce620d in vfprintf () from /lib/libc.so.6
(gdb) bt
#0  0xb7ce620d in vfprintf () from /lib/libc.so.6
#1  0xb7da38ec in __vsprintf_chk () from /lib/libc.so.6
#2  0xb7da37ff in __sprintf_chk () from /lib/libc.so.6
#3  0xb0c63227 in ?? () from /usr/lib/libasound.so.2
#4  0xb0c64017 in ?? () from /usr/lib/libasound.so.2
#5  0xb0c644f7 in snd_device_name_hint () from /usr/lib/libasound.so.2
#6  0xb3cb8d38 in webrtc::AudioDeviceLinuxALSA::GetDevicesInfo (this=0x9ac02e70, function=0, playback=false, enumDeviceNo=0, enumDeviceName=0x0, ednLen=0, 
    enumDeviceId=0x0, ediLen=0) at /src/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc:1861
#7  0xb3cb6fa4 in webrtc::AudioDeviceLinuxALSA::SetRecordingDevice (this=0x9ac02e70, index=0)
    at /src/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc:1007
#8  0xb3cb3d4b in webrtc::AudioDeviceModuleImpl::SetRecordingDevice (this=0xa5664000, index=0)
    at /src/media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc:1581
#9  0xb3c3b28e in webrtc::VoEBaseImpl::Init (this=0x9af2d13c, external_adm=0x0, audioproc=0x0) at /src/media/webrtc/trunk/webrtc/voice_engine/voe_base_impl.cc:443
#10 0xb1ff86fe in mozilla::MediaEngineWebRTC::EnumerateAudioDevices (this=0x9adb6be0, aASources=0x99aff108) at /src/content/media/webrtc/MediaEngineWebRTC.cpp:268
#11 0xb227e244 in mozilla::GetSources<mozilla::MediaEngineAudioSource> (engine=0x9adb6be0, aConstraints=..., 
    aEnumerate=&virtual mozilla::MediaEngine::EnumerateAudioDevices(nsTArray<nsRefPtr<mozilla::MediaEngineAudioSource> >*)) at /src/dom/media/MediaManager.cpp:677
#12 0xb22822e2 in mozilla::GetUserMediaDevicesRunnable::Run (this=0x9adb6b20) at /src/dom/media/MediaManager.cpp:1027
#13 0xb36ccb34 in nsThread::ProcessNextEvent (this=0xa4ced390, mayWait=true, result=0x99aff2cf) at /src/xpcom/threads/nsThread.cpp:622
#14 0xb3652e0a in NS_ProcessNextEvent (thread=0xa4ced390, mayWait=true) at /src/xpcom/glue/nsThreadUtils.cpp:238
#15 0xb36cbacb in nsThread::ThreadFunc (arg=0xa4ced390) at /src/xpcom/threads/nsThread.cpp:250
#16 0xb7b7ce19 in _pt_root (arg=0x9b08b140) at /src/nsprpub/pr/src/pthreads/ptthread.c:204
#17 0xb7fa2e15 in start_thread () from /lib/libpthread.so.0
#18 0xb7d8fa7e in clone () from /lib/libc.so.6

So it's definetly at the "snd_device_name_hint" method, but I have no idea how that libasound works and I guess I'm getting way too deep in something that I don't know anything about. Can you guys help me? Or do you know where can I get some help?

Cheers!

Nope, that was not a solution, the check for the -1 is inside and it's all right. If I change that only makes it that somehow the audio is not being recognized (it skips the initial and only sound device) and on the simpl.info page only uses the video, so that works. The problem is in the call on the line 1847 though: http://mxr.mozilla.org/mozilla-release/source/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc#1847 I've been trying to test that with gdb and here's the bt before the call when the problem arises: <pre><nowiki>Breakpoint 1, webrtc::AudioDeviceLinuxALSA::GetDevicesInfo (this=0x9ac02e70, function=0, playback=false, enumDeviceNo=0, enumDeviceName=0x0, ednLen=0, enumDeviceId=0x0, ediLen=0) at /src/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc:1861 1861 err = LATE(snd_device_name_hint)(card, "pcm", &hints); (gdb) bt #0 webrtc::AudioDeviceLinuxALSA::GetDevicesInfo (this=0x9ac02e70, function=0, playback=false, enumDeviceNo=0, enumDeviceName=0x0, ednLen=0, enumDeviceId=0x0, ediLen=0) at /src/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc:1861 #1 0xb3cb6fa4 in webrtc::AudioDeviceLinuxALSA::SetRecordingDevice (this=0x9ac02e70, index=0) at /src/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc:1007 #2 0xb3cb3d4b in webrtc::AudioDeviceModuleImpl::SetRecordingDevice (this=0xa5664000, index=0) at /src/media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc:1581 #3 0xb3c3b28e in webrtc::VoEBaseImpl::Init (this=0x9af2d13c, external_adm=0x0, audioproc=0x0) at /src/media/webrtc/trunk/webrtc/voice_engine/voe_base_impl.cc:443 #4 0xb1ff86fe in mozilla::MediaEngineWebRTC::EnumerateAudioDevices (this=0x9adb6be0, aASources=0x99aff108) at /src/content/media/webrtc/MediaEngineWebRTC.cpp:268 #5 0xb227e244 in mozilla::GetSources<mozilla::MediaEngineAudioSource> (engine=0x9adb6be0, aConstraints=..., aEnumerate=&virtual mozilla::MediaEngine::EnumerateAudioDevices(nsTArray<nsRefPtr<mozilla::MediaEngineAudioSource> >*)) at /src/dom/media/MediaManager.cpp:677 #6 0xb22822e2 in mozilla::GetUserMediaDevicesRunnable::Run (this=0x9adb6b20) at /src/dom/media/MediaManager.cpp:1027 #7 0xb36ccb34 in nsThread::ProcessNextEvent (this=0xa4ced390, mayWait=true, result=0x99aff2cf) at /src/xpcom/threads/nsThread.cpp:622 #8 0xb3652e0a in NS_ProcessNextEvent (thread=0xa4ced390, mayWait=true) at /src/xpcom/glue/nsThreadUtils.cpp:238 #9 0xb36cbacb in nsThread::ThreadFunc (arg=0xa4ced390) at /src/xpcom/threads/nsThread.cpp:250 #10 0xb7b7ce19 in _pt_root (arg=0x9b08b140) at /src/nsprpub/pr/src/pthreads/ptthread.c:204 #11 0xb7fa2e15 in start_thread () from /lib/libpthread.so.0 #12 0xb7d8fa7e in clone () from /lib/libc.so.6 And sometimes I get a segfault that has the following bt: Program received signal SIGSEGV, Segmentation fault. 0xb7ce620d in vfprintf () from /lib/libc.so.6 (gdb) bt #0 0xb7ce620d in vfprintf () from /lib/libc.so.6 #1 0xb7da38ec in __vsprintf_chk () from /lib/libc.so.6 #2 0xb7da37ff in __sprintf_chk () from /lib/libc.so.6 #3 0xb0c63227 in ?? () from /usr/lib/libasound.so.2 #4 0xb0c64017 in ?? () from /usr/lib/libasound.so.2 #5 0xb0c644f7 in snd_device_name_hint () from /usr/lib/libasound.so.2 #6 0xb3cb8d38 in webrtc::AudioDeviceLinuxALSA::GetDevicesInfo (this=0x9ac02e70, function=0, playback=false, enumDeviceNo=0, enumDeviceName=0x0, ednLen=0, enumDeviceId=0x0, ediLen=0) at /src/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc:1861 #7 0xb3cb6fa4 in webrtc::AudioDeviceLinuxALSA::SetRecordingDevice (this=0x9ac02e70, index=0) at /src/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc:1007 #8 0xb3cb3d4b in webrtc::AudioDeviceModuleImpl::SetRecordingDevice (this=0xa5664000, index=0) at /src/media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc:1581 #9 0xb3c3b28e in webrtc::VoEBaseImpl::Init (this=0x9af2d13c, external_adm=0x0, audioproc=0x0) at /src/media/webrtc/trunk/webrtc/voice_engine/voe_base_impl.cc:443 #10 0xb1ff86fe in mozilla::MediaEngineWebRTC::EnumerateAudioDevices (this=0x9adb6be0, aASources=0x99aff108) at /src/content/media/webrtc/MediaEngineWebRTC.cpp:268 #11 0xb227e244 in mozilla::GetSources<mozilla::MediaEngineAudioSource> (engine=0x9adb6be0, aConstraints=..., aEnumerate=&virtual mozilla::MediaEngine::EnumerateAudioDevices(nsTArray<nsRefPtr<mozilla::MediaEngineAudioSource> >*)) at /src/dom/media/MediaManager.cpp:677 #12 0xb22822e2 in mozilla::GetUserMediaDevicesRunnable::Run (this=0x9adb6b20) at /src/dom/media/MediaManager.cpp:1027 #13 0xb36ccb34 in nsThread::ProcessNextEvent (this=0xa4ced390, mayWait=true, result=0x99aff2cf) at /src/xpcom/threads/nsThread.cpp:622 #14 0xb3652e0a in NS_ProcessNextEvent (thread=0xa4ced390, mayWait=true) at /src/xpcom/glue/nsThreadUtils.cpp:238 #15 0xb36cbacb in nsThread::ThreadFunc (arg=0xa4ced390) at /src/xpcom/threads/nsThread.cpp:250 #16 0xb7b7ce19 in _pt_root (arg=0x9b08b140) at /src/nsprpub/pr/src/pthreads/ptthread.c:204 #17 0xb7fa2e15 in start_thread () from /lib/libpthread.so.0 #18 0xb7d8fa7e in clone () from /lib/libc.so.6 </nowiki></pre> So it's definetly at the "snd_device_name_hint" method, but I have no idea how that libasound works and I guess I'm getting way too deep in something that I don't know anything about. Can you guys help me? Or do you know where can I get some help? Cheers!

Modified by cor-el

nanocity 1 solutions 2 answers

Chosen Solution

I experiencing same problem here.

I have found an old bug in alsa-lib project that had been updated recently.

https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/1008600

It is related to snd_device_name_hint and probably to this topic. Also there is a commit in alsa-lib repo that points to that bug.

commit 23bf1dce9438c0cf74357928289aa8f06957c283 Author: David Henningsson <david.henningsson@canonical.com> Date: Fri Sep 13 13:21:44 2013 -0400

   Fix access of freed memory in namehints
   
   Sometimes a hook manipulates the config tree, which makes currently
   running iterators point to freed memory. As a workaround, make two
   copies, one for the iterators and another for the hooks.
   
   BugLink: https://bugs.launchpad.net/bugs/1008600
   Signed-off-by: David Henningsson <david.henningsson@canonical.com>
   Signed-off-by: Takashi Iwai <tiwai@suse.de>

I'm trying to get a patch working on my system to know if these solves the firefox crash.

BTW Im using gentoo 3.10.0-rc2+ and pulseaudio-2.1-r1

I experiencing same problem here. I have found an old bug in alsa-lib project that had been updated recently. https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/1008600 It is related to snd_device_name_hint and probably to this topic. Also there is a commit in alsa-lib repo that points to that bug. commit 23bf1dce9438c0cf74357928289aa8f06957c283 Author: David Henningsson <david.henningsson@canonical.com> Date: Fri Sep 13 13:21:44 2013 -0400 Fix access of freed memory in namehints Sometimes a hook manipulates the config tree, which makes currently running iterators point to freed memory. As a workaround, make two copies, one for the iterators and another for the hooks. BugLink: https://bugs.launchpad.net/bugs/1008600 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> I'm trying to get a patch working on my system to know if these solves the firefox crash. BTW Im using gentoo 3.10.0-rc2+ and pulseaudio-2.1-r1

Modified by nanocity

nanocity 1 solutions 2 answers

Helpful Reply

Quick follow up.

I have just apply a patch with that commit on pulseaudio, and now firefox nightly seems to work. Firefox 23.0 complains about AudioContext functions though.

Also, neither Nightly nor Firefox 23.0 work if I have WebRTC already running in a Chromium browser but I think that is not related to this topic. Alsa log is following:

ALSA lib pcm.c:7889:(snd_pcm_set_params) Broken configuration for CAPTURE: no configurations available ALSA lib pcm.c:7913:(snd_pcm_set_params) Channels count (1) not available for CAPTURE: Argumento inválido ALSA lib pcm.c:7913:(snd_pcm_set_params) Channels count (1) not available for CAPTURE: Argumento inválido ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave

And repeat last lines over and over.

Quick follow up. I have just apply a patch with that commit on pulseaudio, and now firefox nightly seems to work. Firefox 23.0 complains about AudioContext functions though. Also, neither Nightly nor Firefox 23.0 work if I have WebRTC already running in a Chromium browser but I think that is not related to this topic. Alsa log is following: ALSA lib pcm.c:7889:(snd_pcm_set_params) Broken configuration for CAPTURE: no configurations available ALSA lib pcm.c:7913:(snd_pcm_set_params) Channels count (1) not available for CAPTURE: Argumento inválido ALSA lib pcm.c:7913:(snd_pcm_set_params) Channels count (1) not available for CAPTURE: Argumento inválido ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave And repeat last lines over and over.

Question owner

Excellent !! Sorry to get back to you so late but, yep that solved the problem completely. Thanks a lot.

Excellent !! Sorry to get back to you so late but, yep that solved the problem completely. Thanks a lot.