~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A crash run once found an OAuth access token refused after a kill (seed 24)

Open
Open chadtmiller.com opened this issue 0 comments

node compare.mjs --steps 400 --seed 24 --crash-every 15 --firehose failed once in the gates workflow, on a pull that touches neither OAuth nor sessions (at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/spec-pds/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.pull/3n235dxzxoxd2, at 6cbbdb1), while the store-bench workflow ran on the same runner. Three runs of the same command on a Mac passed.

step 128 (seed 24): OAuth: scopes: uploadBlob ("image/png\t; q=1"), with blob:image/* differs
reference: 200
server: { "status": 401, "error": "invalid_token" }

The server's log at the failure was empty: it had just been started again.

What may be wrong

Not established. oauth::check_access answers invalid_token when the session's current access token is not the one sent (s.access == jti), among other things. The harness keeps an OAuth session's tokens across steps and replaces them when a refresh answers. If the kill landed while a refresh was on its way, and the server had made the refresh durable but the harness never got its answer, the harness goes on with tokens the server has replaced: the next use is invalid_token on the server and 200 on the reference, which was not killed. That would be the check's: a refresh on its way at a kill may have landed, as a write may.

If instead the server lost a session it had answered for, that is the server's, and serious. What would tell them apart: the check logging, at a kill, whether a token request was on its way, and on invalid_token after a start trying the refresh token it holds.