-
Notifications
You must be signed in to change notification settings - Fork 78
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
Attemp to resolve deadlock in blocking fifo open #346
Conversation
c0b9fe1
to
03899ce
Compare
The pipe-specific version is generally better when you know you're dealing with a Unix pipe, as it's more semantically correct and handles pipe-specific behaviors more robustly. You'd typically use this when building applications that need to interact with other processes through pipes or when dealing with stdin/stdout in an async context. Nicely done! |
I have discovered this issue, but there is still no good way to avoid this deadlock. The submission is non blocking and cannot meet the requirements. If you have any ideas to avoid it from the kernel layer or user mode, thank you very much. |
Your |
Thanks , but this resolution still in progress, please continue to follow https://users.rust-lang.org/t/fifos-problem-in-rust-if-it-should-be-kernels-problem/121779 btw , I also create a discussion about containerd 's fifo containerd/containerd#11074 |
True, this is a deeper architectural issue with containerd's FIFO handling |
Now I want to solve the problem of concurrency caused by Fifo in Blocking mode. So if you have any ideas, thank you very much. |
The sequence that can cause deadlock:
But this doesn't always happen because the timing is critical. It depends on the exact order of:
Possible solutions are:
|
That's my problems
btw,how about sharing viewpoints in the Rust community so that more people can participate? |
03899ce
to
c974b37
Compare
If long time no read side , may cause shim lock. Avoid fifo open deadlock,use a easy timeout Signed-off-by: jokemanfire <[email protected]>
c974b37
to
d5100e6
Compare
avoid fifo open deadlock
refs:https://users.rust-lang.org/t/fifos-problem-in-rust-if-it-should-be-kernels-problem/121779
If read side is not open , the write side will be blocking forever, though the fifo file has been deleted.