Bug: Intermittent [TC] browser/components/newtab/test/browser/abouthomecache/browser_shutdown_timeout.js | Uncaught exception - undefined - threw exception: [Exception... "Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED)
Status: RESOLVED
Priority: P5
Resolution: DUPLICATE
Created: 2020-12-01 12:39:42+00:00
Resolved: 2022-04-09 15:00:46+00:00

**Filed by:** apavel [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=323149830&repo=mozilla-central
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/TWAd0ekuS46lztBfUwkQBA/runs/0/artifacts/public/logs/live_backing.log

---
```
[task 2020-12-01T10:46:28.531Z] 10:46:28     INFO - TEST-START | browser/components/newtab/test/browser/abouthomecache/browser_shutdown_timeout.js
[task 2020-12-01T10:46:29.407Z] 10:46:29     INFO - GECKO(1559) | [CodeCoverage] Setting handlers for process 1757.
[task 2020-12-01T10:46:29.891Z] 10:46:29     INFO - GECKO(1559) | console.warn: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAA/UlEQVR4nO3RMQ0AMAzAsPIn3d5DsBw2gkiZJWV+B/AyJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQGENiDIkxJMaQmAP4K6zWNUjE4wAAAABJRU5ErkJggg== is not allowed for anchor targets."
[task 2020-12-01T10:46:29.907Z] 10:46:29     INFO - GECKO(1559) | JavaScript error: resource://gre/modules/PromiseWorker.jsm, line 413: Error: Internal error: worker terminated
[task 2020-12-01T10:46:33.848Z] 10:46:33     INFO - TEST-INFO | started process screentopng
[task 2020-12-01T10:46:34.072Z] 10:46:34     INFO - TEST-INFO | screentopng: exit 0
[task 2020-12-01T10:46:34.073Z] 10:46:34     INFO - Buffered messages logged at 10:46:28
[task 2020-12-01T10:46:34.074Z] 10:46:34     INFO - Entering test bound test_shutdown_timeout
[task 2020-12-01T10:46:34.075Z] 10:46:34     INFO - Console message: 1606819588533	AboutHomeStartupCache	TRACE	Preloaded about:newtab was updated.
[task 2020-12-01T10:46:34.075Z] 10:46:34     INFO - Console message: 1606819588536	AboutHomeStartupCache	TRACE	Preloaded about:newtab was updated.
[task 2020-12-01T10:46:34.076Z] 10:46:34     INFO - Console message: 1606819588537	AboutHomeStartupCache	TRACE	Preloaded about:newtab was updated.
[task 2020-12-01T10:46:34.076Z] 10:46:34     INFO - Console message: 1606819588617	AboutHomeStartupCache	TRACE	Preloaded about:newtab was updated.
[task 2020-12-01T10:46:34.076Z] 10:46:34     INFO - Console message: 1606819588618	AboutHomeStartupCache	TRACE	Preloaded about:newtab was updated.
[task 2020-12-01T10:46:34.076Z] 10:46:34     INFO - Console message: 1606819588743	AboutHomeStartupCache	TRACE	Preloaded about:newtab was updated.
[task 2020-12-01T10:46:34.077Z] 10:46:34     INFO - Console message: 1606819588745	AboutHomeStartupCache	TRACE	Preloaded about:newtab was updated.
[task 2020-12-01T10:46:34.077Z] 10:46:34     INFO - Console message: 1606819588822	AboutHomeStartupCache	TRACE	Preloaded about:newtab was updated.
[task 2020-12-01T10:46:34.078Z] 10:46:34     INFO - Console message: 1606819588828	AboutHomeStartupCache	TRACE	Preloaded about:newtab was updated.
[task 2020-12-01T10:46:34.079Z] 10:46:34     INFO - Console message: 1606819588835	AboutHomeStartupCache	TRACE	Preloaded about:newtab was updated.
[task 2020-12-01T10:46:34.079Z] 10:46:34     INFO - Test is clearing the cache
[task 2020-12-01T10:46:34.079Z] 10:46:34     INFO - Test has cleared the cache.
[task 2020-12-01T10:46:34.079Z] 10:46:34     INFO - Simulating restart of the browser
[task 2020-12-01T10:46:34.079Z] 10:46:34     INFO - Simulating shutdown write
[task 2020-12-01T10:46:34.080Z] 10:46:34     INFO - Console message: 1606819588872	AboutHomeStartupCache	TRACE	Clearing the cache.
[task 2020-12-01T10:46:34.080Z] 10:46:34     INFO - Console message: 1606819588873	AboutHomeStartupCache	TRACE	Never wrote a cache this session. Arming cache task.
[task 2020-12-01T10:46:34.081Z] 10:46:34     INFO - Console message: 1606819588873	AboutHomeStartupCache	TRACE	Finalizing cache task on shutdown
[task 2020-12-01T10:46:34.082Z] 10:46:34     INFO - Console message: 1606819588874	AboutHomeStartupCache	TRACE	Caching now.
[task 2020-12-01T10:46:34.083Z] 10:46:34     INFO - Console message: 1606819588874	AboutHomeStartupCache	TRACE	Parent is requesting Activity Stream state object.
[task 2020-12-01T10:46:34.083Z] 10:46:34     INFO - Console message: 1606819588874	AboutHomeStartupCache	TRACE	Parent is requesting cache streams.
[task 2020-12-01T10:46:34.083Z] 10:46:34     INFO - Buffered messages logged at 10:46:29
[task 2020-12-01T10:46:34.083Z] 10:46:34     INFO - Shutdown write done
[task 2020-12-01T10:46:34.083Z] 10:46:34     INFO - Waiting for AboutHomeStartupCacheChild to uninit
[task 2020-12-01T10:46:34.084Z] 10:46:34     INFO - Console message: [JavaScript Error: "1606819589877	AboutHomeStartupCache	ERROR	Timed out getting cache streams. Skipping cache task." {file: "resource://gre/modules/Log.jsm" line: 723}]
[task 2020-12-01T10:46:34.084Z] 10:46:34     INFO - append@resource://gre/modules/Log.jsm:723:12
[task 2020-12-01T10:46:34.084Z] 10:46:34     INFO - log@resource://gre/modules/Log.jsm:379:16
[task 2020-12-01T10:46:34.084Z] 10:46:34     INFO - error@resource://gre/modules/Log.jsm:387:10
[task 2020-12-01T10:46:34.084Z] 10:46:34     INFO - cacheNow@resource:///modules/BrowserGlue.jsm:5105:18
[task 2020-12-01T10:46:34.084Z] 10:46:34     INFO - 
[task 2020-12-01T10:46:34.085Z] 10:46:34     INFO - Console message: 1606819589878	AboutHomeStartupCache	TRACE	Uninitialized.
[task 2020-12-01T10:46:34.085Z] 10:46:34     INFO - AboutHomeStartupCacheChild uninitted
[task 2020-12-01T10:46:34.085Z] 10:46:34     INFO - Waiting for AboutHomeStartupCache cache entry
[task 2020-12-01T10:46:34.087Z] 10:46:34     INFO - Console message: 1606819589897	AboutHomeStartupCache	TRACE	Initting.
[task 2020-12-01T10:46:34.088Z] 10:46:34     INFO - Console message: 1606819589897	AboutHomeStartupCache	TRACE	Constructing pipes.
[task 2020-12-01T10:46:34.088Z] 10:46:34     INFO - Console message: 1606819589898	AboutHomeStartupCache	TRACE	Initialized.
[task 2020-12-01T10:46:34.089Z] 10:46:34     INFO - Console message: 1606819589898	AboutHomeStartupCache	TRACE	A privileged about content process is launching with ID 1.
[task 2020-12-01T10:46:34.089Z] 10:46:34     INFO - Console message: 1606819589898	AboutHomeStartupCache	INFO	Sending input streams down to content process.
[task 2020-12-01T10:46:34.093Z] 10:46:34     INFO - Console message: [JavaScript Error: "Error: Internal error: worker terminated" {file: "resource://gre/modules/PromiseWorker.jsm" line: 413}]
[task 2020-12-01T10:46:34.093Z] 10:46:34     INFO - Buffered messages logged at 10:46:33
[task 2020-12-01T10:46:34.093Z] 10:46:34     INFO - Got AboutHomeStartupCache cache entry
[task 2020-12-01T10:46:34.094Z] 10:46:34     INFO - Ensuring cache bytes are available
[task 2020-12-01T10:46:34.095Z] 10:46:34     INFO - Console message: 1606819593731	AboutHomeStartupCache	TRACE	Cache entry is available.
[task 2020-12-01T10:46:34.095Z] 10:46:34     INFO - Console message: 1606819593731	AboutHomeStartupCache	TRACE	Connecting nsICacheEntry to pipes.
[task 2020-12-01T10:46:34.096Z] 10:46:34     INFO - Console message: 1606819593732	AboutHomeStartupCache	TRACE	
[task 2020-12-01T10:46:34.097Z] 10:46:34     INFO - Console message: 1606819593732	AboutHomeStartupCache	DEBUG	Cache meta data does not exist. Closing streams.
[task 2020-12-01T10:46:34.097Z] 10:46:34     INFO - Buffered messages finished
[task 2020-12-01T10:46:34.097Z] 10:46:34     INFO - TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/abouthomecache/browser_shutdown_timeout.js | Uncaught exception - undefined - threw exception: [Exception... "Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED) [nsIInputStream.available]"  nsresult: "0x80470002 (NS_BASE_STREAM_CLOSED)"  location: "JS frame :: chrome://mochitests/content/browser/browser/components/newtab/test/browser/abouthomecache/head.js :: <TOP_LEVEL> :: line 130"  data: no]
[task 2020-12-01T10:46:34.097Z] 10:46:34     INFO - Leaving test bound test_shutdown_timeout
[task 2020-12-01T10:46:34.097Z] 10:46:34     INFO - GECKO(1559) | [CodeCoverage] Requested flush for 1559.
[task 2020-12-01T10:46:34.198Z] 10:46:34     INFO - GECKO(1559) | [CodeCoverage] flush completed.
[task 2020-12-01T10:46:35.005Z] 10:46:35     INFO - GECKO(1559) | [CodeCoverage] JS flush completed.
[task 2020-12-01T10:46:35.005Z] 10:46:35     INFO - GECKO(1559) | [CodeCoverage] Requested flush for 1629.
[task 2020-12-01T10:46:35.005Z] 10:46:35     INFO - GECKO(1559) | [CodeCoverage] Requested flush for 1723.
[task 2020-12-01T10:46:35.006Z] 10:46:35     INFO - GECKO(1559) | [CodeCoverage] Requested flush for 1757.
[task 2020-12-01T10:46:35.006Z] 10:46:35     INFO - GECKO(1559) | [CodeCoverage] Requested flush for 1636.
[task 2020-12-01T10:46:35.308Z] 10:46:35     INFO - GECKO(1559) | [CodeCoverage] flush completed.
[task 2020-12-01T10:46:35.566Z] 10:46:35     INFO - GECKO(1559) | [CodeCoverage] JS flush completed.
[task 2020-12-01T10:46:35.823Z] 10:46:35     INFO - GECKO(1559) | [CodeCoverage] flush completed.
[task 2020-12-01T10:46:35.859Z] 10:46:35     INFO - GECKO(1559) | [CodeCoverage] JS flush completed.
[task 2020-12-01T10:46:36.128Z] 10:46:36     INFO - GECKO(1559) | [CodeCoverage] flush completed.
[task 2020-12-01T10:46:36.148Z] 10:46:36     INFO - GECKO(1559) | [CodeCoverage] JS flush completed.
[task 2020-12-01T10:46:36.410Z] 10:46:36     INFO - GECKO(1559) | [CodeCoverage] flush completed.
[task 2020-12-01T10:46:36.474Z] 10:46:36     INFO - GECKO(1559) | [CodeCoverage] JS flush completed.
[task 2020-12-01T10:46:36.490Z] 10:46:36     INFO - GECKO(1559) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2020-12-01T10:46:36.490Z] 10:46:36     INFO - GECKO(1559) | MEMORY STAT | vsize 3181MB | residentFast 481MB | heapAllocated 104MB
[task 2020-12-01T10:46:36.491Z] 10:46:36     INFO - TEST-OK | browser/components/newtab/test/browser/abouthomecache/browser_shutdown_timeout.js | took 7960ms
[task 2020-12-01T10:46:36.492Z] 10:46:36     INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-12-01T10:46:36.493Z] 10:46:36     INFO - TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/abouthomecache/browser_shutdown_timeout.js | Found an unexpected tab at the end of test run: about:home - 
[task 2020-12-01T10:46:36.554Z] 10:46:36     INFO - checking window state
[task 2020-12-01T10:46:38.616Z] 10:46:38     INFO - GECKO(1559) | Completed ShutdownLeaks collections in process 1723
[task 2020-12-01T10:46:38.632Z] 10:46:38     INFO - GECKO(1559) | Completed ShutdownLeaks collections in process 1757
[task 2020-12-01T10:46:38.736Z] 10:46:38     INFO - GECKO(1559) | Completed ShutdownLeaks collections in process 1636
[task 2020-12-01T10:46:39.355Z] 10:46:39     INFO - GECKO(1559) | Completed ShutdownLeaks collections in process 1629
[task 2020-12-01T10:46:39.460Z] 10:46:39     INFO - GECKO(1559) | [CodeCoverage] Setting handlers for process 1788.
[task 2020-12-01T10:46:40.526Z] 10:46:40     INFO - GECKO(1559) | Completed ShutdownLeaks collections in process 1559
[task 2020-12-01T10:46:40.527Z] 10:46:40     INFO - TEST-START | Shutdown
[task 2020-12-01T10:46:40.528Z] 10:46:40     INFO - Browser Chrome Test Summary
[task 2020-12-01T10:46:40.528Z] 10:46:40     INFO - Passed:  0
[task 2020-12-01T10:46:40.529Z] 10:46:40     INFO - Failed:  2
[task 2020-12-01T10:46:40.529Z] 10:46:40     INFO - Todo:    0
[task 2020-12-01T10:46:40.530Z] 10:46:40     INFO - Mode:    e10s
[task 2020-12-01T10:46:40.530Z] 10:46:40     INFO - *** End BrowserChrome Test Results ***```