endojs / endo

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

usable traces across workers #1879

Open dckc opened 11 months ago

dckc commented 11 months ago

What is the Problem Being Solved?

With the endo daemon coordinating several workers, errors usually result in unhelpful stack traces that basically say "I got an Error over CapTP":

$ endo make src/hdWallet.js -n w1
CapTP cli exception: (RemoteSyntaxError(error:captp:Endo#20001)#1)
RemoteSyntaxError(error:captp:Endo#20001)#1: Possible direct eval expression rejected at <unknown>:12. (SES_EVAL_REJECTED)

  at decodeErrorCommon (packages/marshal/src/marshal.js:281:28)
  at decodeErrorFromCapData (packages/marshal/src/marshal.js:297:14)
  at decodeFromCapData (packages/marshal/src/encodeToCapData.js:404:27)
  at fromCapData (packages/marshal/src/marshal.js:359:23)
  at CTP_RETURN (packages/captp/src/captp.js:697:24)
  at dispatch (packages/captp/src/captp.js:776:7)
  at packages/daemon/src/connection.js:34:7

Description of the Design

@kriskowal suggests a causal trace aggregator

See also:

Security Considerations

censoring the right parts of the stack is tricky, I expect; moreso across workers

Scaling Considerations

ISTR some scaling issues around "track turns".

Test Plan

???

Upgrade Considerations

I'm using the endo cli / daemon on the endo branch.

kriskowal commented 10 months ago

See https://github.com/endojs/endo/issues/529 for issue in general.