-
Notifications
You must be signed in to change notification settings - Fork 303
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
π Bug Report β workerd
sometimes doesn't send Debugger.scriptParsed
events
#1201
Comments
workerd
sometimes doesn't send with Debugger.scriptParsed
eventsworkerd
sometimes doesn't with Debugger.scriptParsed
events
workerd
sometimes doesn't with Debugger.scriptParsed
eventsworkerd
sometimes doesn't send Debugger.scriptParsed
events
I can repro this with-or-without the change in the initial execution context id that workerd added to v8. The repro is fairly easy: launch I also came across a Smi initialization exception with the initial execution context id randomization. This is an easy to fix we should make, but not relevant to the problem at hand. |
After adding instrumentation, it looks like the embedded V8 is creating the messages, they are getting queued and sent onwards by the inspector I/O thread. The messages are sent from
Running wireshark and filtering on websocket traffic, it looks like workerd is sending the same initial messages and getting responses back for them, but devtools is not showing the early messages in the protocol debugger. TBC. |
Bisecting, looking for an LKG:
The script seems to be too fast, just as a sanity check tried 772bf8d with the script and with Chrome's devtools. Issue appears to be reproing with cdt, but not the script. From WireShark experiments yesterday, it looks like the CDP messages are being sent, but the first few are not always picked up by the protocol inspector. * fails to build macOS, possibly due to xcode build tools update. Switched to linux i9-13900. |
Take 2, just linux and Chrome
|
This change adds a 300ms pause before workerd starts sending out messages when a CDP client attaches. Some clients seem to lose track of the first few messages if they are sent right away. Bug: #1201 Test: manual
Adding a pause before sending messages appears to enable Chrome to render the CDP messages it receives in the protocol view window. tcpdump shows those same messages arriving and being responded to if there is no delay, but the UX does not render it. There might a better fix available, TBD. |
This change adds a 300ms pause before workerd starts sending out messages when a CDP client attaches. Some clients seem to lose track of the first few messages if they are sent right away. Bug: #1201 Test: manual
Overall, it'd be good to have another fix here, but this issue seems to be pressing this week. On both the local M1 MBP and a x64 Linux box, 250ms seems to eliminate any issues when testing The initial messages from the client are |
This change adds a 300ms pause before workerd starts sending out messages when a CDP client attaches. Some clients seem to lose track of the first few messages if they are sent right away. Bug: #1201 Test: manual
Looking at the CDP, it looks like the initial messages are generated appropriately.
In wrangler-devtools, It looks like I'm not seeing any similar gating for |
Reset on this issue. With an Repro steps:
Observations:
Follow-on:
Interesting. |
π‘Forcing the smi issue fixed in #1217 with an opt build and this issue appears to repro 100% at
|
@ohodson am I inferring correctly that: [1] this bug was caused by the RNG of executionContextId (but we're not just not clear why), and I'm sure what I've inferred is probably wrong but I'm just seeking clarity on whether we're happy to release workerd in it's current state or what the latest build we're comfortable releasing is |
Just to follow up:
|
Hey! π When enabling the inspector with the hello world ESM sample,
workerd
can start up in an invalid state where it never responds toDebugger.enable
commands withDebugger.scriptParsed
events.Using the following script and
[email protected]
or[email protected]
...You may need to re-run
npx workerd@... serve
to get it into an invalid state. I haven't been able to reproduce this with[email protected]
. Also note the garbage in the inspector detach logs[(οΏ½οΏ½]
.I haven't been able to narrow this down to a particular change yet as my local
workerd
builds are currently broken because of an automatic Xcode update. I'm also going OOO for the next 7 days.The text was updated successfully, but these errors were encountered: