[#6542] run gcc multi-ix.c case fails now

Document created by Aaronwu Employee on Oct 17, 2013
Version 1Show Document
  • View in full screen mode

[#6542] run gcc multi-ix.c case fails now

Submitted By: Mingquan Pan

Open Date

2011-04-13 00:20:13     Close Date

2011-04-27 23:10:51

Priority:

High     Assignee:

Mingquan Pan

Stuart Henderson

Board:

N/A     Silicon Revision:

Resolution:

Fixed     Fixed In Release:

2011R1

Processor:

ALL     

Host Operating System:

toolchain rev.:

head     kernel rev.:

State:

Closed     Found In Release:

2011R1

Is this bug repeatable?:

N/A     

Summary: run gcc multi-ix.c case fails now

Details:

 

run gcc multi-ix.c case fails now by running on either the head kernel or 2010 rc4 kernel built by trunk head toolchain. It would stop at random multi-ix.c cases and always make kernel panic and reboot.

 

Test Run By test on Wed Apr 13 11:33:53 2011

Target is bfin-unknown-uclinux

Host   is i686-pc-linux-gnu

 

                === gcc tests ===

 

Schedule of variations:

    bfin-uclinux

 

Running target bfin-uclinux

Running /home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/execute.exp ...

PASS: gcc.c-torture/execute/multi-ix.c compilation,  -O0

FAIL: gcc.c-torture/execute/multi-ix.c execution,  -O0

PASS: gcc.c-torture/execute/multi-ix.c compilation,  -O1

FAIL: gcc.c-torture/execute/multi-ix.c execution,  -O1

PASS: gcc.c-torture/execute/multi-ix.c compilation,  -O2

FAIL: gcc.c-torture/execute/multi-ix.c execution,  -O2

PASS: gcc.c-torture/execute/multi-ix.c compilation,  -O3 -fomit-frame-pointer

 

                === gcc Summary ===

 

# of expected passes            4

# of unexpected failures        3

/home/test/work/cruise/temp/bfin-uclinux/bin/bfin-uclinux-gcc  version 4.3.5 (ADI-trunk/svn-5258)

 

 

On the target, it would got something like:

 

testing uclinux gcc

Jump to NULL address

Kernel OOPS in progress

Deferred Exception context

CURRENT PROCESS:

COMM=multi-ix.x7.261 PID=325  CPU=0

invalid mm

return address: [0x(null)]; contents of:

 

ADSP-BF527-0.2 525(MHz CCLK) 131(MHz SCLK) (mpu off)

Linux version 2.6.34.7-ADI-2010R1-svn9508 (test@45-bf527-toolchain) (gcc version 4.3.5 (ADI-trunk/svn-5258) ) #4 Tue Apr 12 18:19:58 CST 2011

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 0006202d  IPEND: 8008  IMASK: 001f  SYSCFG: 0006

  Peripheral interrupts masked off

  Kernel interrupts masked off

  EXCAUSE   : 0x2d

  physical IVG3 asserted : <0xffa00740> { _trap + 0x0 }

  physical IVG15 asserted : <0xffa00df4> { _evt_system_call + 0x0 }

  logical irq   6 mapped  : <0xffa0039c> { _bfin_coretmr_interrupt + 0x0 }

  logical irq  21 mapped  : <0x000b12d4> { _bfin_rtc_interrupt + 0x0 }

  logical irq  31 mapped  : <0x000a33b0> { _bfin_serial_dma_rx_int + 0x0 }

  logical irq  32 mapped  : <0x000a3124> { _bfin_serial_dma_tx_int + 0x0 }

  logical irq  35 mapped  : <0x000af3b8> { _bfin_mac_interrupt + 0x0 }

RETE: <0x00000000> /* Maybe null pointer? */

RETN: <0x02867cb4> /* kernel dynamic memory (maybe user-space) */

RETX: <0x00000480> /* Maybe fixed code section */

RETS: <0x0000b64e> { ___wake_up_common + 0x3a }

PC  : <0x00000000> /* Maybe null pointer? */

DCPLB_FAULT_ADDR: <0x02817eec> /* kernel dynamic memory (maybe user-space) */

ICPLB_FAULT_ADDR: <0x00000000> /* Maybe null pointer? */

PROCESSOR STATE:

R0 : 02817ee4    R1 : 00000001    R2 : 00000001    R3 : 02811e48

R4 : 00000001    R5 : 0205f3a0    R6 : 00000001    R7 : 00000000

P0 : 00000010    P1 : 02817ee4    P2 : 00000000    P3 : 00000001

P4 : 02811e48    P5 : fffffff4    FP : 02867cc4    SP : 02867bd8

LB0: 02820a71    LT0: 02820a70    LC0: 00000000

LB1: 00033eea    LT1: 00033e36    LC1: 00000008

B0 : 00000000    L0 : 00000000    M0 : 00000004    I0 : 0016ca70

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 00000000

B2 : 00000000    L2 : 00000000    M2 : 00000000    I2 : 00000000

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000

A0.w: 00199999   A0.x: 00000000   A1.w: 000003f6   A1.x: 00000000

USP : 02834ee4  ASTAT: 02003004

 

Hardware Trace:

   0 Target : <0x00003f00> { _trap_c + 0x0 }

     Source : <0xffa006d2> { _exception_to_level5 + 0x9a } JUMP.L

   1 Target : <0xffa00638> { _exception_to_level5 + 0x0 }

     Source : <0xffa004f4> { _bfin_return_from_exception + 0x18 } RTX

   2 Target : <0xffa004dc> { _bfin_return_from_exception + 0x0 }

     Source : <0xffa00598> { _ex_trap_c + 0x74 } JUMP.S

   3 Target : <0xffa00524> { _ex_trap_c + 0x0 }

     Source : <0xffa00798> { _trap + 0x58 } JUMP (P4)

   4 Target : <0xffa00740> { _trap + 0x0 }

      FAULT : <0x00000000> /* Maybe null pointer? */

     Source : <0x0000b64c> { ___wake_up_common + 0x38 } CALL (P2)

   5 Target : <0x0000b640> { ___wake_up_common + 0x2c }

     Source : <0x0000b638> { ___wake_up_common + 0x24 } JUMP.S

   6 Target : <0x0000b614> { ___wake_up_common + 0x0 }

     Source : <0x0000b6ea> { ___wake_up_sync_key + 0x1a } CALL pcrel

   7 Target : <0x0000b6d0> { ___wake_up_sync_key + 0x0 }

     Source : <0x000109a0> { ___wake_up_parent + 0x14 } JUMP.L

   8 Target : <0x0001098c> { ___wake_up_parent + 0x0 }

     Source : <0x00018f28> { _do_notify_parent + 0xb8 } CALL pcrel

   9 Target : <0x00018f26> { _do_notify_parent + 0xb6 }

     Source : <0x00018f98> { _do_notify_parent + 0x128 } JUMP.S

  10 Target : <0x00018f94> { _do_notify_parent + 0x124 }

     Source : <0x00018acc> { ___group_send_sig_info + 0x14 } RTS

  11 Target : <0x00018ac8> { ___group_send_sig_info + 0x10 }

     Source : <0x000186d0> { ___send_signal + 0xe4 } RTS

  12 Target : <0x000186c8> { ___send_signal + 0xdc }

     Source : <0x0001860c> { ___send_signal + 0x20 } IF CC JUMP pcrel

  13 Target : <0x0001860a> { ___send_signal + 0x1e }

     Source : <0x0001814c> { _prepare_signal + 0x7c } RTS

  14 Target : <0x00018144> { _prepare_signal + 0x74 }

     Source : <0x000181fe> { _prepare_signal + 0x12e } JUMP.S

  15 Target : <0x000181e6> { _prepare_signal + 0x116 }

     Source : <0x00018140> { _prepare_signal + 0x70 } IF CC JUMP pcrel

Kernel Stack

Stack info:

SP: [0x02867eb8] <0x02867eb8> /* kernel dynamic memory (maybe user-space) */

Memory from 0x02867eb0 to 02868000

02867eb0: 0016d250  0205f3a0 [00000000] 0205f3a0  0205f524  02018320  02867ef4  0010443e

02867ed0: 00000000  0205f3a0  02018320  ffa00338  001740e8  00000001  02866008 <02866000>

02867ef0: 00003460 <02866000> 00000002  02834f48  028211a0  0000fffe  00000008  0006202d

02867f10: 028211a0  ffa00920  0000002f  00000000  00000002  00000002  00000002  0006202d

02867f30: 00000000  02868000  00000480  00000002  02820a30  ffa00b52  02000002  029120bb

02867f50: 02820a71  029120b0  02820a70  00000000  00000000  0000008b  00000000  0000008b

02867f70: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

02867f90: 00000000  00000000  00000000  00000000  00000004  00000000  00000000  00000000

02867fb0: 0286286c  02834ee4  02834ef0  00000000  00000001  02821254  00000002  00000009

02867fd0: 00001002  00000000  02834f48  028211a0  02820a20  00001002  00000002  00000058

02867ff0: 00001000  00001000  00001002  00000006

Return addresses in stack:

    address : <0x02866000> /* kernel dynamic memory (maybe user-space) */

    address : <0x02866000> /* kernel dynamic memory (maybe user-space) */

Modules linked in:

Kernel panic - not syncing: Kernel exception

Hardware Trace:

Stack info:

SP: [0x02867afc] <0x02867afc> /* kernel dynamic memory (maybe user-space) */

FP: (0x02867bf0)

Memory from 0x02867af0 to 02868000

02867af0: 0000000b  02867afc  00000013 [00130234] 0010404a  02867bd8  00130234  001604be

02867b10: 001604be  001604be  02867b2c  0000433c  02867bd8  00008008  02867bd8  0000001f

02867b30: 0000001f  00000000  00000000  0003000b  0008fb26  00008050  00062000  02867bd4

02867b50: 0008f592  02867be0  0008f592  00000003  02867dd7  0010dde0  02867be4  ffffffff

02867b70: 0008f186  00130839  0016499b  00130839  02834fe0  00164d98  00000004  ffffffff

02867b90: 0013148a  6c102000  02834fe0  00000000  ff102105  ffff0008  0205f300  ff050aac

02867bb0: 02867dc1  ffa006d6  0015d000  00008008  0006202d  0205f3a0  00000001  0000834a

02867bd0: 025a8db4  00000480  00000480  00008008  0006202d  00000000  02867cb4  00000480

02867bf0:(00000000)<0000b64e> 02817ee4  02003004  00033eea  02820a71  00033e36  02820a70

02867c10: 00000008  00000000  000003f6  00000000  00199999  00000000  00000000  00000000

02867c30: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

02867c50: 00000000  00000004  00000000  00000000  00000000  0016ca70  02834ee4  02867cc4

02867c70: fffffff4  02811e48  00000001  00000000  02817ee4  00000010  00000000  00000001

02867c90: 0205f3a0  00000001  02811e48  00000001  00000001  02817ee4  02817ee4  00000010

02867cb0: 00000006  0001860a  0205f3a0 <02866000> 0205f3a0  02867cfc  0000b6ee  0205f3a0

02867cd0:<02866000> 02811900  0000001f  00000011  0000001f <02866000> 0205f3a0 <02866000>

02867cf0: 02811900  00000001  0205f3a0  02867e5c  000109a4  00000011  020084e0  00000000

02867d10: 00000001  0205f3a0  00018f2c  0016ca70  0203f86c  00042068  00000011  00000000

02867d30: 00040002  00000145  00000000  0000000b  00000012  00000000  0000000b  0003c75e

02867d50: 00000003  00000000  02867d58  02867d58  02867d98  00011a40  0205f3a0 <02866000>

02867d70: 02811900  00000001  0205f3a0  0016ca70  0003f8d0  026249c0  00000001  02867d90

02867d90: 02867d90  02867d90  02867e5c  00021a9a  0205f3a0 <02866000> 00011cdc  0205f3a0

02867db0: 00000011  0000000b  0016ca70  00011eda  0205f3a0 <02866000> 00011e4a  0205f3a0

02867dd0: 00000001  00000000  00000000  0000008d  00000000  00011f88  0000000a  0000000b

02867df0: 02865a80  02811900  0000000b  02865a80  0001997e  0000000b  0205f5e0  02867e80

02867e10: 00000000  0000000b  ffffffe0  00001433 <02866000> 02834ef0  00003228  02867f24

02867e30: 00000001  02821254  00000002  00000000  0205f5c8  02867edc  02867f24  02867edc

02867e50: 02867f24  00000000  00000000  0000000b  00000000  0003000b  00000002  0201834c

02867e70: 0016d250  02018354  0016d224  0000001f  0000000b  00000000  0003000b  00000002

02867e90: 0201834c  0016d250  02018354  0016d224  0205f3a0  0205f524  02867ec8  0000bb42

02867eb0: 0016d250  0205f3a0  00000000  0205f3a0  0205f524  02018320  02867ef4  0010443e

02867ed0: 00000000  0205f3a0  02018320  ffa00338  001740e8  00000001  02866008 <02866000>

02867ef0: 00003460 <02866000> 00000002  02834f48  028211a0  0000fffe  00000008  0006202d

02867f10: 028211a0  ffa00920  0000002f  00000000  00000002  00000002  00000002  0006202d

02867f30: 00000000  02868000  00000480  00000002  02820a30  ffa00b52  02000002  029120bb

02867f50: 02820a71  029120b0  02820a70  00000000  00000000  0000008b  00000000  0000008b

02867f70: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

02867f90: 00000000  00000000  00000000  00000000  00000004  00000000  00000000  00000000

02867fb0: 0286286c  02834ee4  02834ef0  00000000  00000001  02821254  00000002  00000009

02867fd0: 00001002  00000000  02834f48  028211a0  02820a20  00001002  00000002  00000058

02867ff0: 00001000  00001000  00001002  00000006

Return addresses in stack:

   frame  1 : <0x0000b64e> { ___wake_up_common + 0x3a }

    address : <0x02866000> /* kernel dynamic memory (maybe user-space) */

    address : <0x02866000> /* kernel dynamic memory (maybe user-space) */

    address : <0x02866000> /* kernel dynamic memory (maybe user-space) */

    address : <0x02866000> /* kernel dynamic memory (maybe user-space) */

    address : <0x02866000> /* kernel dynamic memory (maybe user-space) */

    address : <0x02866000> /* kernel dynamic memory (maybe user-space) */

    address : <0x02866000> /* kernel dynamic memory (maybe user-space) */

    address : <0x02866000> /* kernel dynamic memory (maybe user-space) */

    address : <0x02866000> /* kernel dynamic memory (maybe user-space) */

    address : <0x02866000> /* kernel dynamic memory (maybe user-space) */

Rebooting in 3 seconds..

 

U-Boot 2010.06-svn2403 (ADI-2010R1-pre) (Sep 24 2010 - 22:57:27)

                                                                                                                                                                    

~

 

Follow-ups

 

--- Stuart Henderson                                         2011-04-22 07:44:22

the stack size seems to have been changed in the board file rejig for the qemu

stuff, which is causing things to go wrong.  i'll move the stack size

definitions back to the toolchain specific board files which should fix this.

 

--- Mike Frysinger                                           2011-04-22 17:25:16

flat targets should be setting ldflags the same:

boards/bfin-fmt-flat.exp:set_board_info ldflags

"-Wl,-elf2flt=-s80000";

 

and when i look at the log, this seems to be working:

$ ./toolchain-regtest -t uclinux gcc

...

Executing on host: bfin-uclinux-gcc

/usr/local/src/blackfin/svn/toolchain/trunk/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/builtins/20010124-1.c

/usr/local/src/blackfin/svn/toolchain/trunk/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/builtins/20010124-1-lib.c

/usr/local/src/blackfin/svn/toolchain/trunk/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c

-w  -O1  -fno-show-column -Wl,-elf2flt=-s80000  -lm  -mcpu=bf537-0.2  -o

/usr/local/src/blackfin/svn/toolchain/trunk/buildscript/gcc_build/testsuite/20010124-1.x1

   (timeout = 300)

...

 

--- Stuart Henderson                                         2011-04-25 06:59:45

indeed, but although we actually set the stack size as:

set_board_info ldflags "-Wl,-elf2flt=-s80000";

in bfin-fmt-flat.exp.  We tell the testsuite that it's:

set_board_info gcc,stack_size 0x1f000

in bfin-target-linux.exp.  which is rather a lot more than what we're putting

on the command line.

 

so the test case in question sets the stack size as 80,000 and then claims it's

0x1f000 (126,976):

bfin-uclinux-gcc

/home/shender/gnu/toolchain/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/multi-ix.c

-w  -O1  -DSTACK_SIZE=0x1f000 -DNO_TRAMPOLINES -fno-show-column

-Wl,-elf2flt=-s80000  -lm  -mcpu=bf537-0.2  -o

/home/shender/gnu/toolchain/gcc_build/testsuite/multi-ix.x1

 

--- Stuart Henderson                                         2011-04-25 07:53:34

fixed on trunk, r5393.

 

--- Mike Frysinger                                           2011-04-25 12:35:47

ok, that makes sense.  but your patch still doesnt quite fix everything i dont

think ...

 

you added it to bfin-uclinux.exp and bfin-linux-uclibc.exp, but i think these

values should be added to bfin-fmt-flat.exp and bfin-fmt-fdpic.exp.  after all,

the values are specific to the target format, not the testing target.

 

--- Stuart Henderson                                         2011-04-25 12:50:54

ahh, i see the qemu/sim target files reference the fmt files as well.  moved

accordingly.  revision 5394.

 

--- Stuart Henderson                                         2011-04-27 05:16:28

Adding Grace to validate.

 

--- Mingquan Pan                                             2011-04-27 23:10:51

Yes, it fixed, the testing can run to the end and the cases passes now. Close.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes