-
Notifications
You must be signed in to change notification settings - Fork 208
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
Improve xsnap-worker's reaction to EOF/SIGPIPE by explicit logging to stderr (#4103) #10099
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick preliminary feedback.
Dealing with streams and child processes in node is probably one of the most difficult thing to do cleanly and robustly. Let's pair at some point to try an make this test logic a little more idiomatic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @mhofman's comments as well.
Deploying agoric-sdk with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're missing a crucial test: pipe closed while trying to write a query (worker JS doing issueCommand
).
We can probably do that by having the handleCommand
in the worker do 2 issueCommand
in a row, or close the "from xsnap" stream immediately after issuing the command.
0bcce77
to
99767e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style suggestions only; I like the new tests!
Co-authored-by: Richard Gibson <[email protected]>
Co-authored-by: Richard Gibson <[email protected]>
Co-authored-by: Richard Gibson <[email protected]>
Co-authored-by: Richard Gibson <[email protected]>
Co-authored-by: Richard Gibson <[email protected]>
Co-authored-by: Richard Gibson <[email protected]>
Co-authored-by: Richard Gibson <[email protected]>
Co-authored-by: Richard Gibson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new structure of the test looks great. Once the few nits are addressed, we'll be almost ready for merging (I assume as a squash merge in this case, unless you plan on doing a local rebase to fixup commits)
Before merging this PR, we'll want to first merge agoric-labs/xsnap-pub#53, and use the outcome commit from the Agoric
branch there as the new submodule commit here (and reflected in the build.env file)
Approving assuming this is done before merging.
Co-authored-by: Mathieu Hofman <[email protected]>
closes: #4103
refs: agoric-labs/xsnap-pub PR #53
Description
This is the agoric-sdk side of the changes for xsnap-worker, containing updating the git subproject and adding new tests.
Security Considerations
New version of xsnap-worker explicitly exits and logs clear text errors to stderr when it detects an unexpected EOF or SIGPIPE condition, which does disclose some information regarding its internal state.
Scaling Considerations
Overall behavior is the same as xsnap-worker dies/exits just as before.
Documentation Considerations
none for agoric-sdk.
Testing Considerations
a new test had been added.
Upgrade Considerations
none.