-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Github actions forces stdin through a fifo #10959
Comments
Hi @tymscar We have observed the issue. The command
Thanks. |
Yes, that fixes the ripgrep example, but not the overall issue. Why is there an open fifo? |
Hi @tymscar , Will into in it and provide our inputs, thanks |
Thank you! |
Hi @tymscar
I used the above logic and it worked for me |
Indeed, @vidyasagarnimmagaddi, I am aware of this. You had previously mentioned this in your previous comment, but addressing only the symptom does not resolve the underlying issue. The reason the heuristics fail is because there is a persistently open FIFO on GitHub Actions that should not exist, as far as my understanding goes. The reason for its presence remains unclear, and this is the critical aspect that requires further investigation. |
Hi @tymscar , Will redo my analysis and revert you back .Thanks |
Description
When using GitHub actions, there is an ever-present fifo on stdin for the programs running there, and sometimes, that makes those programs misbehave because their heuristic tells them to use the empty fifo instead of the files in the current working directory.
Platforms affected
Runner images affected
Image version and build link
I have recreated the simplest example of the bug happening, and you can see it in action here: https://github.com/tymscar/github-actions-test/actions/runs/11797546880/job/32861766821
The main line that is relevant to the discussion is on that page, part of the debug output of rg:
rg: DEBUG|grep_cli|crates/cli/src/lib.rs:209: for heuristic stdin detection on Unix, found that is_file=false, is_fifo=true and is_socket=false, and thus concluded that is_stdin_readable=true
This has been reported to ripgrep too, and it was suggested that it's a GHA problem, after which I tried to replicate it as lean as possible.
Is it regression?
no
Expected behavior
When running a binary such as
rg "hello"
in GitHub Actions, I expect it to search for the string in the local files.Actual behavior
In actuality, there is an ever-present empty fifo that tricks the heuristic of ripgrep (and other binaries) into thinking it should look at stdin instead of the default behavior.
Repro steps
Run any binary that has a heuristic about when to use stdin vs local files, such as ripgrep, and if it's not told explicitly to search for local files, it will default to the empty fifo. The best example is ripgrep, because when run with debug like
rg --debug "hello"
it will print that it found an open fifo on stdin from GitHub Actions. Locally on another machine, or in a vm, there is no present fifo, just in GHA.The text was updated successfully, but these errors were encountered: