Closed Bug 1539104 Opened 5 years ago Closed 5 years ago

Intermittent GECKO(849) | Assertion failure: false (Don't use async connections synchronously on the main thread), at /builds/worker/workspace/build/src/storage/mozStorageConnection.cpp:940

Categories

(Toolkit :: Storage, defect, P5)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox-esr60 --- unaffected
firefox66 --- unaffected
firefox67 --- unaffected
firefox68 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: lina)

References

(Regression)

Details

(Keywords: assertion, intermittent-failure, regression)

Attachments

(1 file)

#[markdown(off)]
Filed by: ncsoregi [at] mozilla.com

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

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

08:27:02 INFO - TEST-OK | browser/components/enterprisepolicies/tests/browser/disable_default_bookmarks/browser_policy_no_default_bookmarks.js | took 64ms
08:27:02 INFO - GECKO(849) | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /var/folders/qb/nc1k_bf97hzdn4_8gyj23zpr00000x/T/tmpCAEAt2.mozrunner/runtests_leaks_tab_pid854.log
08:27:02 INFO - GECKO(849) | ++DOMWINDOW == 3 (0x1249ce800) [pid = 853] [serial = 3] [outer = 0x124931020]
08:27:02 INFO - checking window state
08:27:02 INFO - GECKO(849) | ++DOMWINDOW == 12 (0x13094d800) [pid = 849] [serial = 12] [outer = 0x1222bfa60]
08:27:02 INFO - Console message: [JavaScript Error: "TypeError: reply[0] is undefined" {file: "chrome://marionette/content/listener.js" line: 453}]
08:27:02 INFO - GECKO(849) | ++DOMWINDOW == 13 (0x134c5c400) [pid = 849] [serial = 13] [outer = 0x1222bfa60]
08:27:02 INFO - GECKO(849) | [Parent 849, Main Thread] WARNING: 'aOperation == SYNCHRONOUS && mSupportedOperations == ASYNCHRONOUS && NS_IsMainThread()', file /builds/worker/workspace/build/src/storage/mozStorageConnection.cpp, line 938
08:27:02 INFO - GECKO(849) | Assertion failure: false (Don't use async connections synchronously on the main thread), at /builds/worker/workspace/build/src/storage/mozStorageConnection.cpp:940
08:28:33 INFO - GECKO(849) | #01: mozilla::storage::Service::minimizeMemory() [xpcom/base/nsCOMPtr.h:439]
08:28:33 INFO -
08:28:33 INFO - GECKO(849) | #02: mozilla::storage::Service::Observe(nsISupports*, char const*, char16_t const*) [storage/mozStorageService.cpp:0]
08:28:33 INFO -
08:28:33 INFO - GECKO(849) | #03: non-virtual thunk to mozilla::storage::Service::Observe(nsISupports*, char const*, char16_t const*) [storage/mozStorageService.cpp:0]
08:28:33 INFO -
08:28:33 INFO - GECKO(849) | #04: nsObserverList::NotifyObservers(nsISupports*, char const*, char16_t const*) [xpcom/ds/nsObserverList.cpp:65]
08:28:33 INFO -
08:28:33 INFO - GECKO(849) | #05: nsObserverService::NotifyObservers(nsISupports*, char const*, char16_t const*) [mozglue/misc/TimeStamp.h:452]
08:28:33 INFO -
08:28:33 INFO - GECKO(849) | --DOMWINDOW == 3 (0x1143a7000) [pid = 851] [serial = 2] [outer = 0x0] [url = about:blank]
08:28:33 INFO - GECKO(849) | Exiting due to channel error.
08:28:33 INFO - GECKO(849) | Exiting due to channel error.
08:28:33 INFO - GECKO(849) | Exiting due to channel error.
08:28:33 INFO - GECKO(849) | Exiting due to channel error.
08:28:33 INFO - GECKO(849) | Exiting due to channel error.
08:28:33 INFO - TEST-INFO | Main app process: exit 1
08:28:33 ERROR - TEST-UNEXPECTED-FAIL | ShutdownLeaks | process() called before end of test suite
08:28:33 INFO - Buffered messages finished
08:28:33 ERROR - TEST-UNEXPECTED-FAIL | Last test finished | application terminated with exit code 1

The problem is this cast here: https://searchfox.org/mozilla-central/rev/2c912888e3b7ae4baf161d98d7a01434f31830aa/storage/mozStorageService.cpp#313-314 Both types of connections implement mozIStorageConnection now, whereas before, async connections didn't.

Assignee: nobody → lina
Blocks: 1482608
Status: NEW → ASSIGNED

In retrospect, overloading Connection::connectionReady to mean
"is ready and supports this operation" wasn't a good idea. This
commit reverts that change (cfd44c936a9b), and adds two new methods:

  • Connection::operationSupported, to check if a connection supports
    sync or async operations. This method is public.
  • Connection::ensureOperationSupported, that asserts or returns an
    error if the connection doesn't support an operation. This is
    private.

operationSupported is used by callers like Service::minimizeMemory
to detect if the connection supports sync operations, since both sync
and async connections implement mozIStorageConnection now.

Finally, some callers used !mDBConn to check if the connection was
ready, while others used connectionReady(). This commit changes them
to use the latter.

No longer blocks: 1482608
Keywords: regression
Regressed by: 1482608
Keywords: regression
Pushed by kcambridge@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/db20a3f4324e
Add a way to detect supported storage connection operations. r=mak
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Regressions: 1545200
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: