public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/24644]  New: gcc-4.1 compiled ppc64 kernels do not boot
@ 2005-11-02 20:40 olh at suse dot de
  2005-11-02 20:41 ` [Bug middle-end/24644] [4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (26 more replies)
  0 siblings, 27 replies; 28+ messages in thread
From: olh at suse dot de @ 2005-11-02 20:40 UTC (permalink / raw)
  To: gcc-bugs

I do not have a reduced testcase, nor do I know what the real cuplprit is.
kernel compiled with gcc-4_0-branch boot ok, but gcc-mainline fails to boot.
Linux kernel 2.6.14, arch/ppc64/defconfig, do not boot on POWER5.
They hang early in SMP init because a spinlock was unlocked twice.
Enabling CONFIG_DEBUG_SPINLOCK and adding a few extra printk will show this:


....
Linux version 2.6.14 (olaf@pomegranate) (gcc version 4.1.0 20051102
(experimental)) #61 SMP Wed Nov 2 19:47:05 UTC 2005
....
Memory: 495732k/524288k available (5004k kernel code, 27528k reserved, 1340k
data, 2394k bss, 380k init)
374.78 BogoMIPS (lpj=749568)
Mount-cache hash table entries: 256
softlockup thread 0 started up.
Processor 1 found.
Brought up 2 CPUs
BUG: spinlock already unlocked on CPU#1, migration/1/5
c0 .schedule+0x3fc/0x870c1 .kthread+0xf0/0x170 lock: c0000000142a6100, .magic:
dead4ead, .owner: swapper/1,c0000000004dbc0c,c00000000007b9c0 .owner_cpu: -1
Call Trace:
[c000000000e33c30] [c00000000021d2ec] .spin_bug+0xcc/0x150 (unreliable)
[c000000000e33cc0] [c00000000021d444] ._raw_spin_unlock+0xd4/0xe0
[c000000000e33d50] [c0000000004ddfa4] ._spin_unlock_irq+0xa4/0xe0
[c000000000e33de0] [c0000000004dbc0c] .schedule+0x3fc/0x870
[c000000000e33ee0] [c00000000007b9c0] .kthread+0xf0/0x170
[c000000000e33f90] [c000000000010948] .kernel_thread+0x4c/0x68
kernel BUG in spin_bug at
/home/olaf/kernel/olh/gcc41/linux-2.6.14-olh/lib/spinlock_debug.c:34!
cpu 0x1: Vector: 700 (Program Check) at [c000000000e339b0]
pc: c00000000021d2f0: .spin_bug+0xd0/0x150
lr: c00000000021d2ec: .spin_bug+0xcc/0x150
sp: c000000000e33c30
msr: 8000000000021032
current = 0xc00000000ffd2040
paca    = 0xc000000000619000
pid   = 5, comm = migration/1
kernel BUG in spin_bug at
/home/olaf/kernel/olh/gcc41/linux-2.6.14-olh/lib/spinlock_debug.c:34!
enter ? for help
1:mon>


In this case, spinlock at c0000000142a6100 is used correctly in a
schedule_tail() and schedule()
call. Later, schedule() starts to use a spinlock at ..142ae100, then suddenly
calls the unlock
with ...142a6100.
I currently do not know if the code in kernel/schedule.c is miscompiled, or if
the breakage is
somewhere else.
If I replace the schedule.o with a gcc40 compiled version, things get further,
but die later
during kernel init due to wrong pointer dereferencing. Perhaps the object files
generated
with gcc-4_0-branch and gcc-mainline are somewhat incompatible.

<7>_spin_lock_irq(85) swapper(1):c0,j4294892318 l 13ff8f28
<7>_spin_unlock_irq(292) swapper(1):c0,j4294892318 l 13ff8f28
<7>_spin_lock_irq(85) swapper(1):c0,j4294892318 l 13ff8e90
<7>_spin_unlock_irq(292) swapper(1):c0,j4294892318 l 13ff8e90
<7>_spin_lock_irq(85) swapper(1):c0,j4294892318 l 00e17be8
<7>_spin_unlock_irq(292) swapper(1):c0,j4294892318 l 00e17be8
<7>_spin_lock_irq(85) swapper(1):c0,j4294892318 l 142a6100
<7>schedule_tail(1552) swapper(6):c0,j4294892318 c0000000142a6100
<7>_spin_unlock_irq(292) swapper(6):c0,j4294892318 l 142a6100
<7>_spin_lock_irq(85) swapper(6):c0,j4294892318 l 00e2c8d0
<7>_spin_unlock_irq(292) swapper(6):c0,j4294892318 l 00e2c8d0
<7>_spin_lock_irq(85) swapper(6):c0,j4294892318 l 142a6100
<7>schedule(3019) swapper(1):c0,j4294892318 c0000000142a6100
<7>_spin_unlock_irq(292) swapper(1):c0,j4294892318 l 142a6100
<7>_spin_lock_irq(85) swapper(1):c0,j4294892318 l 00e17be8
<7>_spin_unlock_irq(292) swapper(1):c0,j4294892318 l 00e17be8
<7>_spin_lock_irq(85) swapper(1):c0,j4294892318 l 00e17bf8
<7>_spin_unlock_irq(292) swapper(1):c0,j4294892318 l 00e17bf8
<7>_spin_lock_irq(85) swapper(1):c0,j4294892318 l 142a6100
<7>schedule_tail(1552) swapper(7):c0,j4294892318 c0000000142a6100
<7>_spin_unlock_irq(292) swapper(7):c0,j4294892318 l 142a6100
<7>_spin_lock_irq(85) swapper(7):c0,j4294892318 l 00e2f9e0
<7>_spin_unlock_irq(292) swapper(7):c0,j4294892318 l 00e2f9e0
<7>_spin_lock_irq(85) swapper(7):c0,j4294892318 l 142a6100
<7>schedule(3019) swapper(1):c0,j4294892318 c0000000142a6100
<7>_spin_unlock_irq(292) swapper(1):c0,j4294892318 l 142a6100
<7>_spin_lock_irq(85) swapper(1):c0,j4294892318 l 00e17bf8
<7>_spin_unlock_irq(292) swapper(1):c0,j4294892318 l 00e17bf8
<4>Processor 1 found.
<7>_spin_lock_irq(85) swapper(0):c1,j4294892318 l 142ae100
<6>Brought up 2 CPUs
<7>schedule(3019) swapper(1):c0,j4294892318 c0000000142a6100
<7>_spin_unlock_irq(292) migration/1(5):c1,j4294892318 l 142a6100
<4>BUG: spinlock already unlocked on CPU#1, migration/1/5
<4>c0 .schedule+0x3fc/0x870c1 .kthread+0xf0/0x170 lock: c0000000142a6100,
.magic: dead4ead, .owner: swapper/1,c0000000004dbc0c,c00000000007b9c0
.owner_cpu: -1
<4>Call Trace:
<4>[c000000000e33c30] [c00000000021d2ec] .spin_bug+0xcc/0x150 (unreliable)
<4>[c000000000e33cc0] [c00000000021d444] ._raw_spin_unlock+0xd4/0xe0
<4>[c000000000e33d50] [c0000000004ddfa4] ._spin_unlock_irq+0xa4/0xe0
<4>[c000000000e33de0] [c0000000004dbc0c] .schedule+0x3fc/0x870
<4>[c000000000e33ee0] [c00000000007b9c0] .kthread+0xf0/0x170
<4>[c000000000e33f90] [c000000000010948] .kernel_thread+0x4c/0x68
<2>kernel BUG in spin_bug at
/home/olaf/kernel/olh/gcc41/linux-2.6.14-olh/lib/spinlock_debug.c:34!
1:mon>


-- 
           Summary: gcc-4.1 compiled ppc64 kernels do not boot
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: olh at suse dot de
 GCC build triplet: powerpc64-linux
  GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24644


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2005-11-11 18:00 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-02 20:40 [Bug c/24644] New: gcc-4.1 compiled ppc64 kernels do not boot olh at suse dot de
2005-11-02 20:41 ` [Bug middle-end/24644] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-11-02 20:49 ` olh at suse dot de
2005-11-03  6:46 ` mmitchel at gcc dot gnu dot org
2005-11-03  8:24 ` olh at suse dot de
2005-11-03 12:58 ` olh at suse dot de
2005-11-03 13:05 ` olh at suse dot de
2005-11-03 13:32 ` olh at suse dot de
2005-11-03 21:30 ` olh at suse dot de
2005-11-03 21:48 ` bergner at vnet dot ibm dot com
2005-11-03 22:05 ` olh at suse dot de
2005-11-04  5:48 ` ian at airs dot com
2005-11-04  5:52 ` bergner at vnet dot ibm dot com
2005-11-04  7:18 ` olh at suse dot de
2005-11-04  7:46 ` olh at suse dot de
2005-11-04 16:09 ` ian at airs dot com
2005-11-04 17:38 ` bergner at vnet dot ibm dot com
2005-11-04 18:00 ` pinskia at gcc dot gnu dot org
2005-11-04 18:06 ` pinskia at gcc dot gnu dot org
2005-11-04 18:07 ` [Bug tree-optimization/24644] " pinskia at gcc dot gnu dot org
2005-11-04 18:21 ` pinskia at gcc dot gnu dot org
2005-11-04 18:33 ` pinskia at gcc dot gnu dot org
2005-11-04 19:15 ` olh at suse dot de
2005-11-04 21:21 ` [Bug c/24644] " pinskia at gcc dot gnu dot org
2005-11-05 20:31 ` olh at suse dot de
2005-11-09 12:34 ` pinskia at gcc dot gnu dot org
2005-11-09 12:34 ` pinskia at gcc dot gnu dot org
2005-11-11 18:00 ` dje at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).