Bug 49001 - disable_nonboot_cpus() : Kernel freezes when reboot
disable_nonboot_cpus() : Kernel freezes when reboot
Status: CLOSED CODE_FIX
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64
All Linux
: P1 normal
Assigned To: platform_x86_64@kernel-bugs.osdl.org
:
Depends on:
Blocks: 49741
  Show dependency treegraph
 
Reported: 2012-10-18 07:24 UTC by finidine
Modified: 2013-11-19 22:44 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.0.46, 3.6.2, 3.7
Tree: Mainline
Regression: Yes


Attachments

Description finidine 2012-10-18 07:24:02 UTC
System freezes only when reboot. Userspace seems to finish OK, disks are unmounted cleanly. Another user reports kernel panic, not in my case. Simply rolling back to previous versions (3.0.45 or 3.5.7) the problem dissapears. 

Tested on two machines, one with CPU AMD Phenom II X4, the other a single-core processor. Only occurs on the multicore.

Reviewing the changelog for both kernels I could see a commit related to behavior on reboot (f96972f2dc6365421cf2366ebd61ee4cf060c8d5 upstream)

kernel/sys.c: call disable_nonboot_cpus() in kernel_restart()
Comment 1 finidine 2012-10-18 14:38:47 UTC
Recompiling kernel/sys.c in 3.0.46 without the call to disable_nonboot_cpus() at the function kernel_restart() makes my system reboots normally. Otherwise, kernel_restart() freezes my machine.
Comment 2 finidine 2012-10-25 19:27:09 UTC
Same behavior on 3.0.48, kernel_restart() freezes system if call disable_nonboot_cpus()

Only occurs on 4-core CPU.

Tested on single-core, no freeze.
Comment 3 finidine 2012-12-02 11:09:11 UTC
Same machine (4-core AMD), now running Ubuntu 12.04, until kernel version 3.2.33, normal behavior, after update to kernel 3.2.34 the system freezes on reboot. As we can see in the 3.2.34 patch, the call to disable_nonboot_cpus() was just added to kernel_restart() in sys.c:

http://www.kernel.org/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fv3.0%2Fpatch-3.2.34.bz2;z=1402
Comment 4 Jonathan Nieder 2013-01-15 22:04:36 UTC
References: http://bugs.debian.org/697635
First-bad-commit: f96972f2dc6365421cf2366ebd61ee4cf060c8d5
Comment 5 finidine 2013-01-16 08:17:55 UTC
I was starting kernel with "acpi_skip_timer_override" parameter, otherwise I could not enable "AMD C1E" state in BIOS (system freezes when booting). This option saves about 10W of power at idle for me.

If I disable AMD C1E, system works perfectly (but consumming more power at idle).

"AMD C1E" + "acpi_skip_timer_override" = system works ok except the commented freeze when reboot.

"AMD C1E" + "lapic" + "nolapic_timer" = testing, but system seems to work OK (and kernel_restart works)

Is "AMD C1E state" supported by current kernels?

The debian bug... an Intel CPU.
Comment 6 Jonathan Nieder 2013-07-15 06:16:08 UTC
Said to be fixed by cf7df378aa4ff7da3a44769b7ff6e9eef1a9f3db (reboot: rigrate shutdown/reboot to boot cpu, 2013-06-12). Thanks to Nicolas Le Cam for the update.

Looks like the bugzilla configuration has changed so I can't claim the bug and close it any more?

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