Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[bug] slsa-framework/slsa-github-generator deadlocks if builder outputs a lot of data over stdio #3571

Closed
jul-sh opened this issue Apr 16, 2024 · 1 comment · Fixed by #3570
Labels
status:triage Issue that has not been triaged type:bug Something isn't working

Comments

@jul-sh
Copy link
Contributor

jul-sh commented Apr 16, 2024

Describe the bug
The slsa-framework/slsa-github-generator deadlocks if builder outputs a lot of data over both stdout and stderr. The reason is that the current implementation reads from stdout and stderr sequentially, which is a known cause of deadlocks: golang/go#16787.

Because of #3569, it also does not print any logs in the process, the action just times out.

To Reproduce
Steps to reproduce the behavior:

  1. Run the action in try provenance gen against slsa-framework/ action project-oak/oak#5018, which happens to produce a lot of output over stdio.

I'll create a simpler reproduction upon request. But the bug should be fairly obvious when looking at internal/builders/docker/pkg/builder.go and golang/go#16787.

Expected behavior
No deadlock.

cc @tiziano88 @jblebrun

@jul-sh jul-sh added status:triage Issue that has not been triaged type:bug Something isn't working labels Apr 16, 2024
laurentsimon pushed a commit that referenced this issue Apr 17, 2024
# Summary

Fixes #3571. Fixes #3569. Shoutout to @jblebrun who wrote most of the
code in this PR and debugged this issue together with me.


## Testing Process

...

## Checklist

- [ ] Review the contributing [guidelines](./../CONTRIBUTING.md)
- [ ] Add a reference to related issues in the PR description.
- [ ] Update documentation if applicable.
- [ ] Add unit tests if applicable.
- [ ] Add changes to the [CHANGELOG](./../CHANGELOG.md) if applicable.

Signed-off-by: Juliette Pretot <julsh@google.com>
Co-authored-by: Jason LeBrun <jibbl@google.com>
@jul-sh
Copy link
Contributor Author

jul-sh commented Apr 18, 2024

Pre release now available, ref: #3570 (comment)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
status:triage Issue that has not been triaged type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant