From: Jens Axboe <[email protected]>
To: Joseph Christopher Sible <[email protected]>,
"'[email protected]'" <[email protected]>
Subject: Re: Spurious/undocumented EINTR from io_uring_enter
Date: Tue, 7 Apr 2020 14:41:39 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 4/7/20 1:36 PM, Joseph Christopher Sible wrote:
> When a process is blocking in io_uring_enter, and a signal stops it for
> any reason, it returns -EINTR to userspace. Two comments about this:
>
> 1. https://github.com/axboe/liburing/blob/master/man/io_uring_enter.2
> doesn't mention EINTR as a possible error that it can return.
I'll add it to the man page.
> 2. When there's no signal handler, and a signal stopped the syscall for
> some other reason (e.g., SIGSTOP, SIGTSTP, or any signal when the
> process is being traced), other syscalls (e.g., read) will be
> restarted transparently, but this one will return to userspace
> with -EINTR just as if there were a signal handler.
>
> Point 1 seems like a no-brainer. I'm not sure if point 2 is possible
> to fix, though, especially since some other syscalls (e.g., epoll_wait)
> have the same problem as this one.
Lots of system calls return -EINTR if interrupted by a signal, don't
think there's anything worth fixing there. For the wait part, the
application may want to handle the signal before we can wait again.
We can't go to sleep with a pending signal.
--
Jens Axboe
next prev parent reply other threads:[~2020-04-07 21:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 20:36 Spurious/undocumented EINTR from io_uring_enter Joseph Christopher Sible
2020-04-07 21:41 ` Jens Axboe [this message]
2020-04-08 16:41 ` Joseph Christopher Sible
2020-04-08 17:49 ` Jens Axboe
2020-04-08 18:57 ` Joseph Christopher Sible
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox