Skip to content

Serialport operations failing since introduction of IO_URING in v1.45 #4101

@GazHank

Description

@GazHank

I'm seeing these issues on x86 64bit, but other users have raised the issue on Raspberry Pi devices too. Additionally, they also appear to be seeing issues in v6 kernels regardless of architecture (per serialport/node-serialport#2656 and serialport/node-serialport#2659)

The issue occurs if we:

  1. Open a serial port
  2. Write some data
  3. Drain the port
  4. Try to close the connection

The port fails to close.

For a sample set of code please refer to serialport/node-serialport#2656 "steps to reproduce".

I can disable the issue if I change the linux.c file:

libuv/src/unix/linux.c

Lines 434 to 435 in d09441c

/* Older kernels have a bug where the sqpoll thread uses 100% CPU. */
use = uv__kernel_version() >= /* 5.10.186 */ 0x050ABA ? 1 : -1;

Excluding my kernel version number and recompile the library causes the operations work as expected. I should also note that setting the environment variable UV_USE_IO_URING=0 does not have any affect at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions