Bug 129792 - [Mac] Leak: dispatch_semaphore leak allocated in MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange
Summary: [Mac] Leak: dispatch_semaphore leak allocated in MediaPlayerPrivateAVFoundati...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-06 01:47 PST by Joseph Pecoraro
Modified: 2014-03-06 09:59 PST (History)
6 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (1.50 KB, patch)
2014-03-06 01:50 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-03-06 01:47:48 PST
Seen on the leaks bot:
<http://build.webkit.org/builders/Apple%20MountainLion%20%28Leaks%29/builds/9535/steps/layout-test/logs/stdio>

Leak: 0x7fb97b2a39b0  size=112  zone: DefaultMallocZone_0x100eb0000   OS_dispatch_semaphore  ObjC  libdispatch.dylib
	0x781082a8 0x00007fff 0x00000000 0x00000000 	...x............
	0x89abcdef 0xffffffff 0x78109d00 0x00007fff 	...........x....
	0x00000000 0x00000000 0x00000000 0x00000000 	................
	0x00000000 0x00000000 0x00000000 0x00000000 	................
	0x00000000 0x00000000 0x00000000 0x00000000 	................
	0x0000232b 0x00000000 0x00000000 0x00000000 	+#..............
	0x00000000 0x00000000 0x00000000 0x00000000 	................
	Call stack: [thread 0x7fff78de5180]: 
        | 0x2 
        | start 
        | main DumpRenderTreeMain.mm:30 
        | DumpRenderTreeMain(int, char const**) DumpRenderTree.mm:1277 
        | dumpRenderTree(int, char const**) DumpRenderTree.mm:1169 
        | runTestingServerLoop() DumpRenderTree.mm:1085 
        | runTest(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) DumpRenderTree.mm:1821 
        | CFRunLoopRunSpecific 
        | __CFRunLoopRun 
        | __CFRunLoopDoTimer 
        | __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ 
        | WebCore::timerFired(__CFRunLoopTimer*, void*) SharedTimerMac.mm:134 
        | WebCore::ThreadTimers::sharedTimerFired() ThreadTimers.cpp:108 
        | WebCore::ThreadTimers::sharedTimerFiredInternal() ThreadTimers.cpp:135 
        | WebCore::Timer<WebCore::GenericEventQueue>::fired() Timer.h:133 
        | std::__1::function<void ()>::operator()() const functional:1435 
        | std::__1::__function::__func<std::__1::__bind<void (WebCore::GenericEventQueue::*)(WebCore::Timer<WebCore::GenericEventQueue>&)&, WebCore::GenericEventQueue*&, std::__1::reference_wrapper<WebCore::Timer<WebCore::GenericEventQueue> > >, std::__1::allocator<std::__1::__bind<void (WebCore::GenericEventQueue::*)(WebCore::Timer<WebCore::GenericEventQueue>&)&, WebCore::GenericEventQueue*&, std::__1::reference_wrapper<WebCore::Timer<WebCore::GenericEventQueue> > > >, void ()>::operator()() functional:1059 
        | WebCore::GenericEventQueue::timerFired(WebCore::Timer<WebCore::GenericEventQueue>&) GenericEventQueue.cpp:72 
        | WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) Node.cpp:2028 
        | WebCore::EventDispatcher::dispatchEvent(WebCore::Node*, WTF::PassRefPtr<WebCore::Event>) EventDispatcher.cpp:326 
        | WebCore::dispatchEventInDOM(WebCore::Event&, WebCore::EventPath const&, WebCore::WindowEventContext&) EventDispatcher.cpp:271 
        | WebCore::EventContext::handleLocalEvents(WebCore::Event&) const EventContext.cpp:55 
        | WebCore::Node::handleLocalEvents(WebCore::Event&) Node.cpp:2014 
        | WebCore::EventTarget::fireEventListeners(WebCore::Event*) EventTarget.cpp:197 
        | WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector<WebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow>&) EventTarget.cpp:247 
        | WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) JSEventListener.cpp:126 
        | WebCore::JSMainThreadExecState::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) JSMainThreadExecState.h:55 
        | JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) CallData.cpp:39 
        | JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) Interpreter.cpp:994 
        | JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) JITCode.cpp:47 
        | callToJavaScript 
        | llint_op_call 
        | llint_op_call 
        | llint_op_call 
        | llint_op_call 
        | 0x5d028c80103a 
        | WebCore::jsWebGLRenderingContextPrototypeFunctionTexImage2D(JSC::ExecState*) JSWebGLRenderingContext.cpp:3313 
        | WebCore::jsWebGLRenderingContextPrototypeFunctionTexImage2D5(JSC::ExecState*) JSWebGLRenderingContext.cpp:3295 
        | WebCore::WebGLRenderingContext::texImage2D(unsigned int, int, unsigned int, unsigned int, unsigned int, WebCore::HTMLVideoElement*, int&) WebGLRenderingContext.cpp:3974 
        | WebCore::WebGLRenderingContext::videoFrameToImage(WebCore::HTMLVideoElement*, WebCore::BackingStoreCopy, int&) WebGLRenderingContext.cpp:3945 
        | WebCore::HTMLVideoElement::paintCurrentFrameInContext(WebCore::GraphicsContext*, WebCore::IntRect const&) HTMLVideoElement.cpp:256 
        | WebCore::MediaPlayer::setVisible(bool) MediaPlayer.cpp:738 
        | WebCore::MediaPlayerPrivateAVFoundation::setVisible(bool) MediaPlayerPrivateAVFoundation.cpp:593 
        | WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering() MediaPlayerPrivateAVFoundation.cpp:139 
        | WebCore::MediaPlayerPrivateAVFoundationObjC::createContextVideoRenderer() MediaPlayerPrivateAVFoundationObjC.mm:434 
        | WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput() MediaPlayerPrivateAVFoundationObjC.mm:1424 
        | WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange() MediaPlayerPrivateAVFoundationObjC.mm:1569 
        | dispatch_semaphore_create 
        | _os_object_alloc 
        | class_createInstance 
        | calloc 
        | malloc_zone_calloc 

Looks like it is not released in the destructor.
Comment 1 Joseph Pecoraro 2014-03-06 01:50:06 PST
Created attachment 225969 [details]
[PATCH] Proposed Fix
Comment 2 WebKit Commit Bot 2014-03-06 09:59:39 PST
Comment on attachment 225969 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 225969

Committed r165195: <http://trac.webkit.org/changeset/165195>
Comment 3 WebKit Commit Bot 2014-03-06 09:59:41 PST
All reviewed patches have been landed.  Closing bug.