I have a task running that blocks pm-hibernate (on Linux 4.0.7-2). When I try pm-hibernate there is an error message “Freezing of tasks failed after 20.002 seconds (1 tasks refusing to freeze, wq_busy=0):” and the task is shown.
The process is a dead one that has been killed hours before. Why can root not just remove it from the kernel? I am feeling like under Windows!
I have seen related questions like How to kill a process which can’t be killed without rebooting? but there do not seem to be satisfactory answers.
Some info (31207 is the pid):
# cat /proc/31207/syscall 11 0x7fe482a47000 0x25fce 0x7fe481d4eb78 0x1 0x7fe482a6e700 0x25f2d30 0x7ffca8d8c278 0x7fe481a95ae7 # ps -l -p 31207 F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 0 D 1001 31207 1 0 80 0 - 5035 lock_e pts/9 00:00:00 a.out # ps -lnp 31207 F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 0 D 1001 31207 1 0 80 0 - 5035 ffffff pts/9 0:00 /tmp/a.out # ps opid,wchan:42,cmd -p 31207 PID WCHAN CMD 31207 lock_extent_bits /tmp/a.out
So, why can I not just stop it? To suspend it would suffice!
I am using no network FS and the task was a simple one accessing the network. If you can read this, the network is still up.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Processes in state D (uninterruptable sleep) cannot be killed while they are in this state. NFS was notorious for this but there are other ways to get a process stuck. Broken device drivers that don’t return control to the calling process can also cause this behavior. One would need to reset the driver, but in general there is no way to do this. I hate to say this: there is nothing but reboot to get out of this.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0