Bug 127864

Summary: Web Inspector: Deadlock hitting breakpoint while inspecting JSContext
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ggaren, graouts, joepeck, mark.lam, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2014-01-29 16:03:09 PST
* SUMMARY
Deadlock hitting breakpoint while inspecting a JSContext application.

  -> MainThread
    -> processing UI event (click a button)
      -> runs JSContext evaluateScript
        -> takes API lock
          -> hit breakpoint
            -> in nested run loop (idle)

  -> RWI Dispatch Queue
    -> receives incoming debugger command
      -> determines the global object
        -> APIEntry shim attempting to perform the command (locked)

We never continue, because we're waiting for a debugger command, and the debugger command is stuck.

The main thread needs to drop the JSLock (API lock) before running the nested event loop.
Comment 1 Radar WebKit Bug Importer 2014-01-29 16:03:42 PST
<rdar://problem/15941747>
Comment 2 Joseph Pecoraro 2014-01-29 16:09:30 PST
Created attachment 222604 [details]
[PATCH] Proposed Fix
Comment 3 Geoffrey Garen 2014-01-29 16:24:46 PST
Comment on attachment 222604 [details]
[PATCH] Proposed Fix

r=me
Comment 4 WebKit Commit Bot 2014-01-29 16:56:34 PST
Comment on attachment 222604 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 222604

Committed r163051: <http://trac.webkit.org/changeset/163051>
Comment 5 WebKit Commit Bot 2014-01-29 16:56:36 PST
All reviewed patches have been landed.  Closing bug.