Bug 7786 - CPU hotplug generates OOPS the second time a CPU is unplugged
Summary: CPU hotplug generates OOPS the second time a CPU is unplugged
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: i386 Linux
: P2 low
Assignee: Andi Kleen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-07 12:29 UTC by Mauro Carvalho Chehab
Modified: 2007-01-07 14:08 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.19.1
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
dmesg with the oops (36.59 KB, text/plain)
2007-01-07 12:38 UTC, Mauro Carvalho Chehab
Details
This patch fixed the oops. However, kernel still complains about recursive locking (1.68 KB, patch)
2007-01-07 14:04 UTC, Mauro Carvalho Chehab
Details | Diff

Description Mauro Carvalho Chehab 2007-01-07 12:29:38 UTC
Most recent kernel where this bug did *NOT* occur: none
Distribution: Mandriva 2007 Official
Hardware Environment: AMD 64 Dual Core 4200+

Problem Description:
The second trial to make the same CPU offline does generate an OOPS

Steps to reproduce:

echo 0 > /sys/devices/system/cpu/cpu1/online 
echo 1 > /sys/devices/system/cpu/cpu1/online 
echo 0 > /sys/devices/system/cpu/cpu1/online
Comment 1 Mauro Carvalho Chehab 2007-01-07 12:38:08 UTC
Created attachment 10020 [details]
dmesg  with the oops

I suspect that this trouble may be related to the circular dependency, as
reported by kernel:
=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.19.1 #1
-------------------------------------------------------
stress/5670 is trying to acquire lock:
 (cpu_bitmask_lock){--..}, at: [<ffffffff8015af7d>] lock_cpu_hotplug+0x6d/0x80

but task is already holding lock:
 (workqueue_mutex){--..}, at: [<ffffffff8014962f>]
workqueue_cpu_callback+0x16f/0x2d0

which lock already depends on the new lock.

stress is just a script doing echo to cpu hotplug sysfs interface:
	echo Making CPU online
	echo 0 >/sys/devices/system/cpu/cpu1/online
	echo Making CPU offline
	echo 1 >/sys/devices/system/cpu/cpu1/online
	echo Making CPU online
	echo 0 >/sys/devices/system/cpu/cpu1/online
Comment 2 Mauro Carvalho Chehab 2007-01-07 14:04:19 UTC
Created attachment 10025 [details]
This patch fixed the oops. However, kernel still complains about recursive locking
Comment 3 Mauro Carvalho Chehab 2007-01-07 14:08:18 UTC
Andrew Morton pointed to a patch from Christoph Lameter <clameter@sgi.com> that
fixes the issue. It would be better to have this patch applied to -stable.

After the patch, it still complains about bad locking.

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