Assertion failure: !mPendingRequestCount, at /builds/worker/workspace/build/src/dom/indexedDB/IDBTransaction.cpp:102
Categories
(Core :: Storage: IndexedDB, defect, P3)
Tracking
()
People
(Reporter: jkratzer, Assigned: tt)
References
(Blocks 2 open bugs)
Details
(Keywords: assertion)
Attachments
(1 file)
Reporter | ||
Comment 2•4 years ago
|
||
I realized that I never actually attached a testcase here. The original testcase I had for this issue no longer reproduces however, we are still seeing this issue. I'm working on getting a reproducible testcase and will attach it here once I do.
Reporter | ||
Comment 3•4 years ago
|
||
A pernosco session for this issue can be found at the following URL:
https://pernos.co/debug/ob3Pey3nza1ibwaDuowVGg/index.html
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
•
|
||
There are two alerts in this session:
MOZ_ReportAssertionFailure (aStr@0x7fc2549798d9="mValue == Initial", aFilename@0x7fc254606453="/home/forb1dden/source/mozilla-central/objdir-ff-debug-pernosco/dist/include/mozilla/dom/FlippedOnce.h", aLine=30)
MOZ_ReportAssertionFailure (aStr@0x7fdbe01ef00f="!mPendingRequestCount", aFilename@0x7fdbe0525056="/home/forb1dden/source/mozilla-central/dom/indexedDB/IDBTransaction.cpp", aLine=134)
For the first one, the alert was raised because DatabaseOperationBase::NoteActorDestroyed
got called twice. (The assertion is used to ensure mActorDestroyed
gets flipped once.)
The first call was initiated by Cursor<CursorType>::ActorDestroy
.
And the second call was initiated by Cursor<CursorType>::CursorOpBase::Cleanup.
I guess the second alert was caused by the crash at FlippedOnce.h
on the parent process. So that there is no corresponding IDBTransaction::OnRequestFinished
arrives at the content process. (And thus, causing the inequality pair of OnNewRequest
and OnRequestFinished
. Such that mPendingRequestCount
was 1 rather than expected 0 when destroying the IDBTransaction
)
BTW, when I searched the callsites for DatabaseOperationBase::NoteActorDestroyed
on the serachfox, I didn't find the callsite for Cursor<CursorType>::CursorOpBase::Cleanup
. I guess it's probably an issue on searchfox.
Comment 5•4 years ago
|
||
(In reply to Tom Tung [:tt, :ttung] from comment #4)
BTW, when I searched the callsites for
DatabaseOperationBase::NoteActorDestroyed
on the serachfox, I didn't find the callsite forCursor<CursorType>::CursorOpBase::Cleanup
. I guess it's probably an issue on searchfox.
I think the (only) call is from https://searchfox.org/mozilla-central/rev/1a47a74bd5ba89f2474aa27c40bd478e853f3276/dom/indexedDB/ActorsParent.cpp#17675. It's a virtual member function.
Assignee | ||
Comment 6•4 years ago
|
||
(In reply to Simon Giesecke [:sg] [he/him] from comment #5)
(In reply to Tom Tung [:tt, :ttung] from comment #4)
BTW, when I searched the callsites for
DatabaseOperationBase::NoteActorDestroyed
on the serachfox, I didn't find the callsite forCursor<CursorType>::CursorOpBase::Cleanup
. I guess it's probably an issue on searchfox.I think the (only) call is from https://searchfox.org/mozilla-central/rev/1a47a74bd5ba89f2474aa27c40bd478e853f3276/dom/indexedDB/ActorsParent.cpp#17675. It's a virtual member function.
Hmm, I think I wanted to say that I expected to see:
20660 NoteActorDestroyed(); // found in mozilla::dom::indexedDB::(anonymous namespace)::Cursor<CursorType>::CursorOpBase::Cleanup
in the result for searching the uses of DatabaseOperationBase::NoteActorDestroyed
.
However, it actually presents in the result so never mind. :)
Anyway, after checking the original code in D56014, I think mActorDestroyed
is not originally designed to prevent NoteActorDestroyed
from being called more than once. It was used to ensure NoteActorDestroyed
is called before when destructing DatabaseOperationBase()
. Such that I will submit a patch to update that.
Comment 7•4 years ago
|
||
Hm, it's just that this bug was opened in October 2018, which was way before D56014 landed. The code has changed massively since October 2018, so it's possible that the current issue is different from the original one.
Assignee | ||
Comment 8•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 9•4 years ago
|
||
(In reply to Simon Giesecke [:sg] [he/him] from comment #7)
Hm, it's just that this bug was opened in October 2018, which was way before D56014 landed. The code has changed massively since October 2018, so it's possible that the current issue is different from the original one.
True, it's possible that the current issue is different from the original one. We will see if this issue (Assertion failure: !mPendingRequestCount...
) still exist after patch gets landed
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Description
•