DescriptionFix deadlock that can occur while handling service messages at a breakpoint.
Deadlock looks like:
Regular Isolate
-> paused at breakpoint in debug message loop
-> holds debug message queue lock to get message notifications
-> handles an service message
-> waits for portmap lock to send response
Service Isolate
-> receives request for paused isolate
-> holds portmap lock to send message
-> runs custom message notifier to wake debug message loop
-> waits for debug message queue lock
I've solved this by releasing the debug message queue lock while
handling service messages. This requires me to poll for new service
messages after reacquiring the debug message queue lock to make sure I
haven't dropped any notifications.
It's a little weird that the embedder (runtime/bin) needs to be aware
of the locking in the core vm (runtime/vm), but this seemed like the
simplest fix for now.
BUG=
R=johnmccutchan@google.com
Committed: https://code.google.com/p/dart/source/detail?r=41326
Patch Set 1 #
Total comments: 1
Patch Set 2 : #Patch Set 3 : #
Messages
Total messages: 5 (1 generated)
|