Bug 586237 - "hung_task" feature port is incomplete
Summary: "hung_task" feature port is incomplete
Status: CLOSED DUPLICATE of bug 582237
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.5
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Red Hat Kernel QE team
Depends On: 582237
TreeView+ depends on / blocked
Reported: 2010-04-27 06:34 UTC by Linda Wang
Modified: 2010-04-27 06:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 582237
Last Closed: 2010-04-27 06:35:26 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Linda Wang 2010-04-27 06:34:32 UTC
+++ This bug was initially created as a clone of Bug #582237 +++

Pavel Emelyanov from Parallels Virtuozzo Containers team has found that 2.6.18-194.el5 kernel has a new feature "hung_task" backported from mainstream.
Unfortunately there is some important piece of code is missing:

The bad thing is that the following piece of code (marked with >>>-s) in the check_hung_uninterruptible_tasks() routine was lost:

        do_each_thread(g, t) {
                if (!max_count--)
                        goto unlock;
                if (!--batch_count) {
                        batch_count = HUNG_TASK_BATCHING;
                        rcu_lock_break(g, t);
>>> >>>                     /* Exit if t or g was unhashed during refresh. */
>>> >>>                     if (t->state == TASK_DEAD || g->state == TASK_DEAD)
>>> >>>                             goto unlock;
                /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
                if (t->state == TASK_UNINTERRUPTIBLE)
                        check_hung_task(t, timeout);
        } while_each_thread(g, t);

This code is required, since in case t or g goes dead the lists being scanned are no longer self-consistent.

Please, recheck and add the code.

Comment 1 Linda Wang 2010-04-27 06:35:26 UTC

*** This bug has been marked as a duplicate of bug 582237 ***

Note You need to log in before you can comment on or make changes to this bug.