14

I had this message in my kernel log : INFO: task XXX blocked for more than 120 seconds. I would like to know what it means technically: under what conditions does the kernel display this message about a task?

For the record, my blocked task was multipathd, but I'm also interested in the general meaning of this error.

13

If a task is blocked, it waits for resources to become available again.

In your case there was propably either a IO-problem or a contention in the disk-area. Or your system-load was so high that there was not enough CPU-power available to finish the job in time.

I have seen this error from cron, if it tries to start a job in a very busy time.

  • Can you be more specific? Does "blocked" mean "continuously in an uninterruptible state"? – Totor Aug 13 '13 at 23:17
  • @Totor In this context it is waiting for resources. So other io is not interruptable . – Nils Aug 19 '13 at 20:53
7

Basically this logging is triggered if the CPU scheduler hasn't switched to the process in the given amount of time, and the process doesn't qualify for an exception.

The exceptions are special cases where a process hasn't been switched to but it shouldn't get logged about. I don't clearly understand the conditions for the exceptions; FWIW the comments on the cases in the code are:

Also, skip vfork and any other user process that freezer should skip.

Also, when a freshly created task is scheduled once, changes
its state to TASK_UNINTERRUPTIBLE without having ever been
switched out once, it musn't be checked.

http://lxr.free-electrons.com/source/kernel/hung_task.c#L75

As to why a task might not be scheduled for a long period of time, it being continuously in TASK_UNINTERRUPTABLE ('D' state) would be one possibility, but I don't know what others there might be.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.