Closed Bug 1303441 Opened 8 years ago Closed 7 years ago

Intermittent LeakSanitizer | leak at mozilla::storage::StorageBaseStatementInternal::destructorAsyncFinalize, mozilla::storage::AsyncStatement::~AsyncStatement, mozilla::storage::AsyncStatement::Release

Categories

(Core :: SQLite and Embedded Database Bindings, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: intermittent-bug-filer, Unassigned)

References

Details

(Keywords: intermittent-failure, memory-leak)

This is fallout from https://groups.google.com/forum/#!topic/mozilla.dev.platform/xN-K5kEsq7A and bug 1155059. Specifically, Connection::getAsyncExecutionTarget() hands us an nsIEventTarget (that is not our current thread) and we try to dispatch to it, but fail. The failure causes a leak because it intentionally took ownership of our finalizer in order to avoid accidental releasing on the main thread. The code expects getAsyncExecutionTarget() to prevent this type of thing from happening since it has a shutdown guard. Presumably "xpcom-shutdown-threads" has happened and gXPCOMThreadsShutDown=true. mozStorage's xpcom-shutdown-threads observer does not directly impact getAsyncExecutionTarget(), leading to this sequence of events. I think we should ensure this gets fixed as part of bug 1186276.
Depends on: 1186276
Priority: -- → P3
Status: NEW → RESOLVED
Closed: 7 years ago
Keywords: mlk
Resolution: --- → WORKSFORME
Product: Toolkit → Core
You need to log in before you can comment on or make changes to this bug.