# Kernel panic every time 'emerge --sync' is run

## Brian_the_King

Hi

I have an HP laptop that I recently repartitioned in GParted for Gentoo. I got Gentoo installed ok and now have the internet working.

However anytime I have tried to run 'emerge --sync' (five or six tries now) I get a kernel panic.

Unfortunately nothing appears on the screen when this happens, only the flashing caps lock light.

What steps can I take to troubleshoot this? I have only really tried one thing, seen in this thread

https://forums.gentoo.org/viewtopic-p-5768513.html#5768513

I will post more information about my system as requested.

Thank you!

----------

## forkbomb

Hi,

Was sort of following that other thread of yours and trying to kick in some (probably not very profound) help where possible. You might want to show your /etc/fstab here in this thread.

I think it may be related to ext4 (ext4 is marked as stable but some folks say it's not there). You also established in the other thread that you shouldn't be running out of inodes (that's the first place to look during emerge --sync issues because of all the files a sync pulls in).

----------

## bunder

tried an e2fsck on the affected partitions?

----------

## Hu

Try sleep 30 ; emerge --sync, then immediately switch to a text console.  After 30 seconds, the emerge will start.  When the kernel panics, you should be able to get at least some output.  Alternately, you could set up a serial console and let the machine on the other end log the whole panic.

----------

## Brian_the_King

 *Brian_the_King wrote:*   

> ubuntu@ubuntu:~$ sudo cat /media/disk-1/etc/fstab
> 
> ```
> # /etc/fstab: static file system information.
> 
> ...

 

 *Brian_the_King wrote:*   

> df -iah /dev/sda4
> 
> ```
> Filesystem     Inodes     IUsed     IFree     IUse%     Mounted on
> 
> ...

 

 *Brian_the_King wrote:*   

> umount /dev/sda4
> 
> fsck /dev/sda4
> 
> ```
> ...

 

 *Hu wrote:*   

> Try sleep 30 ; emerge --sync, then immediately switch to a text console.  After 30 seconds, the emerge will start.  When the kernel panics, you should be able to get at least some output.  Alternately, you could set up a serial console and let the machine on the other end log the whole panic.

 

I will try this soon

----------

## Brian_the_King

ok

'sleep 15; emerge --sync' then 'nano' did not work (the computer wouldn't let me do anything until 'sleep' was done with its 15 seconds) but 'emerge --sync' got MUCH farther down the list than it usually does, and left me with this

```
[   117.976019] ------------[  cut here  ]------------

[   117.976019] WARNING: at kernel/smp.c:226 smp_call_function_single+0x41/0xf0()

[   117.976019] Hardware name: HP Pavilion tx2000 Notebook PC

[   117.976019] Modules linked in:

[   117.976019] Pid: 0, comm: swapper Tainted: G    M     W  2.6.29-gentoo-r5 #2

[   117.976019] Call Trace:

[   117.976019]   <#MC>   [<ffffffff8103b867>] warn_slowpath+0xd3/0x10f

[   117.976019]   [<ffffffff814e1ed9>] ? dump_stack+0x72/0x7b

[   117.976019]   [<ffffffff8105d742>] ? print_modules+0x91/0x98

[   117.976019]   [<ffffffff8103b881>] ? warn_slowpath+0xed/0x10f
```

Any suggestions for me?

----------

## Hu

Why did you try to run nano?  When I said switch to a text console, I meant use ctrl+alt+f1 to switch to tty1, so that you would be in text mode when the kernel panic occurred.

Even so, that taint line is helpful in diagnosing your problem, and a bit worrisome.  It reports you have had a WARNING from the kernel at some point earlier, and that you have had a Machine Check Exception.  The current warning is because the kernel tried to do a cross-CPU call while interrupts were disabled.  According to the comments, this can cause a deadlock, so a warning is issued first.  We need to see a few more lines of the call stack to know what part of the kernel tried to do the prohibited cross-CPU call.  I would not expect a deadlock to result in a kernel panic, though.  The Machine Check Exception also sounds bad.  Boot with the offending kernel and check the contents of /proc/sys/kernel/tainted.  If it has bit 2 set, you have had another Machine Check Exception.  Check dmesg to see details of the exception.  Such exceptions can indicate that your hardware is failing.

----------

## Brian_the_King

 *Hu wrote:*   

> Why did you try to run nano?  When I said switch to a text console, I meant use ctrl+alt+f1 to switch to tty1, so that you would be in text mode when the kernel panic occurred.
> 
> Even so, that taint line is helpful in diagnosing your problem, and a bit worrisome.  It reports you have had a WARNING from the kernel at some point earlier, and that you have had a Machine Check Exception.  The current warning is because the kernel tried to do a cross-CPU call while interrupts were disabled.  According to the comments, this can cause a deadlock, so a warning is issued first.  We need to see a few more lines of the call stack to know what part of the kernel tried to do the prohibited cross-CPU call.  I would not expect a deadlock to result in a kernel panic, though.  The Machine Check Exception also sounds bad.  Boot with the offending kernel and check the contents of /proc/sys/kernel/tainted.  If it has bit 2 set, you have had another Machine Check Exception.  Check dmesg to see details of the exception.  Such exceptions can indicate that your hardware is failing.

 

Gentoo did not boot correctly when I went to try this.

While I believe you that my hardware could be failing, (since this laptop has been nothing but a pile of sh*t since the month my one year warranty expired) I have no problems with crashes while in Windows Vista whatsoever, which seems odd to me if my cpu or mobo is dying (I did a memtest86 last month for 14 hours and there were zero errors).

Either way, I am sick of typing things with "code" tags, so it's picture time. Please let me know if there is any trouble reading the screen so I can type it out if needed!

http://img357.imageshack.us/img357/9729/0606091541.jpg

----------

## Brian_the_King

bumpin   :Surprised: 

I should also mention that I had this problem in Arch Linux when the installation files were being downloaded, every single time I tried it [between five and 10 attempts].

However, Ubuntu has never given me a single Kernel panic. What possibly could be going on?

----------

