lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 3 Mar 2008 12:54:47 +0100
From:	"Dmitry Adamushko" <dmitry.adamushko@...il.com>
To:	yi.y.yang@...el.com
Cc:	"Ingo Molnar" <mingo@...e.hu>, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org
Subject: Re: [BUG 2.6.25-rc3] scheduler/hotplug: some processes are dealocked when cpu is set to offline

On 02/03/2008, Yi Yang <yi.y.yang@...el.com> wrote:
> [ ... ]
>
>  Why isn't the kernel thread [watchdog/1] reaped by its parent?
> its state
>  is TASK_RUNNING with high priority (R< means this), why it isn't done?
>
>  Anyone ever met such a problem? Your thought?
>

iirc, Andrew had the same issue.

'watchdog's are supposed to be stopped with kthread_stop() from
softlockup.c :: cpu_callback() :: case CPU_DEAD.

The 'R' state of 'watchdog' is strange indeed.

would you please conduct a test with the patch [1] below and provide
me with additional output it generates?

(non-white-space-damaged versions are enclosed)

with your current set-up and also with
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs"

Then please try also the patch [2] (on top of [1]). With this 'magic'
patch applied, the issue 'seemed' to disappear on Andrew's set-up...

Thanks in advacne,


[1]

--- softlockup-prev.c   2008-03-03 12:35:01.000000000 +0100
+++ softlockup.c        2008-03-03 12:38:01.000000000 +0100
@@ -237,6 +237,8 @@ static int watchdog(void *__bind_cpu)

        }

+       printk(KERN_WARN "-> watchdog(cpu: %d) is done\n", this_cpu);
+
        return 0;
 }

@@ -249,6 +251,9 @@ cpu_callback(struct notifier_block *nfb,
        int hotcpu = (unsigned long)hcpu;
        struct task_struct *p;

+       printk(KERN_WARN "-> cpu_callback(cpu: %d, action: %lu,
check_cpu: %d)\n",
+               hotcpu, action, check_cpu);
+
        switch (action) {
        case CPU_UP_PREPARE:
        case CPU_UP_PREPARE_FROZEN:


[2]

--- softlockup-prev-2.c 2008-03-03 12:38:36.000000000 +0100
+++ softlockup.c        2008-03-03 12:39:02.000000000 +0100
@@ -294,6 +294,7 @@ cpu_callback(struct notifier_block *nfb,
        case CPU_DEAD_FROZEN:
                p = per_cpu(watchdog_task, hotcpu);
                per_cpu(watchdog_task, hotcpu) = NULL;
+               mlseep(1);
                kthread_stop(p);
                break;
 #endif /* CONFIG_HOTPLUG_CPU */


-- 
Best regards,
Dmitry Adamushko

View attachment "softlockup-debug-1.patch" of type "text/x-patch" (567 bytes)

View attachment "softlockup-debug-2.patch" of type "text/x-patch" (356 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ