Open Bug 1617099 Opened 6 years ago Updated 4 years ago

[jsdbg2] The Debugger's nested job queue creates some truly weird execution ordering sometimes

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: loganfsmyth, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

I don't really know what to do for all of this, but I feel like it's worth keeping in mind. The debugger uses a nested event loop in general when pausing, but separately the C++ Debugger API also uses a nested task queue for tracking what to run next. (AutoDebuggerJobQueueInterruption)

We implemented this to try to handle R2C issues when we are paused and don't want the nested event loop to resolve debuggee promises if they had been queued but not executed yet when we paused.

This works well for preventing already-queued entries from running while we pause, but it can have very weird effects when we do something inside of a debugger hook (or a task queued by the debugger hook) that may cause the debuggee to queue a task, because it will be queued in the new nested queue, and evaluate, instead of queueing in the original outer queue.

This can lead to super subtle and hard to debug DebuggeeWouldRun exceptions.

The priority flag is not set for this bug.
:jlast, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jlaster)
Severity: normal → S3
Flags: needinfo?(jlaster)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: