Open Bug 1493369 Opened Last year Updated 18 days ago

Intermittent devtools/server/tests/browser/browser_storage_updates.js | Uncaught exception - at chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:204 - TypeError: can't convert undefined to object

Categories

(DevTools :: Storage Inspector, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: intermittent-bug-filer, Unassigned)

Details

(Keywords: intermittent-failure, leave-open, Whiteboard: [stockwell disabled])

Attachments

(2 files)

Filed by: apavel [at] mozilla.com

https://treeherder.mozilla.org/logviewer.html#?job_id=200794733&repo=mozilla-beta

https://queue.taskcluster.net/v1/task/B-lpTQqeTHyKPA5oBSrqhA/runs/0/artifacts/public/logs/live_backing.log

10:59:00     INFO - TEST-PASS | devtools/server/tests/browser/browser_storage_updates.js | At least one storage type should be present - 
10:59:00     INFO - Testing for cookies
10:59:00     INFO - TEST-PASS | devtools/server/tests/browser/browser_storage_updates.js | Host http://test1.example.org found - 
10:59:00     INFO - TEST-PASS | devtools/server/tests/browser/browser_storage_updates.js | Item found - c3{9d414cc5-8319-0a04-0586-c0a6ae01670a}test1.example.org{9d414cc5-8319-0a04-0586-c0a6ae01670a}/browser/devtools/server/tests/browser/ - 
10:59:00     INFO - Testing for sessionStorage
10:59:00     INFO - TEST-PASS | devtools/server/tests/browser/browser_storage_updates.js | Host http://test1.example.org found - 
10:59:00     INFO - TEST-PASS | devtools/server/tests/browser/browser_storage_updates.js | Item found - s1 - 
10:59:00     INFO - TEST-PASS | devtools/server/tests/browser/browser_storage_updates.js | Item found - s2 - 
10:59:00     INFO - matching deleted object for index 3
10:59:00     INFO - TEST-PASS | devtools/server/tests/browser/browser_storage_updates.js | At least one storage type should be present - 
10:59:00     INFO - Testing for cookies
10:59:00     INFO - TEST-PASS | devtools/server/tests/browser/browser_storage_updates.js | Host http://test1.example.org found - 
10:59:00     INFO - TEST-PASS | devtools/server/tests/browser/browser_storage_updates.js | Item found - c1{9d414cc5-8319-0a04-0586-c0a6ae01670a}test1.example.org{9d414cc5-8319-0a04-0586-c0a6ae01670a}/browser/devtools/server/tests/browser/ - 
10:59:00     INFO - Testing for localStorage
10:59:00     INFO - TEST-PASS | devtools/server/tests/browser/browser_storage_updates.js | Host http://test1.example.org found - 
10:59:00     INFO - TEST-PASS | devtools/server/tests/browser/browser_storage_updates.js | Item found - l2 - 
10:59:00     INFO - Still some updates pending for index 3
10:59:00     INFO - Running test at index 4
10:59:00     INFO - sessionStorageRemoveItem("s1")
10:59:00     INFO - inside stores update for index 4
10:59:00     INFO - matching changed object for index 4
10:59:00     INFO - Buffered messages finished
10:59:00     INFO - TEST-UNEXPECTED-FAIL | devtools/server/tests/browser/browser_storage_updates.js | Uncaught exception - at chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:204 - TypeError: can't convert undefined to object
10:59:00     INFO - Stack trace:
10:59:00     INFO - markOutMatched@chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:204:8
10:59:00     INFO - onStoresUpdate@chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:247:5
10:59:00     INFO - runTest@chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:271:3
10:59:00     INFO - Leaving test bound 
10:59:00     INFO - Removing tab.
10:59:00     INFO - Waiting for event: 'TabClose' on [object XULElement].
10:59:00     INFO - Got event: 'TabClose' on [object XULElement].
10:59:00     INFO - Tab removed and finished closing
10:59:00     INFO - GECKO(897) | MEMORY STAT | vsize 4468MB | residentFast 414MB | heapAllocated 94MB
10:59:00     INFO - TEST-OK | devtools/server/tests/browser/browser_storage_updates.js | took 1403ms
10:59:00     INFO - checking window state
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → INCOMPLETE

Recent log failure: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=234082300&repo=mozilla-central&lineNumber=81645

08:22:05 INFO - TEST-PASS | devtools/server/tests/browser/browser_storage_updates.js | Item found - l2 -
08:22:05 INFO - Still some updates pending for index 3
08:22:05 INFO - Running test at index 4
08:22:05 INFO - sessionStorageRemoveItem("s1")
08:22:05 INFO - inside stores update for index 4
08:22:05 INFO - matching changed object for index 4
08:22:05 INFO - Buffered messages finished
08:22:05 INFO - TEST-UNEXPECTED-FAIL | devtools/server/tests/browser/browser_storage_updates.js | Uncaught exception - at chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:197 - TypeError: can't convert undefined to object
08:22:05 INFO - Stack trace:
08:22:05 INFO - markOutMatched@chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:197:15
08:22:05 INFO - onStoresUpdate@chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:240:5
08:22:05 INFO - runTest@chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:264:3
08:22:05 INFO - async*@chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:189:11
08:22:05 INFO - Async*Tester_execTest/<@chrome://mochikit/content/browser-test.js:1106:34
08:22:05 INFO - Tester_execTest@chrome://mochikit/content/browser-test.js:1134:12
08:22:05 INFO - nextTest/<@chrome://mochikit/content/browser-test.js:995:14
08:22:05 INFO - SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:803:59
08:22:05 INFO - Leaving test bound
08:22:05 INFO - Removing tab.
08:22:05 INFO - Waiting for event: 'TabClose' on [object XULElement].
08:22:05 INFO - Got event: 'TabClose' on [object XULElement].
08:22:05 INFO - Tab removed and finished closing
08:22:05 INFO - GECKO(8108) | MEMORY STAT | vsize 2103441MB | vsizeMaxContiguous 67493190MB | residentFast 401MB | heapAllocated 107MB
08:22:05 INFO - TEST-OK | devtools/server/tests/browser/browser_storage_updates.js | took 3168ms
08:22:05 INFO - GECKO(8108) | ++DOCSHELL 000001FF4D076000 == 2 [pid = 8236] [id = {1b6d1bac-82fb-4ba4-aeb0-a8a705565751}]
08:22:05 INFO - GECKO(8108) | ++DOMWINDOW == 3 (000001FF5156C020) [pid = 8236] [serial = 113] [outer = 0000000000000000]
08:22:05 INFO - checking window state
08:22:05 INFO - GECKO(8108) | ++DOMWINDOW == 4 (000001FF4D0CAC00) [pid = 8236] [serial = 114] [outer = 000001FF5156C020]

Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 9 months ago7 months ago
Resolution: --- → INCOMPLETE

Most failure associated with this failure were on try. Removing the diable recommended tag.

Whiteboard: [stockwell disable-recommended]
Whiteboard: [stockwell disable-recommended]

There are 66 failures associated with this bug in the last 7 days.

autoland: 32
mozilla-beta: 2
mozilla-inbound: 8
mozilla-central: 12
try: 12

Recent failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=247269282&repo=mozilla-central&lineNumber=46748

23:15:52     INFO - matching added object for index 4
23:15:52     INFO - Buffered messages finished
23:15:52     INFO - TEST-UNEXPECTED-FAIL | devtools/server/tests/browser/browser_storage_updates.js | Uncaught exception - at chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:197 - TypeError: can't convert undefined to object
23:15:52     INFO - Stack trace:
23:15:52     INFO - markOutMatched@chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:197:15
23:15:52     INFO - onStoresUpdate@chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:236:5
23:15:52     INFO - runTest@chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:264:3
23:15:52     INFO - async*@chrome://mochitests/content/browser/devtools/server/tests/browser/browser_storage_updates.js:189:11
23:15:52     INFO - Async*Tester_execTest/<@chrome://mochikit/content/browser-test.js:1116:34
23:15:52     INFO - Tester_execTest@chrome://mochikit/content/browser-test.js:1144:12
23:15:52     INFO - nextTest/<@chrome://mochikit/content/browser-test.js:1005:14
23:15:52     INFO - SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:803:59
23:15:52     INFO - Leaving test bound 
23:15:52     INFO - GECKO(7028) | --DOMWINDOW == 4 (000001B2252A8020) [pid = 8876] [serial = 190] [outer = 0000000000000000] [url = http://test1.example.org/browser/devtools/server/tests/browser/storage-dynamic-windows.html]
23:15:52     INFO - Removing tab.
23:15:52     INFO - Waiting for event: 'TabClose' on [object XULElement].
23:15:52     INFO - GECKO(7028) | [Child 5064, Main Thread] WARNING: No active window: file z:/build/build/src/js/xpconnect/src/XPCJSContext.cpp, line 662
23:15:52     INFO - Got event: 'TabClose' on [object XULElement].
23:15:52     INFO - Tab removed and finished closing
23:15:52     INFO - GECKO(7028) | MEMORY STAT | vsize 2104283MB | vsizeMaxContiguous 65679287MB | residentFast 3
Whiteboard: [stockwell disable-recommended]

can you explain why this doesn't have a need info? I don't understand why the disable-recommended flag was removed a week earlier, and now it is up for disabled-recommended.

Flags: needinfo?(nbeleuzu)

:jmaher I removed the disable-recommended flag because when I checked we had only 121 failures associated with this bug: https://treeherder.mozilla.org/intermittent-failures.html#/bugdetails?startday=2019-04-29&endday=2019-05-20&tree=trunk&bug=1493369

thanks :dvarga that makes sense- I also don't see a needinfo on the triage owner or related developer

Pushed by dvarga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2c649862f09d
Disable browser_storage_updates.js on Win. r=jmaher
Flags: needinfo?(pbrosset)
Keywords: leave-open
Whiteboard: [stockwell disable-recommended] → [stockwell disabled]
Component: General → Storage Inspector
Flags: needinfo?(pbrosset) → needinfo?(mratcliffe)
Assignee: nobody → mratcliffe
Status: REOPENED → ASSIGNED
Flags: needinfo?(mratcliffe)
OS: Unspecified → All
Priority: P5 → P2
Hardware: Unspecified → All
Flags: needinfo?(nbeleuzu)

The root cause appears to be that when we send update events we sometimes optimize the update list so e.g. deleting something and added it again we may do this:

if (action === "added") {
  // If the same store name was previously deleted or changed, but now is
  // added somehow, don't send the deleted or changed update.
  this.removeNamesFromUpdateList("deleted", storeType, data);
  this.removeNamesFromUpdateList("changed", storeType, data);
}

This means we can't simply check for all update events... we need to ignore updates and wait until the list of storage objects has the correct values.

Changes

In a nutshell, the old test produced the occasional orange and was badly written so it was very difficult to follow, especially when there were failures. The new test uses a snapshot system, which is much easier to understand.

Try

https://treeherder.mozilla.org/#/jobs?repo=try&revision=39b92ebbce9ce1ae58f0466ccc1608314257bf81&group_state=expanded
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f0fdf5e246550494e41b1ad88da1258e62a63ab7&group_state=expanded
https://treeherder.mozilla.org/#/jobs?repo=try&revision=79489426ffcf177663aceb9db43efabc190de613&group_state=expanded
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6ee7fbfb846be73e08023caddd1baed2e6962d6b&group_state=expanded

That is 1040 successful test runs across all supported operating systems. There is just one window leak, which is common when running a single test in this way.

Pushed by mratcliffe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cd7e247de34b
Fix and rewrite browser_storage_updates.js r=rcaliman
Assignee: mratcliffe → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.