Crash in _platform_bzero$VARIANT$Haswell

RESOLVED FIXED

Status

()

Core
WebRTC: Audio/Video
P1
critical
Rank:
10
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: mboldan, Assigned: jesup)

Tracking

({crash, regression})

Trunk
All
Mac OS X
crash, regression
Points:
---

Firefox Tracking Flags

(firefox49 unaffected, firefox50 unaffected, firefox51 fixed, firefox52 fixed)

Details

(crash signature)

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

2 years ago
This bug was filed from the Socorro interface and is 
report bp-54231df3-0050-4141-8887-bbb452160929.
=============================================================

[Affected versions]:
- Firefox 50.0b2, Firefox 51.0a2 (2016-09-28), Firefox 52.0a1 (2016-09-28)

[Affected platforms]:
- Mac OS X 10.11.6, Mac OS X 10.12.1

[Steps to reproduce]:
Prerequisites: An USB external Mic is plugged in.

1. Go to a communication site that require a microphone (Eg. https://meet.jit.si/) and start a conversation.
2. Select the external Mic when the share microphone pop-up is displayed.
3. After the conversation started, unplug the external Mic.

[Expected result]:
The default Mic from the Mac is enabled.

[Actual result]:
Firefox crashes. The issue is caused by switching to the built in Mic.

[Regression range]:
This is a regression. I will follow up asap.

[Notes]:
- The issue is not reproducible on Mac OS X 10.9, or on Mac OS X 10.10.
- The issue is not reproducible on Firefox 49.0.1.
- Note that the crash is reproducible if the Mic from a webcam is used.
- If a Mic is connected to the Mac with jack, the crash is not reproducible.
(Reporter)

Comment 2

2 years ago
Here is the pushlog for this crash: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=68a682ef9e59eabb5d0f1fda05e84a773ca8340b&tochange=7f2f44eaea09c02079d8f1a0be777cd39776712e

It seems that Bug 1243857 caused this issue.
Keywords: regressionwindow-wanted → regression
Did you retest with media.navigator.audio.full_duplex set to false? If not, can you please retest? Do not forget to restart FF after flipping the flag.
(Reporter)

Comment 4

2 years ago
The crash is not reproducible with the pref set to false, but after unplugging the Mic, the build in microphone is not enabled.
The tests were performed on Firefox 50.0b3 and on Firefox 52.0a1 (2016-09-29), under Mac OS X 10.12.1.

Note that the crash is still reproducible with the pref set to true on the tested builds.
(Assignee)

Updated

2 years ago
Assignee: nobody → rjesup
Rank: 10
Priority: -- → P1
Can you please report back the device rates for input and output. They can be found using "Audio MIDI Setup" from Applications -> Utilities.

In addition can you please try to repro the crash after choosing the c930 mic as default input from System Preference -> Sound -> Input and choose the default input (which should be c930) when you will be prompted to share mic.
(Reporter)

Comment 6

2 years ago
(In reply to Alex Chronopoulos [:achronop] from comment #5)
> Can you please report back the device rates for input and output. They can
> be found using "Audio MIDI Setup" from Applications -> Utilities.

For Build-in Microphone the Source is Internal Microphone, Format 44100.0HZ, 2ch-24bit Integer, and for Built-in Output the Source is Internal Speakers, Format:44100.0HZ, 2ch-24bit Integer. 
Note that this settings are from Mac OS X 10.11.6.

> 
> In addition can you please try to repro the crash after choosing the c930
> mic as default input from System Preference -> Sound -> Input and choose the
> default input (which should be c930) when you will be prompted to share mic.

If you are referring to select the Internal mic at step 2 from STR, the crash is not reproducible. But if you are saying to choose the internal mic after performing step 3 from STR, that is not possible, taking in consideration that the FF crashes before the pop-up is displayed.
The issue is reproducible only if an in-use external mic is unplugged and the internal mic should be enabled.

Please let me know if I can provide you any more information about this crash.
(In reply to Mihai Boldan, QA [:mboldan] from comment #6)

> If you are referring to select the Internal mic at step 2 from STR, the
> crash is not reproducible. But if you are saying to choose the internal mic
> after performing step 3 from STR, that is not possible, taking in
> consideration that the FF crashes before the pop-up is displayed.
> The issue is reproducible only if an in-use external mic is unplugged and
> the internal mic should be enabled.

What I want is to make the external mic the system default mic and reproduce the crash. The steps are:

1. Go to System Preference -> Sound -> Input
2. Choose as default input the C930
3. Go to the communication site that requires mic.
4. In the popup prompt select the default mic which should be the external (c930).
5. After call is established unplug the external mic
(Reporter)

Comment 8

2 years ago
(In reply to Alex Chronopoulos [:achronop] from comment #7)
> (In reply to Mihai Boldan, QA [:mboldan] from comment #6)
> 
> > If you are referring to select the Internal mic at step 2 from STR, the
> > crash is not reproducible. But if you are saying to choose the internal mic
> > after performing step 3 from STR, that is not possible, taking in
> > consideration that the FF crashes before the pop-up is displayed.
> > The issue is reproducible only if an in-use external mic is unplugged and
> > the internal mic should be enabled.
> 
> What I want is to make the external mic the system default mic and reproduce
> the crash. The steps are:
> 
> 1. Go to System Preference -> Sound -> Input
> 2. Choose as default input the C930
> 3. Go to the communication site that requires mic.
> 4. In the popup prompt select the default mic which should be the external
> (c930).
> 5. After call is established unplug the external mic

I managed to reproduce this crash using the STR from above, but as an external device I used 'Microsoft LifeCam HD-3000' camera for the first test and 'Microsoft LifeChat LX_3000' headphones for the second test. 
The tests were performed on Firefox 50.0b3 and on Latest Nightly.

Comment 9

2 years ago
Randell: Any recommendations here? Are we able to detect the USB case at runtime and disable full-duplex for those users? Thx!
Flags: needinfo?(rjesup)
(Assignee)

Comment 10

2 years ago
We've just preffed off full_duplex for mac in 50 (beta).

Disabling full_duplex for USB isn't a great solution, and that would mean dynamic switching between full-duplex and not, which was never part of the design and so would be kludgy at best, and break badly at worst.

This is being fixed now and the fix should be uplifted to 51.
Flags: needinfo?(rjesup)
(Assignee)

Updated

2 years ago
status-firefox50: affected → unaffected
I am able to repro this with a c930 on latest Nightly. I will try it in a debug build.
Flags: needinfo?(achronop)
I Pushed a fix for that on try which is ready. The only issue that I see is that the camera goes muted after the unplug even id it is not the one used. Please have a try let me know what you see: 

https://archive.mozilla.org/pub/firefox/try-builds/achronop@gmail.com-4534f70d072521bb4665fbf1d4bd225ec9d904e1/try-macosx64/firefox-52.0a1.en-US.mac.dmg
Flags: needinfo?(achronop) → needinfo?(mihai.boldan)
In gum test page the crash is also repro. The behavior of the custom firefox is that it does not crash any more but there is no sound after the unplug. Device switching is something handled by a separate bug.
(Reporter)

Comment 14

2 years ago
Hello Alex,

I've managed to perform a set of tests around this fix, using build from Comment 12 and STR from Comment 0.
The crash is no longer reproducible using the provided build, but, as you mentioned in comment 13, the Mic is not switched to the default one, and also, the sharing device pop up is not displayed after the unplug, in order to choose another device. 
If you're saying that another bug is logged for the issue mentioned above, I'll say that this fix covers the crash. 

The tests were performed on Mac OS X 10.11.6.
Flags: needinfo?(mihai.boldan)
Randall, do we expect things to land in this bug?
Flags: needinfo?(rjesup)
I am working on this, I have a patch up for review in cubeb repo.
Assignee: rjesup → achronop
Flags: needinfo?(rjesup)
Depends on: 1315928
Landed as part of Bug 1315928.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Created attachment 8809841 [details] [diff] [review]
bug-1306247-crash

Approval Request Comment
[Feature/regressing bug #]: bug 1306247

[User impact if declined]: crash

[Describe test coverage new/current, TreeHerder]: Manual testing: gUM by sharing external mic and unplug.

[Risks and why]: Low risk; Remove one line that memset zero to a nullptr.

[String/UUID change made/needed]: none
Attachment #8809841 - Flags: review?(rjesup)
Attachment #8809841 - Flags: approval-mozilla-aurora?
(Assignee)

Updated

2 years ago
Attachment #8809841 - Flags: review?(rjesup) → review+
Attachment #8809841 - Flags: approval-mozilla-aurora?
(Assignee)

Comment 19

2 years ago
Created attachment 8809958 [details] [diff] [review]
Remove initialization of a null buffer
(Assignee)

Updated

2 years ago
Attachment #8809841 - Attachment is obsolete: true
(Assignee)

Updated

2 years ago
Assignee: achronop → rjesup
(Assignee)

Comment 20

2 years ago
Comment on attachment 8809958 [details] [diff] [review]
Remove initialization of a null buffer

Updated patch to include .patch file
Attachment #8809958 - Flags: review+
Attachment #8809958 - Flags: approval-mozilla-aurora?
Comment on attachment 8809958 [details] [diff] [review]
Remove initialization of a null buffer

Fix a crash. Aurora 51+.
Attachment #8809958 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(Assignee)

Comment 22

2 years ago
 https://hg.mozilla.org/releases/mozilla-aurora/rev/b54268561e8cb9ddaff7452e7ef9f7e181ad59fa
status-firefox51: affected → fixed
status-firefox52: affected → fixed
You need to log in before you can comment on or make changes to this bug.