io_uring task (iou-sqp) deadlock/hang on kernel 6.8.0-57-generic (Ubuntu 24.04 LTS) during npm install
[Summary] When running npm install in a Node.js project on Ubuntu 24.04 LTS with kernel 6.8.0-57-generic, the process hangs indefinitely. Kernel messages (dmesg) show iou-sqp-* tasks (related to io_uring) blocked in state D for extended periods, waiting on a mutex lock (__mutex_lock.constprop.0) within io_sq_thread. This issue occurs even with a clean kernel (taint state 0) and no third-party modules like pf_ring loaded. The problem is resolved by disabling io_uring usage in libuv via the UV_USE_IO_URING=0 environment variable. [Environment] OS: Ubuntu 24.04 LTS Kernel: 6.8.0-57-generic Node.js Version: v18.19.1 npm Version: v9.2.0 [Steps to Reproduce] Ensure the system is running Ubuntu 24.04 LTS with kernel 6.8.0-57-generic. Verify that no out-of-tree modules that might cause kernel instability (like pf_ring) are loaded, and the kernel taint state is 0 (checked via cat /proc/sys/kernel/tainted). Create or use an existing Node.js project (e.g., a Vue.js project created with Vue CLI, or even a simple project with a package.json having a few dependencies). Navigate to the project directory in a terminal. Run npm install --verbose. [Expected Behavior] npm install completes successfully, installing all dependencies. [Actual Behavior] npm install hangs, often during the "reify" stage or while fetching/extracting packages. The terminal shows no progress beyond a certain point. Simultaneously, dmesg output shows messages similar to the following, repeating or indicating a long blockage: ```plaintext [ 492.888306] </TASK> [ 615.762570] INFO: task iou-sqp-4626:4634 blocked for more than 368 seconds. [ 615.762999] Not tainted 6.8.0-57-generic #59-Ubuntu [ 615.763261] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 615.763675] task:iou-sqp-4626 state:D stack:0 pid:4634 tgid:4626 ppid:4189 flags:0x00004004 [ 615.763683] Call Trace: [ 615.763690] <TASK> [ 615.763696] __schedule+0x27c/0x6b0 [ 615.763713] schedule+0x33/0x110 [ 615.763717] schedule_preempt_disabled+0x15/0x30 [ 615.763721] __mutex_lock.constprop.0+0x42f/0x740 [ 615.763726] __mutex_lock_slowpath+0x13/0x20 [ 615.763729] mutex_lock+0x3c/0x50 [ 615.763731] io_sq_thread+0x2ae/0x620 [ 615.763737] ? __pfx_autoremove_wake_function+0x10/0x10 [ 615.763744] ? __pfx_io_sq_thread+0x10/0x10 [ 615.763746] ret_from_fork+0x47/0x70 [ 615.763755] ? __pfx_io_sq_thread+0x10/0x10 [ 615.763757] ret_from_fork_asm+0x1b/0x30 [ 615.763763] RIP: 0033:0x0 [ 615.763785] RSP: 002b:0000000000000000 EFLAGS: 00000246 ORIG_RAX: 00000000000001a9 [ 615.763789] RAX: 0000000000000000 RBX: 0000585c76b47030 RCX: 000070bc1e72725d [ 615.763791] RDX: 0000000000000000 RSI: 00007fff92f82470 RDI: 0000000000000040 [ 615.763793] RBP: 00007fff92f82520 R08: 0000000000000000 R09: 00007fff92f82440 [ 615.763795] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 [ 615.763796] R13: 0000000000000011 R14: 0000000000000001 R15: 0000000000000040 ``` [Workaround] Setting the environment variable UV_USE_IO_URING=0 before running npm install allows the installation to complete successfully without any hangs or dmesg errors related to iou-sqp tasks. Example: ```bash export UV_USE_IO_URING=0 npm install --verbose ``` -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2105471 Title: io_uring process deadlock To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2105471/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
