# [SOLVED] Kernel panic "IO-APIC + timer" on 2.6.36-gentoo-r5

## marco1475

Hi,

I emerged the newest (for ~x86) gentoo-sources, 2.6.36-gentoo-r5 and during booting I get the following kernel panic:

```
Kernel panic - not syncing: IO-APIC + timer doesn't work!  Boot with apic=debug and send a report.  Then try booting with the 'noapic' option.
```

The strange thing is that up until this new revision everything worked fine. I can still boot and run 2.6.36-gentoo-r4 and the .config is the same - I just copied it from r4 to r5 and then built the kernel.

I found several postings about this particular kernel panic and most recommended BIOS updates for the ASUS motherboards in question. (I might add that I am using an ASUS netbook.) So I updated my BIOS but it didn't help. I don't know what changed between r4 and r5 versions of the kernel, but it seems strange that it would break now - I'd expect breakage between 2.6.35 and 2.6.36, but not between "small" Gentoo kernel revisions.

My kernel .config can be found here.

Any ideas what could be causing this? I could boot using the 'noapic' option, but it seems to me to be hiding the issue rather than resolving it.

Thanks,

Marek

----------

## roarinelk

Try a newer kernel (e.g. git-sources), boot with the "apic=debug" kernel option and send

the resulting dmesg (along with a problem description) to LKML (linux-kernel@vger.kernel.org)

The kernel devs are usually better than Gentoo Forums at figuring out kernel problems :)

----------

## kompak

I have the exact same error. Seems like the bug is in gcc or something else as I tested gentoo-sources 2.6.36-r4 and 2.6.36-r1 which works but not any more after recompile. I recently migrated to gcc 4.5* from 4.4* so maybe thats the problem. What ever causes this I don't know but it's pretty serious as I have no way to compile a working kernel at the moment. And I would need to change my kernel config to compile my WLAN drivers so I'm stuck whit out Internet access until this is resolved. Guess I'll just have to test all possible gcc+kernel combinations to begin with.

EDIT: Forgot to mention that noapic doesn't work either it just hangs the whole kernel.

----------

## roarinelk

maybe update binutils as well (2.21.51.0.4).  I've built dozens of kernels for various machines with gcc-4.5

and never had any issues.

----------

## kompak

I doubt it has anything to do with binutils as gentoo-sources-2.6.36-r1 compiled fine with 2.21 which I'm still using. I tried vanilla-sources-2.6.37-rc5 and got the exact same error. Going to try downgrading gcc next.

----------

## Hu

If I read the patch log from mpagano correctly, then -r4 was based on 2.6.36 and -r5 was based on 2.6.36.1, so there are 66 upstream commits present in -r5 versus -r4, not counting any changes made by the Gentoo kernel team.  You can check this analysis via Gentoo 2.6.36 Releases.  If the gcc change does not provide any hints, please compare =sys-kernel/vanilla-sources-2.6.36 and =sys-kernel/vanilla-sources-2.6.36.1.  If 2.6.36 works and 2.6.36.1 fails, then the problem is in a patch that Gentoo pulled from upstream.

----------

## kompak

No luck with either vanilla-sources-2.6.36 or 2.6.36.1 compiled with gcc 4.5.1 and 4.4.4-r2 (latest stable). Today I got some weird glibc errors from various programs so now I'll try recompiling glibc and the kernel afterwards to see if maybe my glibc was broken. I also noticed this while compiling the kernel, don't know if it's relevant.

```

arch/x86/kernel/apic/apic.c: In function 'lapic_suspend':

arch/x86/kernel/apic/apic.c:2014:3: warning: statement with no effect

arch/x86/kernel/apic/apic.c: In function 'lapic_resume':

arch/x86/kernel/apic/apic.c:2091:3: warning: statement with no effect

```

----------

## roarinelk

gcc-4.5 makes those warnigs.  Please try latest -git sources, and if they don't work open a 

bug on bugzilla.kernel.org with complete error and system description.  Thanks.

----------

## kompak

No luck with gcc 4.4.5 or 4.5.1 and the 3 latest gentoo-sources, vanilla-sources or git-sources all with fresh configs. There already is a bug open at https://bugs.gentoo.org/show_bug.cgi?id=349325. There seems to be nothing more I can try so I'll have to stay with the currently working kernel binary and no wlan.

----------

## marco1475

I am glad I am not the only one with this problem. The GCC theory, even though kompak seems to have disproved it, sounds likely, because if I remember correctly I did upgrade GCC to 4.5.1-r1 between the kernel r4 and r5 (r4 is my last working version). I haven't tried recompiling kernel r4, but r5 and r6 produce the same panic.

If anyone finds a solution please post it here - while I can exist with kernel r4 I would hate not to be able to upgrade kernels anymore.

Thanks,

----------

## kompak

After searching the Gentoo bugzilla I found this bug https://bugs.gentoo.org/show_bug.cgi?id=349113 that might be related. So I'm running tests on different combinations of GCC 4.5.2 and various kernels.

----------

## kompak

Well finally here's the answer https://bugzilla.kernel.org/show_bug.cgi?id=25952. I disabled CONFIG_CRASH_DUMP and CONFIG_RELOCATABLE and now I can build a working kernel. Haven't tried changing the CONFIG_PHYSICAL_START, but that should also work.

----------

## marco1475

 *kompak wrote:*   

> Haven't tried changing the CONFIG_PHYSICAL_START, but that should also work.

 

I just tried CONFIG_PHYSICAL_START with kernel 2.6.37-gentoo and it works as well. Phew, what a relief  :Smile: 

----------

## mickwd

I had something very similar with a Gigabyte motherboard.

Was getting the same failures with all kernels from gentoo-sources-2.6.36-r4 to gentoo-sources-2.6.37.

Tried building the DSDT to fix the BIOS (which it turns out was a little buggy) but this didn't fix it (i.e. the BIOS errors didn't actually matter in this case).

The problem I was falling over is this one: https://bugs.gentoo.org/show_bug.cgi?id=348782

and I suspect quite a few people are also. It may be that changing kernel options avoids the problem in binutils that causes this.

In my case, downgrading to binutils-2.20.1-r1 (since I'm running ~86) and rebuilding the kernels from scratch (after doing "make mrproper" to clear out previous kernel builds) allowed both gentoo-sources-2.6.36-r4 and gentoo-sources-2.6.37 to boot successfully (I didn't try any intermediate kernels).

Hope this helps, because it turned out to be a very misleading problem.

----------

## Havin_it

So it's necessary to hack arch/x86/Kconfig if you want to enable CONFIG_RELOCATABLE or CONFIG_CRASH_DUMP (else it'll overwrite your amended value for CONFIG_PHYSICAL_START)?

That's a bit of an issue. I hope kernel upstream come up with a better approach here, I don't fancy having to do that for every new kernel on 3 machines (only been a panic victim on 1 so far but not taking any chances with the others).

----------

## bwooce

I've been going loopy trying to rebuild a kernel on my new D510MO Intel Atom board...the old kernel worked but any recompile, with the old config, on any of the kernels I had would break. So I was struck with an old non-SMP kernel.

I disabled CONFIG_CRASH_DUMP and CONFIG_RELOCATABLE, did a make clean, and the rebuilt kernel works fine now.

I've rebuilt my kernel about 12 times over the past week trying to fix this (different gcc, kernels, configs), and on an Atom that isn't a fast process (on one core). 

Thanks again.

----------

