Closed
Bug 1381638
Opened 9 years ago
Closed 8 years ago
Severe audio distortion/slowdown/delay sharing mic in multiple tabs (regression)
Categories
(Core :: WebRTC: Audio/Video, defect, P2)
Tracking
()
VERIFIED
FIXED
mozilla57
| Tracking | Status | |
|---|---|---|
| firefox-esr52 | --- | unaffected |
| firefox55 | --- | unaffected |
| firefox56 | + | verified |
| firefox57 | + | verified |
| firefox58 | --- | verified |
People
(Reporter: jib, Assigned: padenot)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files, 5 obsolete files)
|
2.62 KB,
patch
|
jib
:
review+
lizzard
:
approval-mozilla-beta-
lizzard
:
approval-mozilla-release+
|
Details | Diff | Splinter Review |
|
3.03 KB,
patch
|
ng
:
review+
|
Details | Diff | Splinter Review |
STRs:
1. Open https://jsfiddle.net/jib1/6oy8dmg4/ + share mic, in 5 tabs
2. Snap fingers
Expected result: Responsive feedback in speakers.
Actual result: After 5th tab opens, severe distortion of audio where audio slows down to half speed, and there's a multi-second delay.
Alternative STRs:
1. In about:config, set dom.ipc.processCount = 1 and close all tabs
2. Open https://jsfiddle.net/jib1/6oy8dmg4/ + share mic, in 2 tabs
Reproduced on OSX and Windows 10.
Regression range:
Last good revision: 15cc8dd663627ec12ecd4be11a69f0caad8e4e11
First bad revision: 29ac12c81bcda10a981dfe3371f70a9b17a19edd
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=15cc8dd663627ec12ecd4be11a69f0caad8e4e11&tochange=29ac12c81bcda10a981dfe3371f70a9b17a19edd
Workaround:
Increase dom.ipc.processCount to prolong the inevitable (more tabs needed to reproduce).
| Reporter | ||
Updated•9 years ago
|
Rank: 14
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → padenot
This is an assigned P1 bug without activity in two weeks.
If you intend to continue working on this bug for the current release/iteration/sprint, remove the 'stale-bug' keyword.
Otherwise we'll reset the priority of the bug back to '--' on Monday, August 28th.
Keywords: stale-bug
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8902296 -
Flags: review?(rjesup)
Attachment #8902296 -
Flags: review?(jib)
| Assignee | ||
Updated•8 years ago
|
Attachment #8902296 -
Attachment is patch: true
| Reporter | ||
Comment 4•8 years ago
|
||
Comment on attachment 8902296 [details] [diff] [review]
Bug 1381638 - Disable msg-per-document. r?jib r?jesup
Review of attachment 8902296 [details] [diff] [review]:
-----------------------------------------------------------------
Wfm.
Attachment #8902296 -
Flags: review?(jib) → review+
Comment 5•8 years ago
|
||
Comment on attachment 8902296 [details] [diff] [review]
Bug 1381638 - Disable msg-per-document. r?jib r?jesup
r+, but hold on landing it for the moment until we coordinate with billm
Attachment #8902296 -
Flags: review?(rjesup) → review+
| Reporter | ||
Comment 6•8 years ago
|
||
Comment on attachment 8902242 [details]
Bug 1381638 - Prevent sharing multiple input devices in the same process.
clearing r? as we went a different direction.
Attachment #8902242 -
Flags: review?(jib)
Comment 7•8 years ago
|
||
Mass change P1->P2 to align with new Mozilla triage process
Priority: P1 → P2
| Reporter | ||
Comment 8•8 years ago
|
||
[Tracking Requested - why for this release]: Severe audio regression when used concurrently in tabs.
status-firefox55:
--- → unaffected
status-firefox56:
--- → affected
status-firefox57:
--- → affected
status-firefox-esr52:
--- → unaffected
tracking-firefox56:
--- → ?
tracking-firefox57:
--- → ?
Comment 9•8 years ago
|
||
Attachment #8908773 -
Flags: review?(jib)
Updated•8 years ago
|
Assignee: padenot → rjesup
Status: NEW → ASSIGNED
| Reporter | ||
Comment 10•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8902242 [details]
Bug 1381638 - Prevent sharing multiple input devices in the same process.
https://reviewboard.mozilla.org/r/173770/#review185556
Discussed with jesup, and we've decided to take this patch for now and try to get it to 56. It's got a better chance of being approved at this point than "regress quantum".
Attachment #8902242 -
Flags: review+
Comment 11•8 years ago
|
||
Comment on attachment 8908773 [details] [diff] [review]
don't dynamically switch to/from fast-path gUM audio
wrong bug
Attachment #8908773 -
Attachment is obsolete: true
Attachment #8908773 -
Flags: review?(jib)
Updated•8 years ago
|
Assignee: rjesup → padenot
| Reporter | ||
Comment 12•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8902242 [details]
Bug 1381638 - Prevent sharing multiple input devices in the same process.
https://reviewboard.mozilla.org/r/173770/#review185620
Nevermind, it broke applyConstraints.
Attachment #8902242 -
Flags: review+ → review-
| Reporter | ||
Comment 13•8 years ago
|
||
Attachment #8902242 -
Attachment is obsolete: true
Attachment #8902296 -
Attachment is obsolete: true
Attachment #8908886 -
Flags: review?(rjesup)
| Reporter | ||
Comment 14•8 years ago
|
||
Attachment #8908886 -
Attachment is obsolete: true
Attachment #8908886 -
Flags: review?(rjesup)
Attachment #8908933 -
Flags: review?(rjesup)
Comment 15•8 years ago
|
||
Comment on attachment 8908933 [details] [diff] [review]
Bug 1381638 - Prevent sharing multiple input devices in the same process.
Review of attachment 8908933 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with comment change and optional code change. File a new bug to resolve the issue, or land this one under leave-open and put that number in there
::: dom/media/webrtc/MediaEngineWebRTCAudio.cpp
@@ +471,5 @@
> }
>
> + // Until we fix (or wallpaper) support for multiple mic input
> + // (Bug 1238038) fail allocation for a second device by blocking
> + // sources with different Graphs
// Until we fix bug XXXXX we need to block a second tab (OuterWindow)
// from opening an already-open device. If it's the same tab, they
// will share a Graph(), and we can allow it.
@@ +476,5 @@
> + {
> + auto* graph = aStream->Graph();
> +
> + for (auto& source: mSources) {
> + if (source->Graph() != graph) {
I don't mind checking them all.... but it's useless since this code ensures they all match, so you only need to check one. You could code it as "if (!mSources.Empty() && aStream->Graph() != mSource[0].Graph()) { return NS_ERROR....}"
But I'll also take this
Attachment #8908933 -
Flags: review?(rjesup) → review+
| Reporter | ||
Comment 16•8 years ago
|
||
Carrying forward r=jesup.
Attachment #8908933 -
Attachment is obsolete: true
Attachment #8908945 -
Flags: review+
| Reporter | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 17•8 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/62efa118ea7f
Prevent sharing multiple input devices in the same process. r=jesup
Keywords: checkin-needed
| Reporter | ||
Comment 18•8 years ago
|
||
Comment on attachment 8908945 [details] [diff] [review]
Bug 1381638 - Prevent sharing multiple input devices in the same process.
Approval Request Comment
[Feature/Bug causing the regression]: Bug 1330360
[User impact if declined]:
Sharing microphone in multiple tabs causes severe distortion of mic audio where it slows down to half speed (Vader voice), and there's continual build-up of multi-second delay, rendering microphone unusable in both tabs until both are closed, when the two tabs are in the same content process. Does not happen if tabs are in separate content processes.
Workaround is to close mic-access in both tabs and try again, or open a new tab and hope to get a different process, if available.
In contrast, with this band-aid patch, we instead fail getUserMedia() mic requests with "NotReadableError: Concurrent mic process limit.", but only when this would happen, to prevent the audio distortion. The first tab continues to work, but the second page sees getUserMedia failing, which sites generally check for already (users denying permission), and the workaround is the same. The thinking here is this is less embarrassing, as severely distorted audio is a poor user experience, and is directly attributable to the browser.
We chose this band-aid fix to avoid regressing quantum (which reverting the original patch would have done).
[Is this code covered by automated tests?]: No. Testing use across content processes is difficult in the tree.
[Has the fix been verified in Nightly?]: Verified locally. Still on inbound.
[Needs manual test from QE? If yes, steps to reproduce]:
Use steps in comment 0.
I also verified multiple getUserMedia calls from the same page still works here: https://jsfiddle.net/jib1/wemt0fvs/
[List of other uplifts needed for the feature/fix]: None
[Is the change risky?]: Not risky.
[Why is the change risky/not risky?]:
It is not risky, because the patch reuses an existing failure path.
We also only fail when there already are one or more active streams using MediaEngineWebRTCMicrophoneSource in the same content process, AND our MSG is different from theirs (bug 1330360 has different MSGs per document).
[String changes made/needed]: none
Attachment #8908945 -
Flags: approval-mozilla-release?
Attachment #8908945 -
Flags: approval-mozilla-beta?
Comment 19•8 years ago
|
||
Tracking since this sounds like a bad regression.
I'll come back to approve this for m-r (56) tomorrow to make sure it has landed on m-c successfully.
Right now, m-c and beta (both 57) are still going to be synced periodically, so we don't need special uplift to beta.
Comment 20•8 years ago
|
||
Backed out for browser_devices_get_user_media_in_frame.js failures.
https://hg.mozilla.org/integration/mozilla-inbound/rev/13aea0c07147bf77029652944a6b4c4d3936e8f4
https://treeherder.mozilla.org/logviewer.html#?job_id=131524595&repo=mozilla-inbound
Flags: needinfo?(padenot)
| Comment hidden (obsolete) |
| Reporter | ||
Comment 22•8 years ago
|
||
To add to manual test steps:
I also verified multiple getUserMedia calls from page and an iframe still works here: https://jsfiddle.net/jib1/90rfbspz/
| Reporter | ||
Comment 23•8 years ago
|
||
Ok, it's perma-orange which should make it possible to find
https://treeherder.mozilla.org/#/jobs?repo=try&revision=dcfb3ae56925a3d5e685593207c3ab6697416a7c&selectedJob=131609408
| Reporter | ||
Comment 24•8 years ago
|
||
| Reporter | ||
Comment 25•8 years ago
|
||
Ok I misunderstood the test. I get it now.
2nd try fix: https://treeherder.mozilla.org/#/jobs?repo=try&revision=946cfdd6c4a4ccc18fe51976577ff90914e72c5b
| Reporter | ||
Comment 26•8 years ago
|
||
That worked.
| Reporter | ||
Comment 27•8 years ago
|
||
Attachment #8909152 -
Flags: review?(rjesup)
| Reporter | ||
Updated•8 years ago
|
Attachment #8909152 -
Flags: review?(rjesup) → review?(na-g)
Comment 28•8 years ago
|
||
Comment on attachment 8909152 [details] [diff] [review]
Bug 1381638 - Change browser_devices_get_user_media_in_frame.js to test cam then cam+mic instead of mic then cam+mic, to avoid bug 1400488.
Review of attachment 8909152 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm
Updated•8 years ago
|
Attachment #8909152 -
Flags: review?(na-g) → review+
| Reporter | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 29•8 years ago
|
||
Updated•8 years ago
|
Flags: needinfo?(padenot)
Keywords: checkin-needed
Comment 30•8 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/e7488798c5d8
https://hg.mozilla.org/mozilla-central/rev/c0af528ff365
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•8 years ago
|
Flags: qe-verify+
| Reporter | ||
Comment 31•8 years ago
|
||
Please see comment 18 for approval uplift request which still stands (subsequent activity was to fix a test that prevented landing).
Comment 32•8 years ago
|
||
Comment on attachment 8908945 [details] [diff] [review]
Bug 1381638 - Prevent sharing multiple input devices in the same process.
This makes a workaround possible for users with multiple tabs sharing audio.
Let's take it for the 56 RC build later today.
Attachment #8908945 -
Flags: approval-mozilla-release?
Attachment #8908945 -
Flags: approval-mozilla-release+
Attachment #8908945 -
Flags: approval-mozilla-beta?
Attachment #8908945 -
Flags: approval-mozilla-beta-
Comment 33•8 years ago
|
||
| bugherder uplift | ||
https://hg.mozilla.org/releases/mozilla-beta/rev/fd583aba7c2b (FIREFOX_56b13_RELBRANCH)
https://hg.mozilla.org/releases/mozilla-beta/rev/47fa81c799b4 (FIREFOX_56b13_RELBRANCH)
https://hg.mozilla.org/releases/mozilla-release/rev/f5d255813d92
https://hg.mozilla.org/releases/mozilla-release/rev/c2d1f91a9227
Comment 34•8 years ago
|
||
Build ID: 20170921220243
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Verified as fixed on Firefox Nightly 58.0a1 on Windows 10 x 64, Mac OS X 10.12 and Ubuntu 16.04 x64.
Status: RESOLVED → VERIFIED
status-firefox58:
--- → verified
Comment 35•8 years ago
|
||
I have reproduced this issue using Firefox nightly from 2017.07.17 on Mac OS X 10.12.
I can confirm this issue is fixed, I verified using Firefox 56.0-build4 on Mac OS X 10.12, Windows 7 x64 (build x86), Windows 10 x64 and Ubuntu 16.04 x64
Comment 36•8 years ago
|
||
Verified fixed in Nightly 57.0a1 (20170920220431) on Windows 10x64, MacOSX 10.12.6 and Ubuntu 16.04 x64.
Updated•8 years ago
|
Comment 37•8 years ago
|
||
This makes testing a little annoying. I used to be able to test between two Firefox tabs. Is the plan to eventually reinstate the previous behavior?
Updated•4 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•