Bug 127864 - Web Inspector: Deadlock hitting breakpoint while inspecting JSContext
Summary: Web Inspector: Deadlock hitting breakpoint while inspecting JSContext
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-29 16:03 PST by Joseph Pecoraro
Modified: 2014-01-29 16:56 PST (History)
7 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (1.56 KB, patch)
2014-01-29 16:09 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-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.