Bug 7106 - gcc 4.1.1 makes kernel crash on VIA C3 system
Summary: gcc 4.1.1 makes kernel crash on VIA C3 system
Status: REJECTED INSUFFICIENT_DATA
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: i386 Linux
: P2 high
Assignee: other_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-03 12:59 UTC by Mark
Modified: 2006-10-05 06:40 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.17.11
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
config-2.6.17.11 (47.61 KB, application/octet-stream)
2006-09-05 13:30 UTC, Mark
Details

Description Mark 2006-09-03 12:59:30 UTC
Most recent kernel where this bug did not occur: 2.6.17.11
Distribution: Gentoo Linux, kernel from kernel.org, no patches
Hardware Environment: x86, VIA C3-2
Software Environment: recent stable Gentoo Linux
Problem Description:

compiled kernel with gcc 3.4.6 and -Os and with gcc 4.1.1 and -Os: random
crashes while compiling non-kernel packages, often during configure step. Trying
on kernel without -Os optimization now. Seems to work that way. Never had a
problem building on the -Os optimized kernel using gcc 3.4.6.

Steps to reproduce:
Comment 1 Mark 2006-09-03 13:00:56 UTC
Maybe I should add that the system crashed entirely. Could not log into the
machine and loggers stopped recording.
Comment 2 Mark 2006-09-03 13:02:27 UTC
Please ignore the "Most recent kernel where this bug did not occur" part.
Comment 3 Adrian Bunk 2006-09-03 15:48:10 UTC
This could be a bug in your gcc or a bug in the kernel exposed only by -Os.

It's hard to debug without any additional information.

You said you never had a problem before.
Which is the most recent kernel that works for you with -Os?
Can you confirm that your current gcc 3.4.6 builds a working version of this
older kernel?
Comment 4 Mark 2006-09-03 16:35:50 UTC
You probably misunderstood me. The only kernel version I'm talking of is
2.6.17.11. Never tried gcc 4.1.1 on any before that. gcc 3.4.6 always worked
fine with size optimizations enabled in the kernel config.

It is only since gcc 4.1.1 (don't know whether that applies to previous kernel
versions, too) that I detect problems when compiling apps on a size-optimized
kernel. I have recompiled the kernel again, this time without the optimization.
gcc 4.1.1 seems to run properly now.
Comment 5 Adrian Bunk 2006-09-03 16:49:28 UTC
So gcc 3.4.6 builds your 2.6.17.11 with -Os, and this kernel works without any
problems? (I'm trying to understand whether the gcc update or a kernel update
causes your issue)

I don't remember having seen any recent gcc 4.1.1 -Os micompilation on i386.

Can you turn on all debug options in the kernel and check whether you can get
any output at the console?

Please attach the following:
- dmesg from a -O2 2.6.17.11
- dmesg from a -Os 2.6.17.11
- your .config
Comment 6 Mark 2006-09-04 05:39:07 UTC
Hmmm... I cannot reproduce the problem any more. Looks like it was some
intermediary bootstrapping issue due to an "unclean/mixed" toolchain.
Comment 7 Mark 2006-09-05 13:28:38 UTC
Ok, the problem is still there. I had enabled all debug options for the -Os
optimized kernel and it crashed. But I don't see any log messages in my log
files... the system seems to just stop.
Comment 8 Mark 2006-09-05 13:30:57 UTC
Created attachment 8945 [details]
config-2.6.17.11
Comment 9 Mark 2006-09-13 10:49:21 UTC
Reinstalled last system backup before upgrade to gcc 4.1.1. I recompiled the
whole system using gcc 3.4.6 without any instability issues (this time I masked
the gcc4 package on my Gentoo Linux system). It is definitely the gcc 4.1.1
compiler that makes the kernel crash on my VIA C3 system. The problem does not
exist on my Athlon XP system.
Comment 10 Mark 2006-09-13 10:55:07 UTC
processor	: 0
vendor_id	: CentaurHauls
cpu family	: 6
model		: 9
model name	: VIA Nehemiah
stepping	: 8
cpu MHz		: 1202.802
cache size	: 64 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr cx8 sep mtrr pge cmov pat mmx fxsr sse up rng
rng_en ace ace_en
bogomips	: 2407.62
Comment 11 Dan Carpenter 2006-09-15 01:34:18 UTC
There's a Fedoro Core 5 bug on this as well.  FC5 is using gcc-4.1.0.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=186852
Comment 12 Mark 2006-09-15 02:00:14 UTC
I don't see any connection to the RedHat bug: neither does the problem go away
when -Os is disabled during kernel compilation, nor does the problem occur
during low load situations, nor is there any connection to VIA C3 hardware in
the RedHat bug.
Comment 13 Dan Carpenter 2006-09-15 02:24:55 UTC
Read zleite's commments.  He's saying that when he doesn't have
CONFIG_CC_OPTIMIZE_FOR_SIZE set his system works.

That's the same as what you wrote:  "Trying on kernel without -Os optimization
now. Seems to work that way."

Comment 14 Mark 2006-09-15 02:41:26 UTC
That's what I said first. I had to revise it.
Comment 15 Mark 2006-10-05 06:40:26 UTC
Problem is not there any more after I have upgraded the Gentoo Linux system
profile to the recent non-SELinux profile and after having recompiled the
system. I'm also running a non-SELinux kernel now. Maybe there is a bug with the
kernel SE Linux.

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