Closed Bug 1143339 Opened 7 years ago Closed 7 years ago

[Mac] crash ~15 seconds after closing a youtube tab [@ CoreFoundation@0x188b7] or [@ CoreFoundation@0x18827] or [@ mozilla::AppleVDADecoder::Shutdown()]

Categories

(Core :: Audio/Video, defect)

All
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: BenWa, Assigned: jya)

References

Details

(Keywords: crash, regression)

Crash Data

Attachments

(3 files)

This bug was filed from the Socorro interface and is 
report bp-e4c986c6-ee41-4e68-ab88-b48ef2150314.
=============================================================

I got this crash after experiencing bug 1142901.
This has been happening to me be about 10-30 seconds having closing a youtube tab after seeing bug 1142901.
Summary: crash in CoreFoundation@0x18827 → [Mac] crash in CoreFoundation@0x18827 ~15 seconds after closing a youtube tab
I got a similar crash at a different address [@ CoreFoundation@0x19217], also after watching youtube:
https://crash-stats.mozilla.com/report/index/357c1fe4-e99e-4693-ac93-58fb32150315 

The most popular address seems to be [@ CoreFoundation@0x188b7] with >100 crashes:
https://crash-stats.mozilla.com/search/?topmost_filenames=AppleVDADecoder.cpp&_facets=signature&_columns=date&_columns=signature&_columns=product&_columns=version&_columns=build_id&_columns=platform#facet-signature

Seems new in 20150313030231 build.

Pasting the whole stack to make this easier to find.
  CoreFoundation  CoreFoundation@0x18827  
1     CoreFoundation  CoreFoundation@0x28793  
2     CoreFoundation  CoreFoundation@0x18a0d  
3     VideoToolbox    VideoToolbox@0x9183     
4       @0x1197eabe8    
5   XUL     mozilla::AppleVDADecoder::Shutdown()    dom/media/fmp4/apple/AppleVDADecoder.cpp
6   XUL     mozilla::SharedDecoderManager::Shutdown()   dom/media/fmp4/SharedDecoderManager.cpp
7   XUL     mozilla::MediaSourceReader::ContinueShutdown()  dom/media/mediasource/MediaSourceReader.cpp
8   XUL     mozilla::MediaPromise<bool, bool, false>::ThenValue<mozilla::MediaTaskQueue, mozilla::MediaSourceReader, void (mozilla::MediaSourceReader::*)(), void (mozilla::MediaSourceReader::*)()>::DoResolve(bool)   obj-firefox/x86_64/dist/include/MediaPromise.h
9   XUL     mozilla::MediaPromise<bool, bool, false>::ThenValueBase::ResolveRunnable::Run()     dom/media/MediaPromise.h
10  XUL     mozilla::MediaTaskQueue::Runner::Run()  dom/media/MediaTaskQueue.cpp
11  XUL     nsThreadPool::Run()     xpcom/threads/nsThreadPool.cpp
12  XUL     _ZThn8_N12nsThreadPool3RunEv    obj-firefox/x86_64/xpcom/threads/Unified_cpp_xpcom_threads0.cpp
13  XUL     nsThread::ProcessNextEvent(bool, bool*)     xpcom/threads/nsThread.cpp
14  XUL     NS_ProcessNextEvent(nsIThread*, bool)   xpcom/glue/nsThreadUtils.cpp
15  XUL     mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)   ipc/glue/MessagePump.cpp
16  XUL     MessageLoop::Run()  ipc/chromium/src/base/message_loop.cc
17  XUL     nsThread::ThreadFunc(void*)     xpcom/threads/nsThread.cpp
18  libnss3.dylib   _pt_root    nsprpub/pr/src/pthreads/ptthread.c
19    libsystem_pthread.dylib     libsystem_pthread.dylib@0x32fb  
20    libsystem_pthread.dylib     libsystem_pthread.dylib@0x3278  
21    libsystem_pthread.dylib     libsystem_pthread.dylib@0x14b0  
22  libnss3.dylib   libnss3.dylib@0x208cdf
Keywords: regression
Can't think of another reason on why it would crash now that it's managed by SharedDecoderManager but didn't before. So likely multiple calls to Shutdown() (and so likely similar to 1142527: we can't have an unbalanced call to Shutdown() and ReleaseMediaResources())
Assignee: nobody → jyavenard
Status: NEW → ASSIGNED
Attachment #8577685 - Flags: review?(cpearce)
(In reply to Nickolay_Ponomarev from comment #3)
> I got a similar crash at a different address [@ CoreFoundation@0x19217],
> also after watching youtube:
> https://crash-stats.mozilla.com/report/index/357c1fe4-e99e-4693-ac93-
> 58fb32150315 
> 
> The most popular address seems to be [@ CoreFoundation@0x188b7] with >100
> crashes:
> https://crash-stats.mozilla.com/search/?topmost_filenames=AppleVDADecoder.
> cpp&_facets=signature&_columns=date&_columns=signature&_columns=product&_colu
> mns=version&_columns=build_id&_columns=platform#facet-signature
> 
> Seems new in 20150313030231 build.
> 
> Pasting the whole stack to make this easier to find.
>   CoreFoundation  CoreFoundation@0x18827  
> 1     CoreFoundation  CoreFoundation@0x28793  
> 2     CoreFoundation  CoreFoundation@0x18a0d  
> 3     VideoToolbox    VideoToolbox@0x9183     
> 4       @0x1197eabe8    
> 5   XUL     mozilla::AppleVDADecoder::Shutdown()   
> dom/media/fmp4/apple/AppleVDADecoder.cpp
> 6   XUL     mozilla::SharedDecoderManager::Shutdown()  
> dom/media/fmp4/SharedDecoderManager.cpp

hold a sec...

How can the AppleVDADecoder not be wrapped in an AVCCMediaDataDecoder ???
The only way this can happen is if the mimetype isn't video/avc

cpearce, what mimetype can we get for h264 content ?
Flags: needinfo?(cpearce)
Also wrap video/mp4 mimetype. I'm no fan of using the mimetype, according to RFC: http://www.rfc-editor.org/rfc/rfc4337.txt anything with video will be video/mp4 as MP4 can use more than h264 as video codec it's not restrictive enough.
Attachment #8577689 - Flags: review?(cpearce)
Same deal with FFmpeg
Attachment #8577690 - Flags: review?(edwin)
Comment on attachment 8577690 [details] [diff] [review]
Part3. FFmpeg decoder can play video/mp4 mimetype

Review of attachment 8577690 [details] [diff] [review]:
-----------------------------------------------------------------

Lovely. :/
Attachment #8577690 - Flags: review?(edwin) → review+
FWIW, I'm hitting this extremely frequently, same stack, after closing a tab playing YouTube. No Flash installed.
https://crash-stats.mozilla.com/search/?signature=~CoreFoundation&version=39.0a1

70% of reports are with CoreFoundation@0x188b7

0 	CoreFoundation 	CoreFoundation@0x188b7 	
1 	CoreFoundation 	CoreFoundation@0x28823 	
2 	CoreFoundation 	CoreFoundation@0x18a9d 	
3 	VideoToolbox 	VideoToolbox@0x9033 	
4 		@0x10c58abe8 	
5 	XUL 	mozilla::AppleVDADecoder::Shutdown() 	dom/media/fmp4/apple/AppleVDADecoder.cpp
6 	XUL 	mozilla::SharedDecoderManager::Shutdown() 	dom/media/fmp4/SharedDecoderManager.cpp
7 	XUL 	mozilla::MediaSourceReader::ContinueShutdown() 	dom/media/mediasource/MediaSourceReader.cpp
(Attempting to autolinkify from Socorro...)
Summary: [Mac] crash in CoreFoundation@0x18827 ~15 seconds after closing a youtube tab → [Mac] crash ~15 seconds after closing a youtube tab [@ CoreFoundation@0x188b7] or [@ CoreFoundation 0x18827] or [@ mozilla::AppleVDADecoder::Shutdown()]
(In reply to Jean-Yves Avenard [:jya] from comment #6)
> The only way this can happen is if the mimetype isn't video/avc
> 
> cpearce, what mimetype can we get for h264 content ?

WMFDecoderModule::SupportsVideoMimeType() returns true for "video/mp4" or "video/avc", so maybe you need that for the Apple PDM?
Flags: needinfo?(cpearce)
Attachment #8577685 - Flags: review?(cpearce) → review+
Attachment #8577689 - Flags: review?(cpearce) → review+
Summary: [Mac] crash ~15 seconds after closing a youtube tab [@ CoreFoundation@0x188b7] or [@ CoreFoundation 0x18827] or [@ mozilla::AppleVDADecoder::Shutdown()] → [Mac] crash ~15 seconds after closing a youtube tab [@ CoreFoundation@0x188b7] or [@ CoreFoundation@0x18827] or [@ mozilla::AppleVDADecoder::Shutdown()]
I'm assuming the crash I just hit [@ mozilla::AVCCMediaDataDecoder::Shutdown() ] is the same root cause:
https://crash-stats.mozilla.com/report/index/e838f7a2-5777-4d17-a2d4-972122150318
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #17)
> I'm assuming the crash I just hit [@
> mozilla::AVCCMediaDataDecoder::Shutdown() ] is the same root cause:
> https://crash-stats.mozilla.com/report/index/e838f7a2-5777-4d17-a2d4-
> 972122150318

Yeah that was the assumption in closing as DUPE bug 1143687...
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #17)
> I'm assuming the crash I just hit [@
> mozilla::AVCCMediaDataDecoder::Shutdown() ] is the same root cause:
> https://crash-stats.mozilla.com/report/index/e838f7a2-5777-4d17-a2d4-
> 972122150318

no.. this one is a different root cause (and different backtrace) bug 1143687 had the same backtrace as this bug, so they were dupes. 
The backtrace doesn't make much sense however. It would appear that mPDM is no longer pointing to valid memory (but it's a refptr)

Can you please open another bug with details on how it happened?

Will have to monitor that one.

thank you
Flags: needinfo?(ted)
Filed bug 1145101.
Flags: needinfo?(ted)
Depends on: 1145779
You need to log in before you can comment on or make changes to this bug.