nvme-cli connect regression

Daniel Wagner dwagner at suse.de
Mon Apr 7 01:34:07 PDT 2025


On Tue, Apr 01, 2025 at 02:40:54PM -0700, Caleb Sander Mateos wrote:
> I am not sure what an error code of EINTR means in the kernel. It
> looks like the kernel_recvmsg() is performed on the thread that writes
> to /dev/nvme-fabrics, so it's possible that there is a signal pending
> for the userspace thread (i.e. nvme-cli)?

nvme-cli has only on place where signals are used (to interrupt a self
test). libnvme doesn't use signals at all. No idea where the signal is
coming from but it looks very unlikely to be from nvme-cli/libnvme.

> The kernel_recvmsg() should block until it receives all 128 bytes of
> the ICResp PDU. It can also time out if the data is not received
> before sk_rcvtimeo = 10 * HZ. But I would expect it to return EAGAIN
> in that case. I was going to say it doesn't look like 10 seconds had
> passed yet in the quoted logs, but they also show time going
> backwards, so I am not sure what to make of the timestamps...

Not sure if I am looking at the right code in networking.
tcp_recvmsg_locked seems to be the place where the operation happens and
this function is able to return EINTR

if (signal_pending)
  sock_intr_errno
    return -EINTR

And if I read sock_intr_errno correctly, this is the case when
sk_rcvtimeo is set.

Back to my original question, what should happen in this case? Usually
for userpace seing a EINTR means to retry. No problem addding this to
libnvme, just wanted to confirm this is the right thing to do.

Thanks,
Daniel



More information about the Linux-nvme mailing list