Bug 49146

Summary: REGRESSION: Hang loading Flash ads at Mac Ach and Hulu
Product: WebKit Reporter: Jon <jon>
Component: Plug-insAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: andersca, ap, simon.fraser, slewis
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
URL: http://arstechnica.com/civis/viewforum.php?f=19

Description Jon 2010-11-07 12:57:40 PST
I've been getting the following hang at Ars Technica's MacAch forums for a few weeks now. Infinite loop that needs to be force quit, only appears when a Flash ad is loading. Running the latest stable flash plugin (though did the same on previous stable and 64-bit test versions). Currently running r71483.


Thread 1270d1c8   DispatchQueue 1
  User stack:
    21 ??? (in Safari + 42144) [0x10000a4a0]
      21 NSApplicationMain + 364 (in AppKit) [0x7fff824081a8]
        21 -[NSApplication run] + 395 (in AppKit) [0x7fff8240f48b]
          21 ??? (in Safari + 91604) [0x1000165d4]
            21 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 155 (in AppKit) [0x7fff824497a9]
              21 _DPSNextEvent + 718 (in AppKit) [0x7fff82449e64]
                21 BlockUntilNextEventMatchingListInMode + 59 (in HIToolbox) [0x7fff831506b4]
                  21 ReceiveNextEventCommon + 310 (in HIToolbox) [0x7fff831507fb]
                    21 RunCurrentEventLoopInMode + 333 (in HIToolbox) [0x7fff831509f6]
                      21 CFRunLoopRunSpecific + 575 (in CoreFoundation) [0x7fff88ce7dbf]
                        21 __CFRunLoopRun + 6488 (in CoreFoundation) [0x7fff88ce9be8]
                          21 __NSFireTimer + 114 (in Foundation) [0x7fff881378f5]
                            21 ??? (in Safari + 286503) [0x100045f27]
                              21 ??? (in Safari + 286822) [0x100046066]
                                21 ??? (in Safari + 288190) [0x1000465be]
                                  21 ??? (in Safari + 288635) [0x10004677b]
                                    21 ??? (in Safari + 289398) [0x100046a76]
                                      21 ??? (in Safari + 290140) [0x100046d5c]
                                        21 -[NSView displayRectIgnoringOpacity:inContext:] + 461 (in AppKit) [0x7fff8258e756]
                                          21 -[WebHTMLView(WebPrivate) _recursive:displayRectIgnoringOpacity:inContext:topView:] + 157 (WebHTMLView.mm:1424 in WebKit) [0x100a4597d]
                                            21 -[NSView(NSInternal) _recursive:displayRectIgnoringOpacity:inContext:topView:] + 1349 (in AppKit) [0x7fff8258ef1d]
                                              21 -[WebHTMLView drawRect:] + 754 (WebHTMLView.mm:3394 in WebKit) [0x100a3f8c2]
                                                21 -[WebHTMLView drawSingleRect:] + 448 (WebHTMLView.mm:3352 in WebKit) [0x100a3fa90]
                                                  21 -[WebFrame(WebInternal) _drawRect:contentsOnly:] + 287 (WebFrame.mm:579 in WebKit) [0x100a2092f]
                                                    21 WebCore::FrameView::paintContents(WebCore::GraphicsContext*, WebCore::IntRect const&) + 479 (FrameView.cpp:2063 in WebCore) [0x100f3f4df]
                                                      21 WebCore::RenderLayer::paint(WebCore::GraphicsContext*, WebCore::IntRect const&, unsigned int, WebCore::RenderObject*) + 71 (RenderLayer.cpp:2295 in WebCore) [0x1013df087]
                                                        21 WebCore::RenderLayer::paintLayer(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::IntRect const&, unsigned int, WebCore::RenderObject*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int) + 4107 (RenderLayer.cpp:2542 in WebCore) [0x1013de4ab]
                                                          21 WebCore::RenderLayer::paintLayer(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::IntRect const&, unsigned int, WebCore::RenderObject*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int) + 3915 (RenderLayer.cpp:2542 in WebCore) [0x1013de3eb]
                                                            21 WebCore::RenderLayer::paintLayer(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::IntRect const&, unsigned int, WebCore::RenderObject*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int) + 3372 (RenderLayer.cpp:2490 in WebCore) [0x1013de1cc]
                                                              21 WebCore::RenderWidget::paint(WebCore::PaintInfo&, int, int) + 900 (IntSize.h:74 in WebCore) [0x101454d34]
                                                                21 WebCore::ScrollView::paint(WebCore::GraphicsContext*, WebCore::IntRect const&) + 53 (ScrollView.cpp:827 in WebCore) [0x10148630f]
                                                                  21 WebCore::Widget::paint(WebCore::GraphicsContext*, WebCore::IntRect const&) + 600 (WidgetMac.mm:250 in WebCore) [0x101598720]
                                                                    21 -[NSView displayRectIgnoringOpacity:inContext:] + 461 (in AppKit) [0x7fff8258e756]
                                                                      21 -[NSView(NSInternal) _recursive:displayRectIgnoringOpacity:inContext:topView:] + 2363 (in AppKit) [0x7fff8258f313]
                                                                        21 -[NSView(NSInternal) _recursive:displayRectIgnoringOpacity:inContext:topView:] + 2363 (in AppKit) [0x7fff8258f313]
                                                                          21 -[NSView(NSInternal) _recursive:displayRectIgnoringOpacity:inContext:topView:] + 2363 (in AppKit) [0x7fff8258f313]
                                                                            21 -[WebHTMLView(WebPrivate) _recursive:displayRectIgnoringOpacity:inContext:topView:] + 157 (WebHTMLView.mm:1424 in WebKit) [0x100a4597d]
                                                                              21 -[NSView(NSInternal) _recursive:displayRectIgnoringOpacity:inContext:topView:] + 1349 (in AppKit) [0x7fff8258ef1d]
                                                                                21 -[WebHTMLView drawRect:] + 754 (WebHTMLView.mm:3394 in WebKit) [0x100a3f8c2]
                                                                                  21 -[WebHTMLView drawSingleRect:] + 448 (WebHTMLView.mm:3352 in WebKit) [0x100a3fa90]
                                                                                    21 -[WebFrame(WebInternal) _drawRect:contentsOnly:] + 287 (WebFrame.mm:579 in WebKit) [0x100a2092f]
                                                                                      21 WebCore::FrameView::paintContents(WebCore::GraphicsContext*, WebCore::IntRect const&) + 479 (FrameView.cpp:2063 in WebCore) [0x100f3f4df]
                                                                                        21 WebCore::RenderLayer::paint(WebCore::GraphicsContext*, WebCore::IntRect const&, unsigned int, WebCore::RenderObject*) + 71 (RenderLayer.cpp:2295 in WebCore) [0x1013df087]
                                                                                          21 WebCore::RenderLayer::paintLayer(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::IntRect const&, unsigned int, WebCore::RenderObject*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int) + 4107 (RenderLayer.cpp:2542 in WebCore) [0x1013de4ab]
                                                                                            21 WebCore::RenderLayer::paintLayer(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::IntRect const&, unsigned int, WebCore::RenderObject*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int) + 3915 (RenderLayer.cpp:2542 in WebCore) [0x1013de3eb]
                                                                                              21 WebCore::RenderLayer::paintLayer(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::IntRect const&, unsigned int, WebCore::RenderObject*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int) + 3372 (RenderLayer.cpp:2490 in WebCore) [0x1013de1cc]
                                                                                                21 WebCore::RenderWidget::paint(WebCore::PaintInfo&, int, int) + 900 (IntSize.h:74 in WebCore) [0x101454d34]
                                                                                                  21 WebCore::Widget::paint(WebCore::GraphicsContext*, WebCore::IntRect const&) + 600 (WidgetMac.mm:250 in WebCore) [0x101598720]
                                                                                                    21 -[NSView displayRectIgnoringOpacity:inContext:] + 461 (in AppKit) [0x7fff8258e756]
                                                                                                      21 -[NSView(NSInternal) _recursive:displayRectIgnoringOpacity:inContext:topView:] + 1349 (in AppKit) [0x7fff8258ef1d]
                                                                                                        21 -[WebHostedNetscapePluginView drawRect:] + 538 (WebHostedNetscapePluginView.mm:415 in WebKit) [0x100a37d5a]
                                                                                                          21 WebKit::NetscapePluginInstanceProxy::snapshot(CGContext*, unsigned int, unsigned int) + 107 (memory:316 in WebKit) [0x1009f6d33]
                                                                                                            21 std::auto_ptr<WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply> WebKit::NetscapePluginInstanceProxy::waitForReply<WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply>(unsigned int) + 52 (NetscapePluginInstanceProxy.h:260 in WebKit) [0x1009fbc3c]
                                                                                                              21 WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply(unsigned int) + 61 (NetscapePluginInstanceProxy.mm:803 in WebKit) [0x1009f4da9]
                                                                                                                21 WebKit::NetscapePluginHostProxy::processRequests() + 153 (NetscapePluginHostProxy.mm:303 in WebKit) [0x1009efa5d]
                                                                                                                  21 mach_msg_trap + 10 (in libSystem.B.dylib) [0x7fff85f052da]
Comment 1 Jon 2010-11-07 15:22:08 PST
I'm getting this same hang on Hulu as well.
Comment 2 Alexey Proskuryakov 2010-11-07 21:01:44 PST
Hanging in NetscapePluginInstanceProxy::snapshot().
Comment 3 Anders Carlsson 2010-11-08 09:43:00 PST
Jon, could you sample the relevant WebKitPluginHost process too?
Comment 4 Jon 2010-11-08 13:37:16 PST
Sure, here's the Flash plugin process sample: 

Sampling process 99569 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling WebKitPluginHost (pid 99569) every 1 millisecond
Call graph:
    2483 Thread_259086   DispatchQueue_1: com.apple.main-thread  (serial)
      2483 0x6d2fb04d
        2483 0x6d2fb40f
          2483 -[NSApplication run]
            2483 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
              2483 _DPSNextEvent
                2483 BlockUntilNextEventMatchingListInMode
                  2483 ReceiveNextEventCommon
                    2483 RunCurrentEventLoopInMode
                      2483 CFRunLoopRunInMode
                        2483 CFRunLoopRunSpecific
                          2482 __CFRunLoopRun
                            2473 mach_msg
                              2473 mach_msg_trap
                            7 __CFRunLoopDoSources0
                              7 main
                                7 0x1416031c
                                  3 0x1415fc9b
                                    3 0x14068757
                                      1 0x1406b700
                                        1 0x14066a31
                                      1 0x1406bf25
                                        1 0x14062825
                                          1 0x1415180c
                                            1 0x14147702
                                              1 0x140f0227
                                      1 0x1414aa1c
                                        1 0x141499ae
                                          1 main
                                  2 0x1415faa6
                                    1 0x140518f2
                                    1 0x140518f5
                                  1 0x1415f9c2
                                    1 0x1404fa6a
                                      1 0x13f7f5f0
                                  1 0x1415fa98
                                    1 0x14112985
                                      1 0x1410f131
                            1 __CFRunLoopDoObservers
                              1 CFQSortArray
                                1 CFSortIndexes
                                  1 malloc_default_zone
                            1 mach_port_extract_member
                              1 mach_msg
                                1 mach_msg_trap
                          1 CFRunLoopRunSpecific
    2483 Thread_259087   DispatchQueue_2: com.apple.libdispatch-manager  (serial)
      2483 start_wqthread
        2483 _pthread_wqthread
          2483 _dispatch_worker_thread2
            2483 _dispatch_queue_invoke
              2483 _dispatch_mgr_invoke
                2483 kevent
    2483 Thread_259093
      2483 thread_start
        2483 _pthread_start
          2483 unregister_ShockwaveFlash
            2483 unregister_ShockwaveFlash
              2483 0x13e18d34
                2483 unregister_ShockwaveFlash
                  2483 pthread_cond_wait$UNIX2003
                    2483 _pthread_cond_wait
                      2483 __semwait_signal
    2483 Thread_259094
      2483 thread_start
        2483 _pthread_start
          2483 unregister_ShockwaveFlash
            2483 unregister_ShockwaveFlash
              2483 0x13e18d34
                2483 unregister_ShockwaveFlash
                  2483 pthread_cond_wait$UNIX2003
                    2483 _pthread_cond_wait
                      2483 __semwait_signal
    2483 Thread_259095
      2483 thread_start
        2483 _pthread_start
          2483 unregister_ShockwaveFlash
            2483 unregister_ShockwaveFlash
              2483 0x13e18d34
                2483 unregister_ShockwaveFlash
                  2483 pthread_cond_wait$UNIX2003
                    2483 _pthread_cond_wait
                      2483 __semwait_signal
    2483 Thread_259096
      2483 thread_start
        2483 _pthread_start
          2483 unregister_ShockwaveFlash
            2483 unregister_ShockwaveFlash
              2483 0x13e18d34
                2483 unregister_ShockwaveFlash
                  2483 pthread_cond_wait$UNIX2003
                    2483 _pthread_cond_wait
                      2483 __semwait_signal
    2483 Thread_259123
      2483 thread_start
        2483 _pthread_start
          2483 unregister_ShockwaveFlash
            2483 unregister_ShockwaveFlash
              2466 0x14134822
                2466 unregister_ShockwaveFlash
                  2465 pthread_cond_timedwait_relative_np
                    2465 _pthread_cond_wait
                      2459 semaphore_timedwait_signal_trap
                      5 _pthread_cond_remove
                        5 __spin_lock
                      1 _pthread_cond_wait
                  1 pthread_mutex_unlock
              17 0x141348b8
                17 unregister_ShockwaveFlash
                  17 pthread_cond_timedwait_relative_np
                    17 _pthread_cond_wait
                      17 semaphore_timedwait_signal_trap

Total number in stack (recursive counted multiple, when >=5):
        16       unregister_ShockwaveFlash
        6       _pthread_cond_wait
        5       _pthread_start
        5       thread_start

Sort by top of stack, same collapsed (when >= 5):
        __semwait_signal        9932
        kevent        2483
        semaphore_timedwait_signal_trap        2476
        mach_msg_trap        2474
        __spin_lock        5
Sample analysis of process 99569 written to file /dev/stdout
Comment 5 Jon 2011-01-28 23:17:54 PST
This is actually the same issue as bug 37507: the WebKitPluginAgent and WebKitPluginHost executables produced by locally built WebKit doesn't work correctly. Replacing them with the executables from the most recent nightly corrects the issue. I don't see where the nightly is getting these files, unless they are part of some internal only build process for the nightlies. Currently in the local build the WebKitPluginAgent in WebKit.framework is actually a link to the same executable in the system WebKit.framework, which was updated with Safari 5.0.3. No link is made for the WebKitPluginHost. Copying the executables from the system WebKit.framework results in this same issue. Copying the executables from the nightly, however, does. So what's going on here? Obviously the nightly is getting these updated versions from somewhere, so why are they not part of the repository build?
Comment 6 Alexey Proskuryakov 2011-01-29 00:16:38 PST
Yes, these are not open source. We should find a way to make open source local builds get updated binaries automatically.

*** This bug has been marked as a duplicate of bug 37507 ***
Comment 7 Jon 2011-01-29 19:09:59 PST
Seems like adding the executables should be possible, similar to how libWebKitSystemInterface is included. Then they just need to be updated when they break.