Fixing Ubuntu soft lockup – CPU error

We have some strange issue with an Ubuntu 12.04 System. It takes a lot of time for booting to the login screen. It was approximately 4 minutes, which is definitely not normal. When we read log files, we found real problem:

kernel: BUG: soft lockup - CPU#1 stuck for 23s

We have made hardware tests: CPU stability, Memory test, Hard disk check. There is no hardware problem on it, so it was software issue. Most recent solutions that we found was to make system boot with no ACPI. Way to do it is to edit /etc/default/grub and change GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” with: GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi=off”

After this change you have to make update-grub and grub-install commands to take effect. When we reboot the system it takes no more than minute to load from grub to login screen. But when we checked the system, we found that it isn’t a good solution, because when you shut down it freezes (without powering off the PC). We tried with other options in grub, but nothing helps for real, so we made it as it was : GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

Real solutions for us came when we installed this package “amd64-microcode”(Processor microcode firmware for AMD CPUs). Our system runs with AMD CPU, so if it happens on Intel system, the proper package is: intel-microcode.

sudo apt-get install amd64-microcode # For AMD CPUs

or

sudo apt-get install intel-microcode # For Intel CPUs

In that way system runs as it should be – fast loading at boot and normal shutdown, without problems for all used services and applications.
Hope that helps 🙂