Re: Spurious/undocumented EINTR from io_uring_enter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux