← The Journal Engineering · 5 min read
Anatomy of an Uninterruptible D-State: Our Linux Kernel Regression Postmortem
How an upstream regression in Linux 6.1.192-1 ext4 block allocation locked our filesystem in uninterruptible sleep, and how we diagnosed and resolved it.
By Alex Kyron Journal date November 16, 2026
The Outage: Silent Timeouts and Unkillable Processes
During a routine production container update on our primary hosting infrastructure, our monitoring systems alerted us to escalating HTTP gateway timeouts. Within minutes, public endpoints across `winnitude.ca`, our meta-search engine `search.winnitude.ca`, and webmail began failing to respond, returning HTTP 504 Gateway Timeout or hanging indefinitely at the initial TCP socket connection phase.
Initial operational triage showed our web server processes (Nginx) and container runtimes (Docker) still listed in process tables, but completely unresponsive to IPC signals. Commands such as `systemctl restart nginx` or `docker restart` hung without completing. Even issuing `kill -9` against affected process IDs had zero effect. The processes had entered the dreaded uninterruptible sleep (`D` state), indicating they were blocked in the Linux kernel waiting on a hardware or filesystem event that was never completing.
When a process enters uninterruptible sleep, the kernel guarantees that it will not service asynchronous signals -- including SIGKILL -- until the underlying I/O operation finishes. If the kernel thread responsible for completing that I/O has itself panicked or entered a deadlock while holding an essential kernel lock, any process attempting to access the same resource will freeze permanently, consuming thread slots and eventually starving the entire host operating system.
Tracing the Kernel Call Stack
Because standard userland debugging tools hung when attempting to query process status, we turned directly to `/proc` kernel diagnostic interfaces. Inspecting `/proc/<pid>/wchan` across stalled Nginx workers revealed processes blocked on `wait_transaction_locked`. Examining the kernel stack via `/proc/<pid>/stack` pinpointed the exact point of failure deep inside the storage subsystem:
The stack trace showed `ovl_create_or_link` (Docker's OverlayFS driver) calling `vfs_create`, which invoked `ext4_create` and `__ext4_journal_start_sb`. This in turn blocked at `start_this_handle` and `wait_transaction_locked`. The ext4 filesystem journaling daemon, `jbd2/sda1-8`, was stuck inside `jbd2_journal_wait_updates` within `jbd2_journal_commit_transaction`.
This finding immediately explained the systemwide paralysis: any process on the entire operating system attempting to create a file, append to an access log, write a temporary file, or touch disk metadata was queuing behind a journaling transaction that could never commit. Because Nginx writes access logs for incoming HTTP requests, its worker threads froze one by one, exhausting the connection queue and causing public requests to time out.
- Process stack: [<0>] wait_transaction_locked+0x8a/0xd0 -> add_transaction_credits+0x1a0/0x300 -> start_this_handle+0x104/0x590 -> jbd2__journal_start+0xf8/0x1e0 -> __ext4_journal_start_sb+0x105/0x120
- Journal daemon stack: [<0>] jbd2_journal_wait_updates+0x73/0xe0 -> jbd2_journal_commit_transaction+0x28c/0x1a50 -> kjournald2+0xa9/0x280
- OverlayFS operations on /var/lib/docker/overlay2 were directly serialized behind the blocked jbd2 journal transaction.
The Upstream Culprit: ext4_mb_load_buddy_gfp
Examining the raw kernel ring buffer via `dmesg -T` uncovered the root cause: an immediate kernel NULL pointer dereference (Oops) occurred during an intense disk write sequence:
`BUG: kernel NULL pointer dereference, address: 0000000000000000`
`RIP: 0010:ext4_mb_load_buddy_gfp+0xbc/0x380 [ext4]`
`Call Trace: ext4_mb_regular_allocator -> ext4_mb_new_blocks ...`
Cross-referencing the kernel build -- `Debian 6.1.0-55-cloud-amd64` (build `6.1.192-1`, released November 14, 2026) -- revealed a severe upstream regression. A backported memory management patch intended to convert `bd_buddy_page` to `bd_buddy_folio` utilized `__filemap_get_folio()`. In Linux 6.1 stable trees, `__filemap_get_folio()` returns `NULL` when a folio is absent rather than an error pointer. The code lacked an explicit `NULL` guard, passing the null pointer directly to `folio_test_uptodate()`.
When a heavy I/O workload -- specifically Docker and pnpm extracting 639 packages and hard-linking thousands of files -- requested block allocation in a new block group, the allocator dereferenced address `0x0`, crashing the allocator thread and permanently locking the ext4 journal. Because the faulted thread never released its transaction handle, the journal commit thread waited indefinitely for updates to finish, deadlocking the entire filesystem.
Remediation and Infrastructure Hardening
Because the journal transaction lock was held by a faulted kernel thread, userland recovery was impossible; the instance required a clean hardware hypervisor reset via GCP management controls. Once the node was back online, we executed a comprehensive remediation plan:
1. Kernel Patching: Debian maintainers rapidly released a security fix, `6.1.192-2` (`6.1.0-56-cloud-amd64`), specifically adding the missing `NULL` validation check to `ext4_mb_load_buddy_gfp`. We immediately upgraded to this patched kernel, verified bootloader entries in GRUB, and confirmed clean initialization on reboot.
2. Hardware Scaling: We doubled the server's virtual resources, scaling from GCP's burstable `e2-small` to `e2-medium` (4 GB RAM, 2 vCPUs) and doubling root persistent disk capacity from 30 GB to 60 GB. This provides over 35 GB of free headroom, eliminating memory thrashing, hypervisor ballooning (`virtio_balloon`), and storage contention during peak build operations.
3. Build Pipeline Optimization: We pruned legacy Docker revision layers, verified layer caching, and ensured standalone compilation runs smoothly. On the patched kernel with expanded resources, the cold build completed smoothly in under 40 seconds without a single dropped transaction or memory spike.
Operational Takeaways
Even on conservative, battle-tested Linux distributions like Debian Bookworm, point kernel updates can introduce subtle regressions in core subsystems like ext4. Maintaining deep visibility into kernel state -- knowing how to interpret `/proc/<pid>/wchan`, examine `/proc/<pid>/stack`, and inspect `dmesg` -- is the difference between hours of blind speculation and rapid, decisive resolution.
We share this postmortem transparently not only to document our infrastructure reliability practices, but to assist other systems engineers navigating similar unexplainable D-state deadlocks following the mid-November 2026 Linux 6.1 updates. With the patched kernel in place and expanded capacity online, our systems are faster, more resilient, and fully prepared for our upcoming application releases.
Sources & further reading
Primary material behind the discussion and useful places to go deeper. The recommendations and worked examples in this article are our synthesis.
Working through a software or game-development problem of your own?
Talk to Winnitude! ↗ Explore our tools ↗
KEEP READING
More to think about.
Lua gives you immediacy. Rust gives you systems control. Haskell brings pure functional programming, expressive types, and another powerful way to build software across the Platinum platform.
A repeatable capture, a clear hypothesis and a controlled comparison usually beat a fashionable optimization.
Define the experience you want, make its costs visible, and leave room for the moments that matter.