Closed Bug 1313933 Opened 3 years ago Closed 3 years ago

Intermittent devtools/client/responsive.html/test/browser/browser_tab_remoteness_change.js | Test timed out -

Categories

(DevTools :: Responsive Design Mode, defect, P1)

defect

Tracking

(firefox51 unaffected, firefox52 verified, firefox53 verified, firefox54 verified)

VERIFIED FIXED
Firefox 54
Tracking Status
firefox51 --- unaffected
firefox52 --- verified
firefox53 --- verified
firefox54 --- verified

People

(Reporter: aryx, Assigned: jryans)

References

Details

(Keywords: intermittent-failure, regression, Whiteboard: [stockwell fixed])

Attachments

(2 files)

https://treeherder.mozilla.org/logviewer.html#?job_id=5900356&repo=autoland

06:08:56     INFO - Closing responsive design mode
06:08:56     INFO - TEST-PASS | devtools/client/responsive.html/test/browser/browser_tab_remoteness_change.js | RDM closed synchronously - 
06:08:56     INFO - Responsive design mode closed
06:08:56     INFO - Removing tab.
06:08:56     INFO - Waiting for event: 'TabClose' on [object XULElement].
06:08:56     INFO - JavaScript error: resource://gre/modules/ExtensionContent.jsm, line 924: TypeError: this.globals.get(...) is undefined
06:08:56     INFO - Got event: 'TabClose' on [object XULElement].
06:08:56     INFO - Tab removed and finished closing
06:08:56     INFO - Leaving test bound 
06:08:56     INFO - Entering test bound 
06:08:56     INFO - Adding a new tab with URL: http://example.com/
06:08:56     INFO - JavaScript error: resource://gre/modules/ExtensionContent.jsm, line 924: TypeError: this.globals.get(...) is undefined
06:08:56     INFO - Console message: [JavaScript Error: "TypeError: this.globals.get(...) is undefined" {file: "resource://gre/modules/ExtensionContent.jsm" line: 924}]
06:08:56     INFO - Console message: [JavaScript Error: "TypeError: this.globals.get(...) is undefined" {file: "resource://gre/modules/ExtensionContent.jsm" line: 924}]
06:08:56     INFO - Tab added and finished loading
06:08:56     INFO - Opening responsive design mode
06:08:57     INFO - JavaScript error: resource://app/modules/ReaderParent.jsm, line 85: TypeError: win.gBrowser is undefined
06:08:57     INFO - JavaScript error: resource://gre/modules/RemoteAddonsParent.jsm, line 1078: TypeError: cannot use the given object as a weak map key
06:08:57     INFO - Console message: [JavaScript Error: "TypeError: win.gBrowser is undefined" {file: "resource://app/modules/ReaderParent.jsm" line: 85}]
06:08:57     INFO - Console message: [JavaScript Error: "TypeError: cannot use the given object as a weak map key" {file: "resource://gre/modules/RemoteAddonsParent.jsm" line: 1078}]
06:08:57     INFO - Responsive design mode opened
06:08:57     INFO - RDM's debugger client is now closed
06:09:39     INFO - TEST-INFO | started process screenshot
06:09:39     INFO - TEST-INFO | screenshot: exit 0
06:09:39     INFO - checking window state
06:09:39     INFO - TEST-UNEXPECTED-FAIL | devtools/client/responsive.html/test/browser/browser_tab_remoteness_change.js | Test timed out -
Priority: -- → P3
This test has been failing intermittently since introduced. Linux/Linux64, opt only, e10s only.

There are 2 JS errors reported just before the timeout, but those are also present in successful runs:

JavaScript error: resource://gre/modules/RemoteAddonsParent.jsm, line 1070: TypeError: cannot use the given object as a weak map key

JavaScript error: resource://app/modules/ReaderParent.jsm, line 85: TypeError: win.gBrowser is undefined


Comparing timeouts to successful runs, it looks to me like the test hangs somewhere just before https://dxr.mozilla.org/mozilla-central/rev/80eac484366ad881c6a10bf81e8d9b8f7a676c75/devtools/client/responsive.html/test/browser/browser_tab_remoteness_change.js#41
Blocks: 1296736
jryans - This is one of the most frequent intermittent test failures currently. Can you find someone to look into it?
Flags: needinfo?(jryans)
I'll check it out.
Assignee: nobody → jryans
Status: NEW → ASSIGNED
Flags: needinfo?(jryans)
Priority: P3 → P1
So far, I haven't been able to reproduce this issue locally.

Added some logging to a try run, we'll see if that helps:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=9e8c210822eb854f0fe3fec0dbae5151090acf01
Getting a little closer, more logging:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=30d9e110ac3a6af6e954e868451764535c21c36d

It also seems like the failure rate has decreased in the last few days, for whatever reason.
Comment on attachment 8831336 [details]
Bug 1313933 - Cleanup logging in RDM tab remoteness test.

https://reviewboard.mozilla.org/r/107902/#review109294
Attachment #8831336 - Flags: review?(poirot.alex) → review+
Comment on attachment 8831337 [details]
Bug 1313933 - Explicitly bypass history when loading RDM UI.

https://reviewboard.mozilla.org/r/107904/#review109296

I'm glad you are able to fix intermittent while removing that gross hack!
Attachment #8831337 - Flags: review?(poirot.alex) → review+
Pushed by jryans@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/9301ae5dbd57
Cleanup logging in RDM tab remoteness test. r=ochameau
https://hg.mozilla.org/integration/autoland/rev/afc63e2519db
Explicitly bypass history when loading RDM UI. r=ochameau
For QE testing, please verify that the tab's history continues to work as expected after toggling RDM.  For example, here are some scenarios:

STR 1:

1. Open a tab, loading page A
2. Go to page B
3. Open RDM
4. Go to page C
5. Close RDM

ER 1:

Back / forward navigation should contain A, B, C.  There should be no record of RDM UI in the history.

STR 2:

1. Open a tab, loading page A
2. Go to page B
3. Open RDM
4. Close the Firefox window
5. Restore the Firefox window

ER 2:

Back / forward navigation should contain A, B.  RDM doesn't reopen after restore.
Flags: qe-verify+
QA Contact: mihai.boldan
https://hg.mozilla.org/mozilla-central/rev/9301ae5dbd57
https://hg.mozilla.org/mozilla-central/rev/afc63e2519db
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
Looks like the fix worked on trunk! Please request Aurora/Beta approval on this when you get a chance.
Flags: needinfo?(jryans)
Comment on attachment 8831336 [details]
Bug 1313933 - Cleanup logging in RDM tab remoteness test.

Approval Request Comment
[Feature/Bug causing the regression]: There was a race condition in the DevTools Responsive Design Mode start up path.
[User impact if declined]: If declined, the RDM tab remoteness test will fail intermittently.  Users could also be affected when opening and closing RDM rapidly.
[Is this code covered by automated tests?]: Yes
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]: QE steps added in comment 34
[List of other uplifts needed for the feature/fix]: None, just the two patches in this bug
[Is the change risky?]: No
[Why is the change risky/not risky?]: Only affects DevTools RDM
[String changes made/needed]: None
Flags: needinfo?(jryans)
Attachment #8831336 - Flags: approval-mozilla-beta?
Attachment #8831336 - Flags: approval-mozilla-aurora?
Comment on attachment 8831337 [details]
Bug 1313933 - Explicitly bypass history when loading RDM UI.

See comment 38.
Attachment #8831337 - Flags: approval-mozilla-beta?
Attachment #8831337 - Flags: approval-mozilla-aurora?
Comment on attachment 8831336 [details]
Bug 1313933 - Cleanup logging in RDM tab remoteness test.

devtools RDM test-only change, aurora53+, beta52+
Attachment #8831336 - Flags: approval-mozilla-beta?
Attachment #8831336 - Flags: approval-mozilla-beta+
Attachment #8831336 - Flags: approval-mozilla-aurora?
Attachment #8831336 - Flags: approval-mozilla-aurora+
Comment on attachment 8831337 [details]
Bug 1313933 - Explicitly bypass history when loading RDM UI.

fix race in devtools RDM startup, aurora53+, beta52+

Should be in 52.0b3 later this week.
Attachment #8831337 - Flags: approval-mozilla-beta?
Attachment #8831337 - Flags: approval-mozilla-beta+
Attachment #8831337 - Flags: approval-mozilla-aurora?
Attachment #8831337 - Flags: approval-mozilla-aurora+
needs rebasing for beta

warning: conflicts while merging devtools/client/responsive.html/browser/tunnel.js! (edit, then use 'hg resolve --mark')
abort: unresolved conflicts, can't continue
(use 'hg resolve' and 'hg graft --continue')
Flags: needinfo?(jryans)
I can confirm that the RDM UI is not seen in the tabs History on the latest Nightly 54.0a1 (Build ID: 20170201030207), followed the scenarios from Comment 34. Verified on Windows 10 x64, Ubuntu 16.04 x64 and Mac OS X 10.11.

But please note that I wasn't able to reproduce the initial issue on older versions of Nightly without the fix (52.0a1 and 53.0a1).
I was also not able to reproduce this issue on an older Nightly version.
I've tested this issue, using the STR from Comment 34 on Firefox 53.0a2 (2017-02-03) and on Firefox 52.0b2, under Windows 10x64, Mac OS X 10.11.6 and under Ubuntu 16.04x64 and I also confirm that the issue is not reproducible.
Taking also in consideration Comment 44, I'm marking this issue Verified Fixed.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Whiteboard: [stockwell fixed]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.