GCC 4.7.3: internal compiler error when native compiling on arndale

Bug #1205155 reported by Zi Shen Lim
This bug report is a duplicate of:  Bug #1081417: GCC build issue in Arndale. Edit Remove
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Arndale
Fix Released
Undecided
Unassigned
linaro-networking
Fix Released
Undecided
Unassigned

Bug Description

When native compiling Open vSwitch on Arndale (A15) using GCC 4.7.3, we hit an "internal compiler error".
Filing a bug per error message.

-----
+ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.7/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.3-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --enable-plugin --with-system-zlib --enable-objc-gc --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)

-----
lib/odp-util.c: In function 'format_odp_key_attr':
lib/odp-util.c:1309:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
Preprocessed source stored into /tmp/cctUuigo.out file, please attach this to your bugreport.
make[2]: *** [lib/odp-util.o] Error 1
make[2]: Leaving directory `/lava/tests/0_openvswitch/openvswitch'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/lava/tests/0_openvswitch/openvswitch'
make: *** [all] Error 2
-----

See full log (including preprocessor output /tmp/cctUuigo.out) at: http://validation.linaro.org/lava-server/scheduler/job/64445/log_file

Revision history for this message
Mike Holmes (mike-holmes) wrote :

This also affect the LTP test suite

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -I../include -I../include -I../include -I../include -c -o tlibio.o tlibio.c
tlibio.c: In function 'lio_write_buffer':
tlibio.c:1071:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[1]: *** [tlibio.o] Error 1
make[1]: Leaving directory `/lava/tests/0_rt-ltp/lib'
make: *** [lib-all] Error 2
<LAVA_TEST_RUNNER>: 0_rt-ltp installer failed, exiting
hwcontext swcontext
<LAVA_TEST_RUNNER>: calling sync
<LAVA_TEST_RUNNER>: exiting

linaro-test [rc=1]# <LAVA_DISPATCHER>2013-07-26 04:12:59 PM INFO: lava_test_shell seems to have completed
<LAVA_DISPATCHER>2013-07-26 04:12:59 PM INFO: attempting to access master filesystem 3:lava

http://validation.linaro.org/scheduler/job/64586/log_file

Revision history for this message
Mike Holmes (mike-holmes) wrote :

I updated to a full 13.07 release and it still fails

      "image":"http://releases.linaro.org/13.07/ubuntu/arndale/arndale-raring_server_20130723-408.img.gz"

http://validation.linaro.org/scheduler/job/65145/log_file

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -I/lava/tests/0_rt-ltp/testcases/kernel/include -I../../../../include -I../../../../include -L../../../../lib ppoll01.c -lltp -o ppoll01
ppoll01.c: In function 'do_test':
ppoll01.c:361:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccv9Fn1v.out file, please attach this to your bugreport.
make[4]: *** [ppoll01] Error 1
make[4]: Leaving directory `/lava/tests/0_rt-ltp/testcases/kernel/syscalls/ppoll'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/lava/tests/0_rt-ltp/testcases/kernel/syscalls'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/lava/tests/0_rt-ltp/testcases/kernel'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/lava/tests/0_rt-ltp/testcases'
make: *** [testcases-all] Error 2
<LAVA_TEST_RUNNER>: 0_rt-ltp installer failed, exiting
hwcontext swcontext
<LAVA_TEST_RUNNER>: calling sync
<LAVA_TEST_RUNNER>: exiting

Revision history for this message
Matthew Gretton-Dann (matthew-gretton-dann) wrote :

Hi,

Could you run the failing test case with -save-temps added to the command line? So something like:

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -I/lava/tests/0_rt-ltp/testcases/kernel/include -I../../../../include -I../../../../include -L../../../../lib ppoll01.c -lltp -o ppoll01 -save-temps

This will generate temporary files (which will match the following globs - *.i, *.ii, *.s, *.o - note not all will necessarily be generated). Can you please attach them to this bug report?

Thanks,

Matt

Revision history for this message
Kim Phillips (kim-phillips) wrote :

gcc 4.7.3 (raring, ubuntu13.04) also fails to build qemu:

  CC block/qcow2.o
/root/qemu/block/qcow2.c: In function 'qcow2_open':
/root/qemu/block/qcow2.c:591:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
/root/qemu/block/vvfat.c: In function 'commit_mappings':
/root/qemu/block/vvfat.c:2225:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make: *** [block/qcow2.o] Error 1
make: *** Waiting for unfinished jobs....
The bug is not reproducible, so it is likely a hardware or OS problem.
make: *** [block/vvfat.o] Error 1

Revision history for this message
Mike Holmes (mike-holmes) wrote : Re: [Bug 1205155] Re: GCC 4.7.3: internal compiler error when native compiling on arndale
Download full text (3.6 KiB)

Kim,
Since you have a physical board, are you able to help Mathew with the
debug, running in LAVA is very slow.

Mike

On 5 August 2013 10:04, Kim Phillips <email address hidden> wrote:

> gcc 4.7.3 (raring, ubuntu13.04) also fails to build qemu:
>
> CC block/qcow2.o
> /root/qemu/block/qcow2.c: In function 'qcow2_open':
> /root/qemu/block/qcow2.c:591:1: internal compiler error: Segmentation fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
> /root/qemu/block/vvfat.c: In function 'commit_mappings':
> /root/qemu/block/vvfat.c:2225:1: internal compiler error: Segmentation
> fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
> The bug is not reproducible, so it is likely a hardware or OS problem.
> make: *** [block/qcow2.o] Error 1
> make: *** Waiting for unfinished jobs....
> The bug is not reproducible, so it is likely a hardware or OS problem.
> make: *** [block/vvfat.o] Error 1
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1205155
>
> Title:
> GCC 4.7.3: internal compiler error when native compiling on arndale
>
> Status in Linaro GCC:
> New
>
> Bug description:
> When native compiling Open vSwitch on Arndale (A15) using GCC 4.7.3, we
> hit an "internal compiler error".
> Filing a bug per error message.
>
> -----
> + gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.7/lto-wrapper
> Target: arm-linux-gnueabihf
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
> 4.7.3-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
> --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
> --program-suffix=-4.7 --enable-shared --enable-linker-build-id
> --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
> --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls
> --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
> --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm
> --enable-plugin --with-system-zlib --enable-objc-gc --with-cloog
> --enable-cloog-backend=ppl --disable-cloog-version-check
> --disable-ppl-version-check --enable-multiarch --enable-multilib
> --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16
> --with-float=hard --with-mode=thumb --disable-werror
> --enable-checking=release --build=arm-linux-gnueabihf
> --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
> Thread model: posix
> gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
>
> -----
> lib/odp-util.c: In function 'format_odp_key_attr':
> lib/odp-util.c:1309:1: internal compiler error: Segmentation fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
> Preprocessed source stored into /tmp/cctUuigo.out file, please attach
> this to your bugreport.
> make[2]: *** [lib/odp-util.o] E...

Read more...

Revision history for this message
Kim Phillips (kim-phillips) wrote :

Mike, sure.

Revision history for this message
Kim Phillips (kim-phillips) wrote :
Download full text (20.8 KiB)

repeating the offending cc command shows that whilst it's the same input file, the segv occurs at differing line numbers in the source file between two consecutive runs:

/root/qemu/block/vvfat.c: In function 'commit_mappings':
/root/qemu/block/vvfat.c:2225:1: internal compiler error: Segmentation fault
...
/root/qemu/block/vvfat.c: In function 'vvfat_read':
/root/qemu/block/vvfat.c:1413:1: internal compiler error: Segmentation fault

So it's unlikely this is a problem with gcc itself, and I'm turning to the kernel as the culprit, thus adding Tushar Behera to subscribers of this bug.

How to reproduce the QEMU build failure (pretty consistent - never succeeds building multiple files, e.g., qemu/block/vvfat.c ):

Using the standard ubuntu 13.04 -eabihf cross-tools:

---
${CROSS_COMPILE}gcc -v
...
gcc version 4.8.1 20130401 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.04-20130417 - Linaro GCC 2013.04)
---

kernel build steps (see below for which versions of the kernel being tested):

---
scripts/kconfig/merge_config.sh ~/git/configs/linaro/configs/linaro-base.conf ~/git/configs/linaro/configs/ubuntu-minimal.conf ~/git/configs/linaro/configs/arndale.conf ~/git/configs/linaro/configs/kvm-host.conf
make dtbs
make -j 4 uImage
---

boot kernel with raring rootfs with the following extra packages:

---
apt-get install gcc make ssh xorg fluxbox tightvncserver # should be gcc 4.7.3
apt-get install libsdl-dev libfdt-dev bridge-utils uml-utilities
apt-get install libpixman-1-dev
apt-get install git-core
---

After booting, connect arndale to internet, after booting issue the following commands to get and build upstream qemu:

---
git clone git://git.qemu.org/qemu.git
cd qemu
git submodule update --init dtc
mkdir build
cd build
../configure --target-list=arm-softmmu --enable-kvm
make
---

Trying to get to the point where I can bisect kernels, I first need a 'known working'/'good' kernel. I don't seem to be able to find one since they either fail in the same manner, or refuse to boot:

I get same failure as above (gcc segv) with Samsung Landing Team's kernel: git://git.linaro.org/landing-teams/working/samsung/kernel.git, tracking-lsk branch (lsk-13.07-378-g89a8862) and device tree.

I tried git://git.linaro.org/kernel/linux-linaro-tracking.git kernel branch linux-linaro-tracking: that fails like this:

[ 3.090305] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[ 3.094306] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 1
[ 3.101867] Unable to handle kernel paging request at virtual address 5fefbfff
[ 3.108857] pgd = 80003000
[ 3.111503] [5fefbfff] *pgd=80000040005003, *pmd=00000000
[ 3.116795] Internal error: Oops: 206 [#1] SMP THUMB2
[ 3.121746] Modules linked in:
[ 3.124738] CPU: 0 PID: 1211 Comm: kworker/u4:3 Not tainted 3.11.0-rc4+ #2
[ 3.131491] Workqueue: deferwq deferred_probe_work_func
[ 3.136608] task: ec305040 ti: ec28c000 task.ti: ec28c000
[ 3.141908] PC is at xhci_mem_init+0x27c/0x984
[ 3.146262] LR is at trb_in_td+0x75/0x140
[ 3.150189] pc : [<8034f034>] lr : [<80350e3d>] psr: 60000133
[ 3.150189] sp : ec28dc58 ip : 00000000 fp : 8072a4dc
[ 3.161462] r10: 000000...

Revision history for this message
Tushar Behera (tusharbehera) wrote :

I am not sure if I am testing properly, but here is what I have got.

Setup:
1. Raring rootfs (Linaro 13.05)
2. Kernel built from ll-20130811.0, config generated by merging ubuntu-minimal.conf, linaro-base.conf, arndale.conf and kvm-host.conf
3. On board, gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
4. After booting up, followed steps to download and build qemu (as given in above comment).

I have completed three iterations now, in each case, make completes without any segfault.

Let me know if I am missing anything that reproduces the segfault.

Revision history for this message
Tushar Behera (tusharbehera) wrote :

If this is of any interest, the kernel was built with GCC 4.8.2.

Quoting from kernel boot log on Arndale,

gcc version 4.8.2 20130624 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.07-1 - Linaro GCC 2013.07)

Revision history for this message
Kim Phillips (kim-phillips) wrote :

hmm, the gcc version I'm using is 4.8.1:

gcc version 4.8.1 20130401 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.04-20130417 - Linaro GCC 2013.04

so that's one difference between us.

Revision history for this message
Kim Phillips (kim-phillips) wrote :
Download full text (22.9 KiB)

here's a full boot log showing the gcc segv with a kernel built with gcc 4.8.2 (don't let the gcc4.6.3 directory name fool you - it's the native gcc 4.7.3 that's failing):

U-Boot 2013.01.-rc1-00003-g43ee87a (Aug 14 2013 - 08:44:32) for ARNDALE5250

CPU: Exynos5250@1000MHz

Board: for ARNDALE5250
I2C: ready
DRAM: 2 GiB
WARNING: Caches not enabled

Checking Boot Mode ... Please check OM_pin
MMC: EXYNOS DWMMC: 0, EXYNOS DWMMC: 1, EXYNOS DWMMC: 2
In: serial
Out: serial
Err: serial
Net: No ethernet found.
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 1 Ethernet Device(s) found
Hit any key to stop autoboot: 0

MMC read: dev # 0, block # 1105, count 9472 ... 9472 blocks read: OK

MMC read: dev # 0, block # 10130, count 256 ... 256 blocks read: OK
## Booting kernel from Legacy Image at 40007000 ...
   Image Name: Linux-3.10.6+
   Image Type: ARM Linux Kernel Image (uncompressed)
   Data Size: 4092672 Bytes = 3.9 MiB
   Load Address: 40008000
   Entry Point: 40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 42000000
   Booting using the fdt blob at 0x42000000
   Loading Kernel Image ... OK
OK
   Loading Device Tree to 4fff5000, end 4ffff149 ... OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 3.10.6+ (kim@ntel) (gcc version 4.8.2 20130624 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.07-1 - Linaro GCC 2013.07) ) #3 SMP Thu Aug 15 09:53:22 CDT 2013
[ 0.000000] CPU: ARMv7 Processor [410fc0f4] revision 4 (ARMv7), cr=50c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] Machine: SAMSUNG EXYNOS5 (Flattened Device Tree), model: Insignal Arndale evaluation board based on EXYNOS5250
[ 0.000000] NR_BANKS too low, ignoring high memory
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] CPU EXYNOS5250 (id 0x43520010)
[ 0.000000] PERCPU: Embedded 9 pages/cpu @8174d000 s14336 r8192 d14336 u36864
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 514576
[ 0.000000] Kernel command line: root=/dev/mmcblk1p1 rw rootwait earlyprintk console=ttySAC2,115200n8 --no-log mac=02:75:8e:12:21:98
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Memory: 48MB 216MB 1504MB 256MB = 2024MB total
[ 0.000000] Memory: 2047068k/2063452k available, 25508k reserved, 262144K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
[ 0.000000] lowmem : 0x80000000 - 0xef800000 (1784 MB)
[ 0.000000] pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
[ 0.000000] modules : 0x7f800000 - 0x7fe00000 ( 6 MB)
[ 0.0...

Revision history for this message
Tushar Behera (tusharbehera) wrote :

Please share the kernel source location from which you have built this kernel?

I have used latest LNG kernel (linaro-preempt-rt branch) and tested on Arndale. Can't reproduce the problem yet. Can be a hardware issue, it would be good if we can run this test on more boards.

The binaries are shared here [1]. It would be nice if you can test them.

It would also be good if you can share the uImage and board.dtb that you have at your end. I will give it a try here.

[1] http://people.linaro.org/~tushar.behera/arndale-lng/kernel-samsung-lt-lng-v3.10-1/

Revision history for this message
Kim Phillips (kim-phillips) wrote :

I've experience the error with most kernels, but today I've been using the linux-linaro-3.10.1-2013.07 release (probably equivalent to the linux-linaro-tracking (samsung-linux-3.10-2013.07 tag?)

I built it with:

arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.8-2013.07-1 - Linaro GCC 2013.07) 4.8.2 20130624 (prerelease)

and:

scripts/kconfig/merge_config.sh linaro/configs/linaro-base.conf linaro/configs/ubuntu-minimal.conf linaro/configs/arndale.conf

Given a raring rootfs (important), I continue to get internal compiler errors.
This time, I'm trying to build the compiler itself (maybe it'll put
more stress on the system and you'll experience the fault):

wget https://launchpad.net/gcc-linaro/4.7/4.7-2013.08/+download/gcc-linaro-4.7-2013.08.tar.bz2
apt-get install libgmp-dev libmpfr-dev libmpc-dev
tar jx -f gcc-linaro-4.7-2013.08.tar.bz2 --touch #touch needed since hwclock no funciona
../configure --disable-bootstrap --enable-languages=c,c++ --with-mode=thumb --with-arch=armv7-a --with-tune=cortex-a15 --with-float=softfp --with-fpu=neon --prefix=$home/opt/gcc-linaro
make -j 2

let me know if you still don't see an "internal compiler error."

btw, not a fan of exchanging and testing binaries; source level exchanges should still reveal the correct results minus the ambiguity of how a particular binary was made.

Thanks,

Kim

Revision history for this message
Fathi Boudra (fboudra) wrote :

Since there's no proof the compiler is faulty, moving the bug to Arndale project.

affects: gcc-linaro → arndale
Revision history for this message
Kim Phillips (kim-phillips) wrote :

I should add that the problem goes away with gcc4.6.3...

Revision history for this message
Tushar Behera (tusharbehera) wrote :

> I've experience the error with most kernels, but today I've been using
> the linux-linaro-3.10.1-2013.07 release (probably equivalent to the
> linux-linaro-tracking (samsung-linux-3.10-2013.07 tag?)
>
> I built it with:
>
> arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.8-2013.07-1 -
> Linaro GCC 2013.07) 4.8.2 20130624 (prerelease)
>
> and:
>
> scripts/kconfig/merge_config.sh linaro/configs/linaro-base.conf
> linaro/configs/ubuntu-minimal.conf linaro/configs/arndale.conf
>
> Given a raring rootfs (important), I continue to get internal compiler errors.
> This time, I'm trying to build the compiler itself (maybe it'll put
> more stress on the system and you'll experience the fault):
>
> wget https://launchpad.net/gcc-linaro/4.7/4.7-2013.08/+download/gcc-linaro-4.7-2013.08.tar.bz2
> apt-get install libgmp-dev libmpfr-dev libmpc-dev
> tar jx -f gcc-linaro-4.7-2013.08.tar.bz2 --touch #touch needed since hwclock no funciona
> ../configure --disable-bootstrap --enable-languages=c,c++ --with-mode=thumb --with-arch=armv7-a --with-tune=cortex-a15 --with-float=softfp --with-fpu=neon --prefix=$home/opt/gcc-linaro
> make -j 2
>
> let me know if you still don't see an "internal compiler error."
>

I followed the steps as is, but still couldn't reproduce the error. I
am using 2013.07 release of Rarring image [1].

[1] http://releases.linaro.org/13.07/ubuntu/raring-images/server/linaro-raring-server-20130723-440.tar.gz

> btw, not a fan of exchanging and testing binaries; source level
> exchanges should still reveal the correct results minus the ambiguity of
> how a particular binary was made.
>

I wanted to make sure that it is not a board-specific hardware issue
(considering that the tests are passing on my board, and they are
consistently failing on some of the boards). Testing binaries removes
the ambiguities about how the binaries are getting generated from the
source tree and generally it is an easier way to find out faulty
hardwares.

Revision history for this message
Kim Phillips (kim-phillips) wrote :
Download full text (4.0 KiB)

ok. I had to blow away my SD card for something else, and re-imaged everything anew, and am still able to reproduce the bug.

instructions to reproduce are along the exact same lines as described here, ignoring however where it says to avoid using raring (and use precise instead) due to this bug:

https://git.linaro.org/gitweb?p=people/kimphill/misc.git;a=blob_plain;f=KVM-on-Arndale.txt;hb=HEAD

Images I used are:

wget http://www.virtualopensystems.com/media/arndale/arndale-bl1.bin
sudo dd if=arndale-bl1.bin of=/dev/$SDDEV bs=512 seek=1

smdk5250-spl.bin from that produced by git://github.com/virtualopensystems/u-boot-arndale.git
sudo dd if=smdk5250-spl.bin of=/dev/$SDDEV bs=512 seek=17

u-boot.bin from ToT u-boot-linaro-stable:
sudo dd if=~/git/u-boot-linaro-stable/u-boot.bin of=/dev/$SDDEV bs=512 seek=49

kernel & dtb from linux-samsung's origin/tracking branch (commit 433d9fc028001d32fa3d269a012aa9f7575b4fb1, pulled today):

sudo dd if=~/git/linux-samsung/arch/arm/boot/uImage of=/dev/$SDDEV bs=512 seek=1105
sudo dd if=~/git/linux-samsung/arch/arm/boot/dts/exynos5250-arndale.dtb of=/dev/$SDDEV bs=512 seek=10130

built with gcc version 4.8.2 20130805 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.08 - Linaro GCC 2013.08).

filesystem partition made with this fdisk session:

----------------
Command (m for help): n
Partition type:
   p primary (0 primary, 0 extended, 4 free)
   e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-31275007, default 2048): 10240
Last sector, +sectors or +size{K,M,G} (10240-31275007, default 31275007):
Using default value 31275007

Command (m for help): d
Selected partition 1

Command (m for help): n
Partition type:
   p primary (0 primary, 0 extended, 4 free)
   e extended
Select (default p): p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-31275007, default 2048): 10240
Last sector, +sectors or +size{K,M,G} (10240-31275007, default 31275007): +2G

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
-----------

and then:

sudo mkfs.ext3 /dev/mmcblk0p1

I wrote the latest & greatest ubuntu-developer rootfs snapshot which was obtained from here:

http://snapshots.linaro.org/raring/images/developer/latest

i.e., after mounting it:
sudo tar zxf ../linaro-raring-developer-20130821-469.tar.gz

then cd'd into it's /root, and placed qemu:

git clone --depth=1 git://git.qemu.org/qemu.git
cd qemu
git submodule update --init dtc
git submodule update --init pixman

unmounted it, placed the SD card in the board, changed u-boot settings like so:

---
setenv bootargs 'root=/dev/mmcblk1p1 rw rootwait earlyprintk console=ttySAC2,115200n8 --no-log'
setenv bootcmd 'mmc read 40007000 451 2500; mmc read 42000000 2792 100;bootm 40007000 - 42000000'
save
---

booted the kernel, made sure the board could reach the internet, and:

apt-get install pkg-config libglib2.0-dev zlib1g-dev autoconf libtool flex bison

cd qemu/
# my hwclock doesn't work, so to not confuse make, reset the file timestamps:
touch *
touch */*
touch */*/*
touch */*/*/*
touch */*/*/*/*
mkdir build
cd build/
../config...

Read more...

Revision history for this message
Kim Phillips (kim-phillips) wrote :
Download full text (25.1 KiB)

ok, for the SD card image, I did a:

sudo dd if=/dev/$SDDEV of=gcc-bug-sdcard.ddme bs=512 count=4300000

and am currently posting it here:

http://people.linaro.org/~kim.phillips/

I'm adding another tarball of the rootfs only: gcc-bug-rootfs.tar.xz there, too.

It looks like it'll be a while to upload (another 1/2 hour for the tarball, the image I'll resume after that's done), so to be sure they're fully uploaded, here are their correct sizes:

-rw-r--r-- 1 root root 2201600000 Aug 21 21:28 gcc-bug-sdcard.ddme
-rw-r--r-- 1 kim kim 292635548 Aug 21 21:26 gcc-bug-rootfs.tar.xz

and hashes:

$ sha1sum gcc-bug*
19a6254d84b5525ea165b85791f8c537528c42f8 gcc-bug-rootfs.tar.xz
ff1a3cad7c1e1a4c36cf853001a4a4d3128885d2 gcc-bug-sdcard.ddme

I actually think following the steps above will take less time, but since you wanted binaries, here they are: Once downloaded, simply boot on an arndale, cd qemu/build, and make, like so:

U-Boot 2013.01.-rc1-00003-g43ee87a (Aug 21 2013 - 18:19:27) for ARNDALE5250

CPU: Exynos5250@1000MHz

Board: for ARNDALE5250
I2C: ready
DRAM: 2 GiB
WARNING: Caches not enabled

Checking Boot Mode ... Please check OM_pin
MMC: EXYNOS DWMMC: 0, EXYNOS DWMMC: 1, EXYNOS DWMMC: 2
In: serial
Out: serial
Err: serial
Net: No ethernet found.
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 1 Ethernet Device(s) found
Hit any key to stop autoboot: 0

MMC read: dev # 0, block # 1105, count 9472 ... 9472 blocks read: OK

MMC read: dev # 0, block # 10130, count 256 ... 256 blocks read: OK
## Booting kernel from Legacy Image at 40007000 ...
   Image Name: Linux-3.11.0-rc6
   Image Type: ARM Linux Kernel Image (uncompressed)
   Data Size: 4504056 Bytes = 4.3 MiB
   Load Address: 40008000
   Entry Point: 40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 42000000
   Booting using the fdt blob at 0x42000000
   Loading Kernel Image ... OK
OK
   Using Device Tree in place at 42000000, end 4200acf5

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 3.11.0-rc6 (kim@ntel) (gcc version 4.8.2 20130805 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.08 - Linaro GCC 2013.08) ) #3 SMP Wed Aug 21 18:26:00 CDT 2013
[ 0.000000] Kernel was built at commit id '433d9fc'
[ 0.000000] CPU: ARMv7 Processor [410fc0f4] revision 4 (ARMv7), cr=50c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] Machine: SAMSUNG EXYNOS5 (Flattened Device Tree), model: Insignal Arndale evaluation board based on EXYNOS5250
[ 0.000000] NR_BANKS too low, ignoring high memory
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] CPU EXYNOS5250 (id 0x43520010)
[ 0.000000] PERCPU: Embedded 9 pages/cpu @817eb000 s14912 r8192 d13760 u36864
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 514576
[ 0.000000] Kernel command line: root=/dev/mmcblk1p1 rw rootwait earlyprintk console=ttySAC2,115200n8 --no-log mac=02:75:8e:12:...

Revision history for this message
Tushar Behera (tusharbehera) wrote :

The binary size is pretty big, but still then I will give it a try to rule-out hardware issues.

Btw, what is the issue with hwclock that requires you to touch the files? Doesn't Ubuntu update the system time automatically when it is connected to internet?

Method to flash Linaro binaries to flash SD cards:

Using linaro-image-tools [1] to flash the SD card would be much easier.

Setting up linaro-image-tools:
$ sudo add-apt-repository ppa:linaro-maintainers/tools
$ sudo apt-get update
$ sudo apt-get install linaro-image-tools

Downloading binaries:
Download the hwpack [2] and rootfs [3].
Current latest files are:
hwpack_linaro-arndale_20130822-0545_b140_armhf_supported.tar.gz
linaro-raring-developer-20130822-470.tar.gz

Flashing SD card:
(Assuming the SD card is mounted as /dev/sdc and the binaries are in current directory)
$sudo linaro-media-create --dev arndale --mmc /dev/sdc --hwpack hwpack_linaro-arndale_20130822-0545_b140_armhf_supported.tar.gz --binary linaro-raring-developer-20130822-470.tar.gz

It would take around 5~10 minutes to flash SD card. You can plug in the card on board and it should start booting.

Updating the kernel image:
If you want to update the kernel image, then mount the SD card and copy the kernel images to boot partition on the SD card.

You will have to rename exynos5250-arndale.dtb as board.dtb while copying to SD card.

[1] https://wiki.linaro.org/Linaro-Image-Tools
[2] http://snapshots.linaro.org/kernel-hwpack/linux-linaro-tracking-ll-arndale/latest
[3] http://snapshots.linaro.org/raring/images/developer/latest

Revision history for this message
Kim Phillips (kim-phillips) wrote :

I think I've found the problem: I wasn't updating my u-boot spl image from the ancient one retrieved from the openvirtualsystems site. Using u-boot-linaro-stable's SPL image, I've been running gcc all morning without failure. Looking at bug 1081417, it appears this is identical and the SPL image I (and others above using LAVA before it's boards had been updated) had been using had not included u-boot-linaro-stable's commit 921ce9c32de5561c27e000b11218de74437d462e "Exynos5: Fix errata 773022 and 774769 on Exynos5250".

So if everyone's ok with this, I think it can be closed as a duplicate of bug 1081417.

> Btw, what is the issue with hwclock that requires you to touch the files? Doesn't Ubuntu update the system time automatically when it is connected to internet?

apparently not :). And sometimes I boot the board without it being connected. I tried 'hwclock' in the past and it would complain about the rtc device not being found. I guess this has been fixed in linux-samsung, so I have since set the date manually and wrote it to the h/w RTC now. Problem solved.

Thanks everybody,

Kim

Revision history for this message
Zi Shen Lim (zlim) wrote :

This is a sample log of successful build on arndale (with updated u-boot): http://validation.linaro.org/scheduler/job/68387/log_file

Thanks to Kim for identifying the u-boot fix, and everyone for helping track/resolve this issue :)

For reference:
1. http://irclogs.linaro.org/2013/08/22/%23linaro-networking.html
2. http://irclogs.linaro.org/2013/08/22/%23linaro-lava.html

Changed in arndale:
status: New → Fix Released
Changed in linaro-networking:
status: New → Fix Released
Revision history for this message
Zi Shen Lim (zlim) wrote :

Thanks to team for updating u-boot on arndales in LAVA lab.
The observed issue on arndale is resolved with the current version: U-Boot 2013.01.-rc1 (Jul 10 2013 - 15:16:09) for ARNDALE5250

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.