liburing icon indicating copy to clipboard operation
liburing copied to clipboard

Disk encryption disables IORING_SETUP_IOPOLL

Open 1f604 opened this issue 1 year ago • 2 comments

Hi all, not sure where the best place to post this so I'll post it here.

So I first installed Debian 12 on my server with encrypted LVM and when I tried to run the simple cat program here it failed with this:

  readv/read returned error : Operation not supported

And my program which used IORING_SETUP_IOPOLL also failed with this:

  cqe failed: Operation not supported

To be clear: my program ran fine without the IORING_SETUP_IOPOLL flag, it was only when I added the IORING_SETUP_IOPOLL flag that the error occurred.

Then I reinstalled my OS this time without LVM encryption, and now the cat program runs (and completes with the correct output) and my program also runs but crashes my computer (I cannot kill it even with kill -9, it just creates a zombie process that uses 100% CPU). And I think the only major difference was that this time I'm not using encrypted LVM.

Is it known that disk encryption disables IORING_SETUP_IOPOLL ?

1f604 avatar Jul 17 '23 14:07 1f604

io_uring relies on lower layers (e.g. block devices) to support IOPOLL, I'd assume encrypted LVM doesn't support that.

Then I reinstalled my OS this time without LVM encryption, and now the cat program runs (and completes with the correct output) and my program also runs but crashes my computer (I cannot kill it even with kill -9, it just creates a zombie process that uses 100% CPU). And I think the only major difference was that this time I'm not using encrypted LVM.

Do you get anything interesting in dmesg? When it happens, can you cat /proc/<pid>/stack for us? What the kernel version do you run?

isilence avatar Jul 28 '23 14:07 isilence

I don't see anything new in dmesg after I run my program.

$ cat /proc/8961/stack returns nothing.

$ uname -r
6.1.0-9-amd64

1f604 avatar Jul 28 '23 15:07 1f604