-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
comm::peek hangs #2841
Comments
This seems to be even more serious than I thought: I rewrote my code to use select2 instead of peek and now the select2 is hanging... |
Was able to work around this using task::spawn_sched:
|
I suspect the call to Also, |
I don't think this behavior can be pinned on unistd::sleep (exclusively). Yesterday I saw the same symptom (task not starting up) and worked around it the same way (task::spawn_sched instead of task::spawn). There was a lot of code involved and a lot of tasks running around, but my code at least didn't call sleep. (The code above was from some sample code of mine which used sleep in a rather unrealistic manner to keep the sample simple. My real code is where I saw this new task hang). |
Found another place where tasks launched with spawn just hang: the test_server_client unit test in https://github.com/jdm/rust-socket on "Linux shell 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux". Worked around again with spawn_sched. Note that those unit tests did work on my Mac which is where I do 99% of my rust work. |
Adding task::yield to comm::peek fixes the original case. I'm not sure about the select2 case. See pull request #2947. |
The select2 case works for me. As a side note, I think there should be library sleep function that calls task::yield. |
Nice work, @tedhorst. We don't currently insert yield checks on loop backedges like we should (#524), which means to loop around sleep and peek never yields. Adding a call to |
This was fixed by #2947. |
compiletest: complain about unknown flags This would have avoided rust-lang#110102
We have two different ways today of building release bundles, one in `kani.yml` and another one in `release.yml`, and only the `kani.yml` actually run tests. This is error prone, since the release workflow only runs during a release without validation tests, and the build can diverge from what's being tested in CI. Instead, we will always run the same workflow, except for the steps that create the release. Resolves rust-lang#2703 Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
Was able to get comm::peek to hang with 8+ tasks. This was on Mac 10.7.4 using a rust pulled on July 8, 2012.
Here is a test case:
The text was updated successfully, but these errors were encountered: