endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
816 stars 71 forks source link

Daemon CapTP EPIPE on write #2242

Open kriskowal opened 5 months ago

kriskowal commented 5 months ago

Describe the bug

Example https://github.com/endojs/endo/actions/runs/8806498315/job/24171474175

Daemon tests exercising CapTP occasionally exhibit a failure due to dangling bytes after closing a connection or EPIPE when writing a connection while shutting down. These occur most frequently for Windows CI, then Linux CI, and then rarely but occasionally in local development.

Steps to reproduce

Investigate above CI failure. The problem appears to occur due to timing during CapTP connection shutdown.

Expected behavior

Daemon should gracefully exit and should tolerate various patterns of disconnection.

Platform environment

All, with varying frequency.

Additional context

Screenshots

leotm commented 1 week ago

was about to raise an issue to investigate RE flakey CI, till spotted this ^

Example https://github.com/endojs/endo/actions/runs/8806498315/job/24171474175

Error: The log was not found. It may have been deleted based on retention settings.

was it CapTP client exception: (RemoteError(error:captp:Endo#20001)#X?

couple recent examples w logs https://github.com/endojs/endo/actions/runs/10940944568/job/30374463663 https://github.com/endojs/endo/actions/runs/10996126704/job/30528577627