Skip to content
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

distant action --interactive pegging to 100% CPU #8

Closed
chipsenkbeil opened this issue Aug 2, 2021 · 3 comments
Closed

distant action --interactive pegging to 100% CPU #8

chipsenkbeil opened this issue Aug 2, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@chipsenkbeil
Copy link
Owner

Maybe this has to do with the stdin loop since we aren't using async per tokio's recommendation. Need to see if that's the case and if adding a yield and/or sleep of some sort will help.

@chipsenkbeil chipsenkbeil added the bug Something isn't working label Aug 2, 2021
@chipsenkbeil
Copy link
Owner Author

See rust-lang/rust#46774 . Looking back, I'm not using thread::yield_now or thread::sleep in the loop as I just let it block on reading stdin. Would make sense to add some delay there. Still don't know if that's the cause, though.

@chipsenkbeil
Copy link
Owner Author

Resolved by de69b41

Turns out this was only happening when the stdin stream for action had closed as the loop was not checking for EOF on the stream, meaning that it went into an endless loop with no break inbetween checks that finished immediately. We now properly kill the stdin thread once it reaches EOF as well as issue std::thread::yield_now() between successful calls.

@chipsenkbeil chipsenkbeil added this to the 1.0 milestone Aug 15, 2021
@chipsenkbeil chipsenkbeil modified the milestones: 1.0, 0.17 and earlier Aug 18, 2022
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant