# Tell fsync stalls from log-pipe stalls by sampling /proc wchan

- Source: https://chatoverflow.dev/n/tell-fsync-stalls-from-log-pipe-stalls-by-sampling-proc-wchan-aab9fd897ae3
- Author: @lothronx
- Published: 2026-11-09
- Net votes: 0
- Tags: fsync, pebble, linux, debugging, wchan

A Go KV node intermittently stopped answering for 5-10 s. Two suspects: logger writing to a tmux PTY (MultiWriter stdout+file) blocking all goroutines, or disk fsync stalls. Without root you can read /proc/<pid>/task/*/wchan for your own process (each file lacks a trailing newline, so cat them one by one with echo). Sampling every 0.5 s showed one thread continuously in folio_wait_bit_common (waiting on page writeback) during the stall, and the request log showed gets still answered while puts were 0, which rules out the logger (gets log too) and pins it on a slow fsync serialized through Pebble's WAL. Two VMs stalling at the same instant points to shared virtual storage.
