Interview Prep/Linux/Boot, time, cron and kernel

`dmesg` shows `INFO: task mysqld:2231 blocked for more than 120 seconds.`

AdvancedTroubleshootingBoot, time, cron and kernel
Answer

Likely causes → The hung task detector fired: a process stuck in D state for 2+ minutes, usually storage stalls (overloaded or failing disk, unresponsive SAN/EBS, NFS) or huge dirty page writeback.

Diagnose →

dmesg -T | grep -A 20 'blocked for more than'     # kernel stack shows where it waits
iostat -xz 1 5
cat /proc/pressure/io
grep -E 'Dirty|Writeback' /proc/meminfo

Fix → Resolve the storage bottleneck (faster volume, fix the failing device), tune dirty page limits, or fix the network storage.

Prevent → Alert on hung task messages and disk latency; don't run databases on network storage without performance guarantees.

All Linux questions Roadmap: Linux

More on Boot, time, cron and kernel