GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Make --inspect and SIGUSR1 debugger attach work while recording, and replay by Andarist · Pull Request #196 · replayio/node

Conversation

@Andarist

@Andarist Andarist commented Oct 26, 2026

Copy link
Copy Markdown
Member

A debugger attached with --inspect, or by sending SIGUSR1 to a running process, crashed recordings: MainThreadInterface::Post dispatched every request synchronously when recording/replaying and CHECKed that it was on the main thread, while the inspector's IO thread posts the client's messages. With that fixed, a SIGUSR1 attach still couldn't replay, since the helper thread it wakes waits on a semaphore that nothing posts when replaying.

Changes

Requests from the IO thread take upstream's path when recording/replaying: queued, then Environment::RequestInterrupt, which V8 runs where the progress counter next advances when recording and at the same point when replaying. The locks the IO thread shares with the main thread are ordered: MainThreadInterface::requests_lock_, MainThreadHandle::block_lock_, InspectorIo::thread_start_lock_ and the request queue's locks.

Requests made on the main thread are dispatched right away, in their own queue, without those locks. Replay's own session makes some of them only when replaying, with events disallowed, so they must not touch state that recorded code reads (requests_, its lock, dispatching_message_queue_, dispatching_messages_).

The main thread interface is created eagerly in NodeInspectorClient's constructor when recording/replaying. Created lazily, it came from Agent::StartIoThread() when recording but from Replay's session when replaying, which runs with events disallowed. Its ordered locks then got no ids when replaying, and the IO thread's first lock mismatched.

SIGUSR1 wakes the inspector's helper thread through a pipe instead of the semaphore when recording/replaying. The helper's read() is recorded, so replaying wakes it at the same point, as libuv's own signal handling does. The thread stops if the pipe fails. start_io_thread_async_mutex is now ordered and constructed on first use, since a static constructed before the recorder attached couldn't be marked ordered.

When not recording/replaying, behaviour matches upstream. The only added cost is a function-local static guard on a rarely taken lock.

Testing

All runs used the master driver, recording without progress asserts as production does. The backend cases are on replayio/backend branch andarist/node-inspect-api-interrupts.

  • node-recording v8/api-interrupts-from-inspect: debugger attached via SIGUSR1 while idle; two DevTools commands during a WebAssembly spin run inside it, one while idle runs outside it. Before this branch the replay hangs; with it, it passes.
  • node-recording process/inspector-attach-while-busy: debugger attached via SIGUSR1 while JavaScript spins; its command stops the loop at an iteration the replay reproduces. Before this branch the replay hangs; with it, it passes.
  • Both cases also pass with the client enabling Debugger, with no recording warnings.
  • node-recording gc, child-process, process, console, evaluate, worker-threads, v8 and functions: 32/32 pass.
  • node-core inspector tests: 49/49 pass. test-inspector-has-idle aborts while recording without this branch too, so it was skipped.

Known limits

  • Worker inspection stays unsupported while recording. The main-thread fast path assumes it.
  • Not shown: whether any Replay evaluation that runs before the replay diverges can send notifications to a connected --inspect client's session. The harness's evaluations run in pauses, after divergence.
  • One exit-time SIGSEGV, while the harness closed the WebSocket during program exit, was seen on an older build of this branch: 1 in about 13 recordings, with no stack. It hasn't been reproduced since.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Andarist added 7 commits October 26, 2026 16:52
@Andarist
Deliver --inspect messages to the main thread when recording or repla…
f1f4261
…ying

A client connected with --inspect crashed a recording: when recording or
replaying, MainThreadInterface::Post dispatched every request synchronously
and CHECKed that it was on the main thread, while the inspector's IO thread
posts the client's messages. The branch predates V8 API interrupts being
recorded at progress points (#173), which upstream's path relies on.

Requests from other threads now take upstream's path: queued, then
Environment::RequestInterrupt, which V8 runs where the progress counter next
advances when recording and at the same point when replaying. The locks the IO
thread shares with the main thread (MainThreadInterface's requests_lock_,
MainThreadHandle's block_lock_, InspectorIo's thread_start_lock_ and its
request queue's locks) are ordered, as Blink's InspectorTaskRunner lock is;
unordered, the IO thread ran ahead when replaying and whether a post found the
queue empty (and so requested an interrupt) differed from the recording.

Main-thread requests still dispatch right away, without requests_ or either
lock: Replay's own session makes them with events disallowed, where locks
aren't taken in the recorded order, and while the IO thread held block_lock_
waiting for its ordered turn on requests_lock_, the main thread blocked on
block_lock_ inside that session and the replay hung.

backend's node-recording case v8/api-interrupts-from-inspect (a child process
sends Runtime.evaluate over the inspector's WebSocket while the program spins
in WebAssembly, and once it is idle) crashed the recording before; it now
records and replays, 10 of 10 runs, while ordering only some of the locks
replayed 1 of 5. node-recording v8/api-interrupts-at-progress, evaluate,
worker-threads, child-process and console pass, and node-core's 50 inspector
tests give the same results as before (49 pass, test-inspector-has-idle
crashes on both).
@Andarist
Create the inspector's main thread interface eagerly when recording o…
44ff82f
…r replaying

Its locks are ordered, so they must be created at the same point when
recording and replaying. Created lazily, the interface came from whichever
caller asked first: when the inspector started at a later SIGUSR1, that was
Agent::StartIoThread when recording, but Replay's own session when replaying,
which only connects then and does so with events disallowed. Its locks then
got no ordered lock id when replaying, and the IO thread's first lock
mismatched.
@Andarist
Name StartIoThread in the eager main thread interface comment
c55b74c
@Andarist
Wake the SIGUSR1 inspector thread through a pipe when recording or re…
0471dde
…playing

Node's SIGUSR1 handler posts a semaphore that a helper thread waits on before
starting the inspector. Signals aren't delivered when replaying and the
semaphore isn't recorded, so the helper never woke and the replay hung. When
recording or replaying, the handler now writes to a pipe the helper reads: the
read is recorded, so replaying wakes the helper at the same point, as libuv's
own signal handling does.

The mutex protecting the Agent the helper reads is ordered, and constructed on
first use so that recording or replaying has started when it is marked.
@Andarist
Stop the SIGUSR1 inspector thread when its pipe fails
22b4430
A read error other than EINTR, or end of file, means the pipe was closed under
the thread, e.g. by an application closing every descriptor: retrying would
spin, and could read from whatever later reuses the descriptor.
@Andarist
Queue main-thread inspector requests apart from the IO thread's when …
1733f98
…recording or replaying

Main-thread requests shared the queue and reentrancy flag DispatchMessages
and WaitForFrontendEvent use for the IO thread's requests. Replay's own
session makes main-thread requests only when replaying, so one made while
those were dispatching left that state different from the recording's:
WaitForFrontendEvent could skip its ordered wait on requests_lock_, and a
later main-thread request could dispatch the IO thread's requests with
events disallowed.
@Andarist
Say that Replay's session makes some main-thread inspector requests, …
7231aff
…not all
@Andarist
Andarist merged commit 38a8315 into master Oct 26, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Andarist
Andarist deleted the andarist/inspect-while-recording branch October 26, 2026 19:52
bhackett1024 added a commit that referenced this pull request Nov 5, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
8880478
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
933a684
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
6c2464d
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
280f5e4
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
7443671
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
bda5404
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
5f9d38c
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
0126597
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
873165e
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
53f44c6
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
a7bcb32
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
fc91558
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
ce37204
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
7c1f9d3
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
ad3c411
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
5d2ab89
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
779bf70
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
be0dfe3
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
2ba8715
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
655c103
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
da3d031
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
abe6a89
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
9a03c78
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
ceec498
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
4ce3769
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
977c1c0
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
aa14e2a
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 11, 2026
@bhackett1024 @Andarist
Patch Node.js inspector for recording
b538d7e
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 11, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
b49281d
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 11, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
709d5b5
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 12, 2026
@bhackett1024 @Andarist
@Domiii @claude
Patch Node.js inspector for recording
7421593
Deliver inspector requests at points the replay reproduces. Requests
from the IO thread are queued and dispatched from V8's interrupt, which
runs where the progress counter next advances, while requests the main
thread makes keep a queue of their own and are dispatched right away:
Replay's own session makes those with events disallowed, where locks are
not taken in the recorded order, so going through the shared queue
deadlocked the replay. Order every lock the IO thread shares with the
main thread, as Blink orders its InspectorTaskRunner lock, so both sides
see the same hand-offs; unordered, whether a post found the queue empty,
and so requested an interrupt, differed from the recording.

Worker inspector start and finish notifications and
worker-to-main-thread connections are refused while recording or
replaying, and toDouble uses strtod because istringstream misbehaves
when replaying.

The inspector's start signal is waited for where the pipe is created in node
24, which moved the wait: waiting at the old point let the recording continue
before the inspector thread was listening.

Replay's own session connects even when the environment has no inspector
client: with the permission model, --test or --watch the main environment
never creates one, so Agent::Connect handed back a null session and the first
CDP dispatch crashed. Agent::RecordReplayConnect creates the client for
Replay's session alone, and the user's inspector entry points keep refusing as
they do without recording.

Rebase note: every lock the inspector shares between the IO thread and
the main thread must be ordered, and no request from another thread may
be dispatched where it arrives. Keep the main thread's own requests out
of the shared queue and its locks.

Includes later changes from #132 and #196.

Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Domi <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Andarist
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.