Remix.run Logo
gcr 3 days ago

What counts as a hung task? Blocking on unsatisfiable I/O for more than X seconds? Scheduler hasn’t gotten to it in X seconds?

If a server process is blocking on accept(), wouldn’t it count as hung until a remote client connects? or do only certain operations count?

westurner 3 days ago | parent | next [-]

torvalds/linux//kernel/hung_task.c :

static void check_hung_task(struct task_struct *t, unsigned long timeout) https://github.com/torvalds/linux/blob/9f16d5e6f220661f73b36...

static void check_hung_uninterruptible_tasks(unsigned long timeout) https://github.com/torvalds/linux/blob/9f16d5e6f220661f73b36...

striking 3 days ago | parent [-]

Just to double check my understanding (because being wrong on the internet is perhaps the fastest way to get people to check your work):

Is this saying that regular tasks that haven't been scheduled for two minutes and tasks that are uninterruptible (truly so, not idle or also killable despite being marked as uninterruptible) that haven't been woken up for two minutes are counted?

Delk 3 days ago | parent | next [-]

The comment in the code says two minutes but the time would actually seem to depend on a timeout given as a parameter.

westurner 3 days ago | parent | prev [-]

Your and the Llama's explanations would make good comments for the source and/or the docs if true.

3 days ago | parent | prev [-]
[deleted]