-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat(inspector): runtime inspector activation via SIGUSR1 + CDP pause during busy execution #26867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alii
wants to merge
134
commits into
main
Choose a base branch
from
ali/inspector-cdp-pause
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 123 commits
Commits
Show all changes
134 commits
Select commit
Hold shift + click to select a range
95c987d
Initial work on supporting SIGUSR1
alii a95584f
[autofix.ci] apply automated fixes
autofix-ci[bot] 11e1a10
signal safe handler, some other review notes
alii b98e7c1
be clear about idempotency
alii 56cddb6
a cheap shot at windows
alii f265f74
consolidate windows/posix inspector logic with a new struct "RuntimeI…
alii 5696810
get it to compile
alii a86b965
implement process._debugProcess
alii a029cd1
split up runtime inspector tests
alii ee6a1e8
add --disable-sigusr1
alii ffb5939
fix --disable-sigusr1 test for CI
alii 6ba5e75
fix ban-words: use bun.strings.toWPath and proper struct defaults
alii 4cf5cbe
rm semaphore
alii 329060d
cleaner
alii 3af7ecf
Add tests for SIGUSR1 handling with --inspect-* flags
602be37
fix(test): replace timing-based waits with condition-based waits in S…
alii c424d98
fix(test): replace timing-based waits with condition-based waits in W…
alii 2715260
fix(test): replace timing-based waits with condition-based waits in r…
alii e0b75ef
docs: document inspector port limitation in RuntimeInspector
alii e0a7775
test: assert exit codes for debug helper processes in runtime-inspect…
alii 0f7a461
test: improve exit code assertion clarity using toBeOneOf
alii 40999fc
Add comment documenting alignment assumption for MapViewOfFile
alii a13ee96
refactor: extract configureSigusr1Handler helper function
alii a946a48
Address PR review comments for runtime inspector
alii 852f09c
fix(test): update Windows _debugProcess test to match Bun's error mes…
alii 199fdf4
fix: match Node.js error message for _debugProcess on Windows
alii c279d12
Skip failing test on Windows for now
Jarred-Sumner ebe173b
update test expectations, dont print tiwce
alii 48919f8
fix review comments
alii b080418
use a semaphore and properly inject jsc trap
alii e50bfa9
do a best effort uninstall case
alii d6f1b2b
[autofix.ci] apply automated fixes
autofix-ci[bot] cb69a68
use VMManager StopTheWorld to interrupt infinite loops for SIGUSR1 i…
alii 8a7621d
use new WebKit version
alii 1e580b3
Upgrade WebKit to d5bd162d9ab2
Jarred-Sumner 8d1f383
Update WebKit to preview-pr-135-a6fa914b
sosukesuzuki 5ef60b9
Update WEBKIT_VERSION
sosukesuzuki bb99959
Fix InternalPromise exposure in ReadableStream builtins
sosukesuzuki 47966b4
address coderabbit & DRYify some code that claude wrote twice
alii cdb3fb8
address review
alii f497802
fix a case where we'd have a stale jsc trap for a second `kill -USR1 …
alii b6c06ac
fix race where a second SIGUSR1 leaves stale trap
alii ab13f51
fix: clean up semaphore if thread spawn fails
eafbccf
test: check stderr before exit code for better error messages
b8d1a00
docs: add comment explaining QueuedTask payload parameter
1d66d98
test: await stderr before checking exit code in runtime-inspector tests
1a83c78
test: await debug2 stderr before checking exit code
494e953
Remove comment
cb867e6
Revert ReadableStreamInternals.ts changes
7d16d69
Revert Request.zig import reordering
a7d0bc7
[autofix.ci] apply automated fixes
autofix-ci[bot] 7a2e020
Skip flaky SIGUSR1 inspector tests on ASAN builds
6268d2d
Address CodeRabbit review comments
44b1f6e
Fix runtime inspector tests: timing and stream reader issues
ea65b4d
Fix runtime inspector tests to wait for conditions, not time
67cb732
fix(sigusr1): handle EINTR in sem_wait and skip ASAN for flaky tests
0058494
fix: address review comments
0ec2ddc
fix: skip ASAN for flaky inspector test and add timeout handling
b4ddbb9
fix: improve ASAN detection to check ASAN_OPTIONS env var
8760775
WIP: inspector CDP delivery during busy JS execution
alii 1874029
fix: address review comments - guard redundant STW requests, add boot…
alii 27cfdf7
fix: only use requestStopAll for message delivery when debugger was p…
alii 805f60d
fix: only use STW in connect() for runtime-activated inspector (SIGUSR1)
alii 23d1b29
fix: remove usePollingTraps to avoid DFG optimization regressions
alii 0715298
fix: address review - make preAttachedDebugger atomic, document STW t…
alii a8d091a
fix(test): improve runtime inspector test reliability to reduce CI fl…
alii 81774c2
fix: address coderabbit review - clarify pre-attach guard, fix hardco…
alii d2bae0f
fix: deduplicate pre-attach comment in doConnect
alii aaeeac7
fix(test): remove all setTimeout from inspector test fixtures
alii fe42228
revert: undo changes to test/harness.ts
alii 0c7caba
fix: guard pre-attach debugger with runtimeInspectorActivated to fix …
alii bd58f59
fix: replace preAttachedDebugger with runtimeInspectorActivated, add …
alii a3ab552
fix(test): remove explicit test timeout per test/CLAUDE.md guidelines
alii 4e8d24f
fix: use WebKit preview build with breakProgram() for reliable while(…
alii 7f940bb
fix the race + some pr review
alii 49a423c
simplify the atomics a bunch
alii a2fdd29
cleanup debugger file and tests
alii 89b84f6
make runtime-inspector less flaky
alii 6c79c52
[autofix.ci] apply automated fixes
autofix-ci[bot] afa9bac
revert: use original WebKit version (breakProgram causes test failures)
alii b46e0bf
revert: restore preview WebKit with breakProgram() (reverts accidenta…
alii 71209a4
try to find a default port with runtime inspector in tests?
alii ef8fbef
some fixes
alii 201364e
set JSC::Options::usePollingTraps() = true; when the inspector starts…
alii 7dd895e
update WebKit to autobuild-preview-pr-161-c7bcfafe (ali/stw3)
alii c4f121c
address review comments: fix inspect_port ordering, improve error mes…
alii d135e6a
fix inspect_port in initBake/second init, reorder exit code assertion…
alii 79eb65d
update WebKit to autobuild-preview-pr-161-aa4d1424 (fix heap walk cra…
alii dbb0501
fix: cancel VM stop in event loop activation path to prevent residual…
alii 7a313b5
remove accidentally committed printer.js
alii aa33303
try defer to fix a crash
alii 187d912
fix: set usePollingTraps in event loop activation path to stop Signal…
alii 48fa965
cleanup: use Bun__setRuntimeInspectorActivated in STW path too
alii 72a9b11
fix declare
alii 656d3cc
refactor(inspector): clean up BunDebugger.cpp naming and duplication
alii c0eb21d
update WebKit to autobuild-preview-pr-161-d796f228 (fix SignalSender …
alii f7bcbd2
fix: use --inspect-port=0 in posix SIGUSR1 tests to avoid port conflicts
alii 5931ff1
bisect: WebKit with VMTraps.cpp reverted to PR 159 (test if Debugger.…
alii 19547de
fix: remove write to frozen JSC::Options::usePollingTraps (segfault o…
alii 02c2a71
fix: safely write usePollingTraps by temporarily unprotecting frozen …
alii f6bbb60
this is definitely wrong
alii 91aedcb
update WebKit to autobuild-preview-pr-161-211cf848 (restore CDP drain…
alii e54ebe3
update WebKit to autobuild-preview-pr-161-0596ebdb (fix agent teardow…
alii 9df9e22
fix: drain CDP messages after doConnect to prevent message loss on re…
alii 3691c80
try fix race
alii 253be47
fix: restore connected for isBootstrap check
alii ef25e1d
[autofix.ci] apply automated fixes
autofix-ci[bot] 7805244
bump webkit
alii 9aa0c7b
fix webkit upgrade
alii 767039e
Try this
alii 6b60282
Revert "fix webkit upgrade"
alii e8df6ad
bump webkit pr
alii b87b8e8
Update WEBKIT_VERSION in TypeScript build system
claude 09ecaa9
Fix deadlock in CDP message drain and macOS semaphore spurious wake
claude 3c18e8e
Fix undeclared identifiers in QueuedTask constructor calls
claude a8260a1
Remove undeclared 'function' from QueuedTask in ZigGlobalObject.cpp
claude b100601
Fix baseline CI builds by falling back to non-baseline WebKit
claude ff2e6dd
Skip baseline suffix for preview WebKit builds in TS build system
claude f4b79f9
Address review feedback: REPL options, inspector error recovery, test…
claude aa63081
Fix error recovery in debugger activation and CDP message ordering
claude 226d2f7
Avoid deadlock in runWhilePaused by calling doConnect directly
claude b1677c6
Revert WebKit version to main: preview build lacks baseline artifacts
claude b8a7759
Restore 4-param computeLineColumnWithSourcemap signature
claude 975bcb5
Replace isPauseAtNextOpportunitySet with isStepping
claude 87d0f21
Validate pid > 0 in process._debugProcess
claude ddca4f4
Fix inspector test timeouts, stderr drain, and connect() deadlock guard
claude 79f1d31
[autofix.ci] apply automated fixes
autofix-ci[bot] 0aa0eb7
ci: retrigger build
claude fcad54c
ci: retrigger build
claude 608c32a
Fix recursive runWhilePaused deadlock and stuck inspector_activation_…
claude 7efaa5c
Add strspn to Windows baseline allowlist
claude 600f572
Fix CDP pause for tight loops and add isASAN skip guards
claude 99a6aa3
Skip CDP pause test that requires WebKit VMTraps changes
claude 44c21a5
Merge branch 'main' into ali/inspector-cdp-pause
alii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.