public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/60624] New: creation of working linux sparc32 kernel fails
@ 2014-03-23 13:02 wbx at openadk dot org
  2014-03-23 17:05 ` [Bug c/60624] " ebotcazou at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: wbx at openadk dot org @ 2014-03-23 13:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60624
           Summary: creation of working linux sparc32 kernel fails
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wbx at openadk dot org

Hi,

recently I updated my gcc 4.7.3 based cross-toolchain to 4.8.2. Since then my
sparc32 kernel does not boot in qemu-system-sparc anymore.
I used git bisect to find following commit, which breaks it:
http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=190291
Bug fixed with this commit:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54109

When reverting the change in gcc 4.8.2, system boots up fine again.
Can anybody explain me, why removing an optimization in gcc, breaks the Linux
kernel bootup? 

You can find a working and a broken kernel on http://www.openadk.org/sparc
including disassembled versions. The bug happens with at least 3.13.6, 3.12.13,
3.11.10, 3.10.33 and 3.4.82.

Oops on boot with Qemu 1.7.0: qemu-system-sparc -M SS-5 -nographic -kernel
vmlinux.broken:
CPUs: 1 x FMI,MB86904
UUID: 00000000-0000-0000-0000-000000000000
Welcome to OpenBIOS v1.1 built on Oct 2 2013 22:57
  Type 'help' for detailed information
[sparc] Kernel already loaded
switching to new context:
PROMLIB: obio_ranges 1
PROMLIB: Sun Boot Prom Version 3 Revision 2
Linux version 3.13.6 (wbx@kop-brodkorbw) (gcc version 4.8.2 (GCC) ) #2 Sun Mar
23 12:11:57 CET 2014
bootconsole [earlyprom0] enabled
ARCH: SUN4M
TYPE: SPARCstation 5
Ethernet address: 52:54:00:12:34:56
OF stdout device is: /obio/zs@0,100000:a
PROM: Built device tree with 22213 bytes of memory.
Booting Linux...
Power off control detected.
Unable to handle kernel NULL pointer dereference
tsk->{mm,active_mm}->context = ffffffff
tsk->{mm,active_mm}->pgd = fc000000
              \|/ ____ \|/
              "@'/ ,. \`@"
              /_| \__/ |_\
                 \__U_/
swapper(0): Oops [#1]
CPU: 0 PID: 0 Comm: swapper Not tainted 3.13.6 #2
task: f0251eb8 ti: f0248000 task.ti: f0248000
PSR: 04001fc4 PC: f026d9ec NPC: f026d9f0 Y: 00000000    Not tainted
PC: <pcpu_setup_first_chunk+0x590/0x74c>
%G: f03d2c58 000000ff  00000000 00000001  f0401000 0000075b  f0248000 00000000
%O: 00000000 00000000  00000000 00000001  00000001 0000002c  f0249e70 f026d9ac
RPC: <pcpu_setup_first_chunk+0x550/0x74c>
%L: f0250000 f0250000  00000000 f0250000  00000001 00000001  00000000 00000000
%I: f074fbe0 f0751000  00000008 f03d3000  00008000 f0759100  f0249ed0 f026dc1c
Disabling lock debugging due to kernel taint
Caller[f026dc1c]: setup_per_cpu_areas+0x74/0x98
Caller[f0263a68]: start_kernel+0x104/0x3cc
Caller[f026343c]: continue_boot+0x324/0x334
Caller[f0263048]: execute_in_high_mem+0x48/0x98
Instruction DUMP: 82006001  8328c001  82007fff <c2208012> c2062004  80a06000 
2280000b  f8276008  c2276008 
Kernel panic - not syncing: Attempted to kill the idle task!
Press Stop-A (L1-A) to return to the boot prom

Thanks for any help in advance.
 Waldemar


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

* [Bug c/60624] creation of working linux sparc32 kernel fails
  2014-03-23 13:02 [Bug c/60624] New: creation of working linux sparc32 kernel fails wbx at openadk dot org
@ 2014-03-23 17:05 ` ebotcazou at gcc dot gnu.org
  2014-03-23 18:33 ` wbx at openadk dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-03-23 17:05 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2014-03-23
                 CC|                            |ebotcazou at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> recently I updated my gcc 4.7.3 based cross-toolchain to 4.8.2. Since then
> my sparc32 kernel does not boot in qemu-system-sparc anymore.
> I used git bisect to find following commit, which breaks it:
> http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=190291
> Bug fixed with this commit:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54109
> 
> When reverting the change in gcc 4.8.2, system boots up fine again.
> Can anybody explain me, why removing an optimization in gcc, breaks the
> Linux kernel bootup? 

Probably because this uncovered a latent optimization bug.  Can you try the
latest snapshot of the 4.8 branch (or the branch from the SVN repository)?


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

* [Bug c/60624] creation of working linux sparc32 kernel fails
  2014-03-23 13:02 [Bug c/60624] New: creation of working linux sparc32 kernel fails wbx at openadk dot org
  2014-03-23 17:05 ` [Bug c/60624] " ebotcazou at gcc dot gnu.org
@ 2014-03-23 18:33 ` wbx at openadk dot org
  2014-03-23 18:34 ` wbx at openadk dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: wbx at openadk dot org @ 2014-03-23 18:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Waldemar Brodkorb <wbx at openadk dot org> ---
Created attachment 32431
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32431&action=edit
shell script to compile toolchain and kernel


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

* [Bug c/60624] creation of working linux sparc32 kernel fails
  2014-03-23 13:02 [Bug c/60624] New: creation of working linux sparc32 kernel fails wbx at openadk dot org
  2014-03-23 17:05 ` [Bug c/60624] " ebotcazou at gcc dot gnu.org
  2014-03-23 18:33 ` wbx at openadk dot org
@ 2014-03-23 18:34 ` wbx at openadk dot org
  2014-03-24  7:43 ` ebotcazou at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: wbx at openadk dot org @ 2014-03-23 18:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Waldemar Brodkorb <wbx at openadk dot org> ---
same problem exist with gcc 4.8 git branch:

Linux version 3.13.6 (wbx@kop-brodkorbw) (gcc version 4.8.3 20140317
(prerelease) (GCC) ) #19 Sun Mar 23 19:23:11 CET 2014
bootconsole [earlyprom0] enabled
ARCH: SUN4M
TYPE: SPARCstation 5
Ethernet address: 52:54:00:12:34:56
OF stdout device is: /obio/zs@0,100000:a
PROM: Built device tree with 22213 bytes of memory.
Booting Linux...
Power off control detected.
Unable to handle kernel NULL pointer dereference
tsk->{mm,active_mm}->context = ffffffff
tsk->{mm,active_mm}->pgd = fc000000
              \|/ ____ \|/
              "@'/ ,. \`@"
              /_| \__/ |_\
                 \__U_/
swapper(0): Oops [#1]


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

* [Bug c/60624] creation of working linux sparc32 kernel fails
  2014-03-23 13:02 [Bug c/60624] New: creation of working linux sparc32 kernel fails wbx at openadk dot org
                   ` (2 preceding siblings ...)
  2014-03-23 18:34 ` wbx at openadk dot org
@ 2014-03-24  7:43 ` ebotcazou at gcc dot gnu.org
  2014-03-24  8:57 ` [Bug target/60624] " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-03-24  7:43 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.9.0                       |4.8.2

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Any idea about which part/module/file of the kernel doesn't work correctly?


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

* [Bug target/60624] creation of working linux sparc32 kernel fails
  2014-03-23 13:02 [Bug c/60624] New: creation of working linux sparc32 kernel fails wbx at openadk dot org
                   ` (3 preceding siblings ...)
  2014-03-24  7:43 ` ebotcazou at gcc dot gnu.org
@ 2014-03-24  8:57 ` jakub at gcc dot gnu.org
  2014-03-24 20:24 ` wbx at openadk dot org
  2014-09-19 11:09 ` wbx at openadk dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-24  8:57 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yeah, it would be nice if you could bisect between objects compiled either with
4.7.3 or with 4.8.x with the change reverted and objects compiled with vanilla
4.8.x and narrow it down to at least a particular *.o file (all *.o compiled
with 4.7.3 but that single object would fail to boot, all *.o compiled with
vanilla 4.8.x but that single object would boot properly).


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

* [Bug target/60624] creation of working linux sparc32 kernel fails
  2014-03-23 13:02 [Bug c/60624] New: creation of working linux sparc32 kernel fails wbx at openadk dot org
                   ` (4 preceding siblings ...)
  2014-03-24  8:57 ` [Bug target/60624] " jakub at gcc dot gnu.org
@ 2014-03-24 20:24 ` wbx at openadk dot org
  2014-09-19 11:09 ` wbx at openadk dot org
  6 siblings, 0 replies; 8+ messages in thread
From: wbx at openadk dot org @ 2014-03-24 20:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Waldemar Brodkorb <wbx at openadk dot org> ---
Hi,

if I understand it correctly. I uploaded percpu.o which creates the bad kernel,
when used. percpu.o.b is compiled with gcc 4.8.2. percpu.o.w is created with
4.8.2 with the back port patch. Again here: http://www.openadk.org/sparc/

best regards
 Waldemar


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

* [Bug target/60624] creation of working linux sparc32 kernel fails
  2014-03-23 13:02 [Bug c/60624] New: creation of working linux sparc32 kernel fails wbx at openadk dot org
                   ` (5 preceding siblings ...)
  2014-03-24 20:24 ` wbx at openadk dot org
@ 2014-09-19 11:09 ` wbx at openadk dot org
  6 siblings, 0 replies; 8+ messages in thread
From: wbx at openadk dot org @ 2014-09-19 11:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60624

Waldemar Brodkorb <wbx at openadk dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Waldemar Brodkorb <wbx at openadk dot org> ---
Fixed by following kernel change:
http://patchwork.ozlabs.org/patch/384285/


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

end of thread, other threads:[~2014-09-19 11:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-23 13:02 [Bug c/60624] New: creation of working linux sparc32 kernel fails wbx at openadk dot org
2014-03-23 17:05 ` [Bug c/60624] " ebotcazou at gcc dot gnu.org
2014-03-23 18:33 ` wbx at openadk dot org
2014-03-23 18:34 ` wbx at openadk dot org
2014-03-24  7:43 ` ebotcazou at gcc dot gnu.org
2014-03-24  8:57 ` [Bug target/60624] " jakub at gcc dot gnu.org
2014-03-24 20:24 ` wbx at openadk dot org
2014-09-19 11:09 ` wbx at openadk 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).