Skip to content

Conversation

tetsuo-cpp
Copy link
Contributor

Closes #96

Signed-off-by: Alex Cameron <asc@tetsuo.sh>
Signed-off-by: Alex Cameron <asc@tetsuo.sh>
@tetsuo-cpp
Copy link
Contributor Author

tetsuo-cpp commented May 31, 2022

The issue is that sometimes the browser requests /favicon.ico after we handle the auth response. That code path doesn't seem to mutate the auth response but it does modify other fields in the server object as the main thread is reading the auth response. It's not 100% clear to me why that causes the auth response to get corrupted since I would have thought that the GIL prevents a torn write.

# If the auth response has already been populated, the main thread will be stopping this
# thread and accessing the auth response shortly so we should stop servicing any requests.
if not server.active:
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return None here and below? I'm surprised our linting tools don't enforce this...

@woodruffw
Copy link
Member

Nice debugging! Yeah, that's an interesting error case. I believe the GIL unfortunately does not prevent write tearing -- it really only protects the integrity of the interpreter itself 😞

di
di previously approved these changes May 31, 2022
Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw woodruffw merged commit 2666db1 into main May 31, 2022
@woodruffw woodruffw deleted the alex/oidc-race branch May 31, 2022 17:05
javanlacerda pushed a commit to javanlacerda/sigstore-python that referenced this pull request Feb 23, 2024
* Make it easier to run verification test locally

For sigstore#99

If you're only testing verification use-cases locally, you don't need
the OIDC JWT.

Signed-off-by: Zach Steindler <steiza@github.com>

* Nicer error message for not providing arguments

```
sigstore-conformance$ pytest test --entrypoint /Users/steiza/code/steiza/sigstore-conformance/sigstore-python-conformance
Please specify one of '--github-token' or '--skip-signing'
sigstore-conformance$ echo $?
3
```

Signed-off-by: Zach Steindler <steiza@github.com>

---------

Signed-off-by: Zach Steindler <steiza@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OAuth flow: intermittent 400 errors
3 participants