# Kernel panic during boot

## Markand

Hi,

I can't boot my Gentoo setup anymore, it panics everytime I boot. I don't know if i'm missing something in the kernel or not. I have a / as xfs partition, and the kernel is the last 3.2.12

Here is my kernel config : http://markand.malikania.fr/panic/config.txt

My /etc/make.conf: http://markand.malikania.fr/panic/make.conf

And the panic : http://markand.malikania.fr/panic/pic.jpg

Other panic that happened after booting : http://markand.malikania.fr/panic/pic2.jpg

Do you have any idea? 

Cheers

----------

## NeddySeagoon

Markand,

Both your panics have been caused by an invalid opcode.  This means tha the CPU is being asked to execute an instruction that it doesn't know how.

This means that your kernel is configured for a CPU that is different to the CPU its running on, if the invalid opcode was in the kernel, or your CFLAGS are set for the wrong CPU type if the probem was caused by a userspace program.

Lastly, there is the possibility of a hardware issue.

Use a liveCD to post your

```
emerge --info
```

and the content of 

```
 /proc/cpuinfo
```

Now boot the CD into memtest86+  and let it run a few cycles. Report your findings here too.

----------

## NeddySeagoon

Markand,

Both your panics have been caused by an invalid opcode.  This means tha the CPU is being asked to execute an instruction that it doesn't know how.

This means that your kernel is configured for a CPU that is different to the CPU its running on, if the invalid opcode was in the kernel, or your CFLAGS are set for the wrong CPU type if the probem was caused by a userspace program.

Lastly, there is the possibility of a hardware issue.

Use a liveCD to post your

```
emerge --info
```

and the content of 

```
 /proc/cpuinfo
```

Now boot the CD into memtest86+  and let it run a few cycles. Report your findings here too.

----------

## Markand

 *NeddySeagoon wrote:*   

> Markand,
> 
> Both your panics have been caused by an invalid opcode.  This means tha the CPU is being asked to execute an instruction that it doesn't know how.
> 
> This means that your kernel is configured for a CPU that is different to the CPU its running on, if the invalid opcode was in the kernel, or your CFLAGS are set for the wrong CPU type if the probem was caused by a userspace program.
> ...

 

Thanks for your answer, you found my problem! In fact I have chosen in "Processor type and features -> Processor family" the bad CPU, I've chosen "Core 2/Newer Xeon" while I have a Intel core I3. I kept to the default Generic-x86-64 and no problem anymore.

Thanks!

----------

## psheldon

Ah Thanks, I have an I7 ...... what am I supposed to use? Thanks

----------

## Markand

I still have a problem.. when openrc starts udev-postmount to switch to radeonfb framebuffer I get an other kernel panic, but it does not happens everytime. It panics just after the script set the tty framebuffer to the new size. If I boot with nomodeset flag no panic occurs but I don't get a great tty  :Sad: 

this is the panic with KMS : http://markand.malikania.fr/panic/pic3.jpg

----------

## NeddySeagoon

Markand,

Post your lspci -k, your /proc/cpuinfo and pastebin your kernel .config file.

Your panic message is  "Fatal exception in Interrupt".  That means somethng broke when the kernel was processing an Interrupt.

The lost Real Timce Click Interrups are a bad sign.

Do you really need selinux?

Getting that set up wrong can be a source of lots of issues.

----------

## Markand

Thanks for your fast answer!

# lspci -k

```

00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)

   Subsystem: Intel Corporation Device 0036

00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 02)

   Kernel driver in use: pcieport

00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

00:16.2 IDE interface: Intel Corporation 5 Series/3400 Series Chipset PT IDER Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

00:16.3 Serial controller: Intel Corporation 5 Series/3400 Series Chipset KT Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

   Kernel driver in use: serial

00:19.0 Ethernet controller: Intel Corporation 82578DC Gigabit Network Connection (rev 06)

   Subsystem: Intel Corporation Device 0037

   Kernel driver in use: e1000e

00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB Universal Host Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

   Kernel driver in use: uhci_hcd

00:1a.1 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB Universal Host Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

   Kernel driver in use: uhci_hcd

00:1a.2 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB Universal Host Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

   Kernel driver in use: uhci_hcd

00:1a.7 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

   Kernel driver in use: ehci_hcd

00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)

   Subsystem: Intel Corporation Device 0036

00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)

   Kernel driver in use: pcieport

00:1c.4 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 5 (rev 06)

   Kernel driver in use: pcieport

00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB Universal Host Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

   Kernel driver in use: uhci_hcd

00:1d.1 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB Universal Host Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

   Kernel driver in use: uhci_hcd

00:1d.2 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB Universal Host Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

   Kernel driver in use: uhci_hcd

00:1d.7 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

   Kernel driver in use: ehci_hcd

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a6)

00:1f.0 ISA bridge: Intel Corporation 5 Series Chipset LPC Interface Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

   Kernel driver in use: ahci

00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)

   Subsystem: Intel Corporation Device 0036

   Kernel driver in use: i801_smbus

01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Redwood [Radeon HD 5670]

   Subsystem: PC Partner Limited Device e166

   Kernel modules: radeon

01:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Redwood HDMI Audio [Radeon HD 5000 Series]

   Subsystem: PC Partner Limited Device aa60

03:00.0 Audio device: Creative Labs X-Fi Titanium series [EMU20k2] (rev 04)

   Subsystem: Creative Labs SB X-Fi Titanium PCI-e [SB0880]

   Kernel driver in use: snd_ctxfi

   Kernel modules: snd-ctxfi

3f:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)

   Subsystem: Intel Corporation Device 8086

3f:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)

   Subsystem: Intel Corporation Device 8086

3f:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)

   Subsystem: Intel Corporation Device 8086

3f:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)

   Subsystem: Intel Corporation Device 8086

3f:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)

   Subsystem: Intel Corporation Device 8086

3f:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)

   Subsystem: Intel Corporation Device 8086

```

# cat /proc/cpuinfo

```

processor   : 0

vendor_id   : GenuineIntel

cpu family   : 6

model      : 37

model name   : Intel(R) Core(TM) i3 CPU         540  @ 3.07GHz

stepping   : 5

microcode   : 0x2

cpu MHz      : 3059.000

cache size   : 4096 KB

physical id   : 0

siblings   : 4

core id      : 0

cpu cores   : 2

apicid      : 0

initial apicid   : 0

fpu      : yes

fpu_exception   : yes

cpuid level   : 11

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm arat dts tpr_shadow vnmi flexpriority ept vpid

bogomips   : 6118.83

clflush size   : 64

cache_alignment   : 64

address sizes   : 36 bits physical, 48 bits virtual

power management:

processor   : 1

vendor_id   : GenuineIntel

cpu family   : 6

model      : 37

model name   : Intel(R) Core(TM) i3 CPU         540  @ 3.07GHz

stepping   : 5

microcode   : 0x2

cpu MHz      : 3059.000

cache size   : 4096 KB

physical id   : 0

siblings   : 4

core id      : 0

cpu cores   : 2

apicid      : 1

initial apicid   : 1

fpu      : yes

fpu_exception   : yes

cpuid level   : 11

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm arat dts tpr_shadow vnmi flexpriority ept vpid

bogomips   : 6117.65

clflush size   : 64

cache_alignment   : 64

address sizes   : 36 bits physical, 48 bits virtual

power management:

processor   : 2

vendor_id   : GenuineIntel

cpu family   : 6

model      : 37

model name   : Intel(R) Core(TM) i3 CPU         540  @ 3.07GHz

stepping   : 5

microcode   : 0x2

cpu MHz      : 3059.000

cache size   : 4096 KB

physical id   : 0

siblings   : 4

core id      : 2

cpu cores   : 2

apicid      : 4

initial apicid   : 4

fpu      : yes

fpu_exception   : yes

cpuid level   : 11

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm arat dts tpr_shadow vnmi flexpriority ept vpid

bogomips   : 6117.68

clflush size   : 64

cache_alignment   : 64

address sizes   : 36 bits physical, 48 bits virtual

power management:

processor   : 3

vendor_id   : GenuineIntel

cpu family   : 6

model      : 37

model name   : Intel(R) Core(TM) i3 CPU         540  @ 3.07GHz

stepping   : 5

microcode   : 0x2

cpu MHz      : 3059.000

cache size   : 4096 KB

physical id   : 0

siblings   : 4

core id      : 2

cpu cores   : 2

apicid      : 5

initial apicid   : 5

fpu      : yes

fpu_exception   : yes

cpuid level   : 11

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt lahf_lm arat dts tpr_shadow vnmi flexpriority ept vpid

bogomips   : 6117.66

clflush size   : 64

cache_alignment   : 64

address sizes   : 36 bits physical, 48 bits virtual

power management:

```

And the kernel config file: http://markand.malikania.fr/panic/config.txt

The panic occurs some time on my laptop too (Radeon 4330).

 *Quote:*   

> 
> 
> Do you really need selinux?
> 
> Getting that set up wrong can be a source of lots of issues.
> ...

 

No I don't need it at all, I'll disable it.

----------

## NeddySeagoon

Markand,

Turning off selinux is the first test.  If you still have problems, I'll look at your last post in some detail.

----------

## Markand

Still panic without selinux.. 

I disabled Security options -> NSA SELinux Support. Is that correct?

Cheers,

----------

