-
Notifications
You must be signed in to change notification settings - Fork 681
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
AIOs that fail to enqueue should not be marked as in_progress
#714
Comments
Good find. I'll fix it. |
In that case, do the panic from within a function that has a name that explains why the panic happens, like the warning currently does. That way, the reason for the panic will be plainly visible from the backtrace. |
…ite` Previously, the `AioCb`'s `in_progress` field would erroneously be set to `true`, even if the syscall had an error Fixes nix-rust#714
…ite` Previously, the `AioCb`'s `in_progress` field would erroneously be set to `true`, even if the syscall had an error Fixes nix-rust#714
…ite` Previously, the `AioCb`'s `in_progress` field would erroneously be set to `true`, even if the syscall had an error Fixes nix-rust#714
@chrisvest I have a solution coded up, but it's failing on OSX in Travis. I don't have an OSX machine, so it's pretty hard for me to debug. Since you do, would you mind checking out the issue_714 branch and running the tests? The error in Travis is that |
@asomers I ran a
Maybe travis is using an older MacOS version that behaves differently. In another code base I do however have an |
By the way, did you tell Musl about the behavioural difference observed? |
@asomers I found out that my I don't see any connection between this and |
…ite` Previously, the `AioCb`'s `in_progress` field would erroneously be set to `true`, even if the syscall had an error Fixes nix-rust#714
Ok, I've finally got it. The problem with OSX is that |
@asomers Yes, this looks good! |
Previously, the `AioCb`'s `in_progress` field would erroneously be set to `true`, even if the syscall had an error Fixes nix-rust#714
Previously, the `AioCb`'s `in_progress` field would erroneously be set to `true`, even if the syscall had an error Fixes nix-rust#714
715: Fix multiple issues with POSIX AIO r=asomers a=asomers Fixed error handling in `AioCb::fsync`, `AioCb::read`, and `AioCb::write` Previously, the `AioCb`'s `in_progress` field would erroneously be set to `true`, even if the syscall had an error Fixes #714 AioCb::Drop will now panic for in-progress AioCb Printing a warning message to stderr isn't really appropriate, because there's no way to guarantee that stderr is even valid. Nor is aio_suspend necessarily an appropriate action to take.
@asomers @chrisvest Is this bug still unresolved even after the merging of #715? |
Wasn't sure about the process (close on merge, on release; closed by opener, by fixer), but yes my problem is solved with a git-dependency on nix. |
When enqueuing an AIO, such as
read
,write
, andfsync
, theAioCb
is marked asin_progress
before the system call is made.However, if the system call returns an error, such as
EAGAIN
orENOSYS
, etc. then the AIO is not actually in progress, and the subsequentdrop
will panic in its attempt at doing an orderly termination of the AIO:Also note that the
WARNING
printed above is missing a line-break, and thus messes up the output.The above was produced on MacOS Sierra, but I think it's the same on any relevant platform.
The text was updated successfully, but these errors were encountered: