Closed Bug 1367155 Opened 7 years ago Closed 7 years ago

Intermittent dom/media/test/test_decode_error.html,dom/media/test/test_seek-10.html | application crashed [@ mozilla::FileBlockCache::Run()] (Assertion failure: mFD, at dom/media/FileBlockCache.cpp:292)

Categories

(Core :: Audio/Video: Playback, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox-esr52 --- unaffected
firefox53 --- unaffected
firefox54 --- unaffected
firefox55 --- fixed

People

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

References

Details

(Keywords: assertion, crash, intermittent-failure)

Crash Data

Attachments

(1 file)

Most probably due to bug 1365534, which made opening the file (and hence setting mFD) asynchronous, and also resets mFD earlier. I'll investigate shortly...
Assignee: nobody → gsquelart
Blocks: 1365534
Comment on attachment 8870664 [details]
Bug 1367155 - Handle async-closed FileBlockCached::mFD when reading/writing -

https://reviewboard.mozilla.org/r/142136/#review145800

r+ with comment addressed.

::: dom/media/FileBlockCache.cpp:118
(Diff revision 1)
> +
>  FileBlockCache::~FileBlockCache()
>  {
>    NS_ASSERTION(!mIsOpen, "Should Close() FileBlockCache before destroying");
> +  if (mFD) {
> +    // This could happen in the rare case where Close() was called shortly

Optional: Maybe you could instead just close the file descriptor in SetCacheFile in the !mIsOpen path? If you do that, you should assert the file descriptor is null here though.

::: dom/media/FileBlockCache.cpp:342
(Diff revision 1)
>      {
>        MutexAutoUnlock unlock(mDataMutex);
>        MutexAutoLock lock(mFileMutex);
> +      if (!mFD) {
> +        // We may be here if:
> +        // - mFD is not initialized yet. We can just exit, because this task

I think the "mFD is not initialized yet" case mentioned in this comment can't happen.

I don't see how we can get here before SetCacheFile() runs, as we don't dispatch a runnable to run this unless mInitialized is true, and that's set to true in SetCacheFile().

It seems more likely that SetCacheFile() ran, and then Close() ran before Run() ran.

So I think this comment is misleading.
Attachment #8870664 - Flags: review?(cpearce) → review+
Summary: Intermittent dom/media/test/test_decode_error.html | application crashed [@ mozilla::FileBlockCache::Run()] (Assertion failure: mFD, at dom/media/FileBlockCache.cpp:292) → Intermittent dom/media/test/test_decode_error.html,dom/media/test/test_seek-10.html | application crashed [@ mozilla::FileBlockCache::Run()] (Assertion failure: mFD, at dom/media/FileBlockCache.cpp:292)
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8839c7a642a7
Handle async-closed FileBlockCached::mFD when reading/writing - r=cpearce
https://hg.mozilla.org/mozilla-central/rev/8839c7a642a7
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: