Bug 402 - Parallel build failures for gcc-cross-intermediate-4.5.0-r10
Summary: Parallel build failures for gcc-cross-intermediate-4.5.0-r10
Status: RESOLVED WORKSFORME
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium minor
Target Milestone: 1.0 M4
Assignee: Nitin Kamble
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-10-06 11:52 UTC by Alex deVries
Modified: 2011-02-14 16:46 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
Log showing build failure for parallel compile of gcc-cross-intermediate. (171.46 KB, text/plain)
2010-10-06 11:52 UTC, Alex deVries
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex deVries 2010-10-06 11:52:25 UTC
Created attachment 51 [details]
Log showing  build failure for parallel compile of gcc-cross-intermediate.

I'm building with -j8, and building gcc-cross-intermediate fails.  Rerunning that stage of the build helsp it continue. This smells like a parallel build failure.

 This machine is a 16 x 
   model name	: Intel(R) Xeon(R) CPU           E5520  @ 2.27GHz

My local.conf shows:
BB_NUMBER_THREADS = "8"
PARALLEL_MAKE = "-j 8"

Log is attached, but finishes off with:

...

| configure: updating cache ./config.cache
| configure: creating ./config.status
| config.status: creating as
| config.status: creating collect-ld
| config.status: creating nm
| config.status: creating Makefile
| config.status: creating gccbug
| config.status: creating ada/gcc-interface/Makefile
| config.status: creating ada/Makefile
| config.status: creating auto-host.h
| config.status: executing default commands
| make[1]: *** wait: No child processes.  Stop.
| make: *** [all] Error 2
| make: INTERNAL: Exiting with 6 jobserver tokens available; should be 8!
| FATAL: oe_runmake failed
NOTE: package gcc-cross-intermediate-4.5.0-r10: task do_compile: Failed
ERROR: Task 8 (/home/alex/poky/poky/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.0.bb, do_compile) failed with 1
ERROR: '/home/alex/poky/poky/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.0.bb' failed
Comment 1 Richard Purdie 2010-10-07 02:12:37 UTC
Alex, which filesystem type is this running on? Which OS is the machine running and what version of make?
Comment 2 Alex deVries 2010-10-07 10:28:59 UTC
This is:

alex@sweet:~$ cat /etc/debian_version 
squeeze/sid

Filesystem is ext4.

alex@sweet:~$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu


One thing I neglected in the first bug report is that this was run under strace, which may have either exposed an existing parallel build bug, or caused it.

I'll do a rebuild without strace and see.  I'd rather keep this bug open until we know a solution to running it under strace (or an LD_PRELOAD replacement).
Comment 3 Richard Purdie 2010-10-07 11:11:23 UTC
The main failure looks like its in make, not gcc itself. I strongly suspect strace being responsible for this somehow. This information should at least help someone else reproduce. I agree with keeping the bug open but the information may change its priority.
Comment 4 Richard Purdie 2010-10-11 07:14:41 UTC
Further testing shows this only effects swabber runs and is related to the use of strace, therefore making it a bug for 1.0, not 0.9.
Comment 5 Nitin Kamble 2010-12-14 20:26:03 UTC
I have built gcc many many times. I have never seen this bug. My machine is corei7, 4 cores +HT (8 threads). with make -j8 I never saw this issue.
Comment 6 Nitin Kamble 2011-02-08 15:14:07 UTC
From Beth heard that the current swabber support is not stable, so waiting for swabber support to work for reproducing this issue.
Comment 7 Alex deVries 2011-02-09 07:01:10 UTC
Wait a second.

What's currently unstable with swabber is the post-processing.  This bug isn't about post-processing, it is about the log collection that's required as an input to swabber.  The bug here is with building gcc under strace. Swabber will never work unless this bug is addressed.

You should be able to reproduce this bug today regardless of the state of swabber post-processing. Just turn on swabber and do a parallel build. If you've done that and it doesn't fail, this bug should be marked as not reproducible.

However, there is currently an acceptable workaround (which is single-threaded make, as included in the swabber recipe).  But it is important to keep this bug on the books so we have something to close when we do have a proper solution (and I think we do).

I'm not sure how to do this in this implementation of bugzilla, but the right status is:
- this is an open bug
- there is a workaround
- this is a low priority
Comment 8 Nitin Kamble 2011-02-09 08:31:29 UTC
Alex,
  Thanks for this informaion. Now I understnad the bug little better. 
Nitin
Comment 9 Nitin Kamble 2011-02-09 12:07:07 UTC
I am seeing different error. Looks like issue with swabber, and not with gcc or make.

Nitin


NOTE: package gcc-cross-4.5.1-r2: task do_populate_sysroot: Succeeded
NOTE: package eglibc-2.12-r13: task do_package: Succeeded
NOTE: Running task 949 of 953 (ID: 118, /home/nitin/prj/poky.git/meta/recipes-core/eglibc/eglibc_2.12.bb, do_package_write_rpm)
NOTE: Running task 950 of 953 (ID: 117, /home/nitin/prj/poky.git/meta/recipes-core/eglibc/eglibc_2.12.bb, do_package_write_ipk)
NOTE: package eglibc-2.12-r13: task do_package_write_rpm: Started
NOTE: package eglibc-2.12-r13: task do_package_write_ipk: Started
NOTE: package eglibc-2.12-r13: task do_package_write_ipk: Succeeded
NOTE: package eglibc-2.12-r13: task do_package_write_rpm: Succeeded
NOTE: Running noexec task 951 of 953 (ID: 114, /home/nitin/prj/poky.git/meta/recipes-core/eglibc/eglibc_2.12.bb, do_package_write)
NOTE: Running noexec task 952 of 953 (ID: 6, /home/nitin/prj/poky.git/meta/recipes-devtools/gcc/gcc-cross_4.5.1.bb, do_build)
NOTE: Running task 953 of 953 (ID: 4, /home/nitin/prj/poky.git/meta/recipes-devtools/gcc/gcc-cross_4.5.1.bb, do_generate_swabber_report)
NOTE: package gcc-cross-4.5.1-r2: task do_generate_swabber_report: Started
ERROR: '/home/nitin/prj/poky.git/meta/recipes-devtools/gcc/gcc-cross_4.5.1.bb' failed
ERROR: Function 'do_generate_swabber_report' failed (see /disk0/pokybuild/build0/tmp/work/i586-poky-linux/gcc-cross-4.5.1-r2/temp/log.do_generate_swabber_report.4654 for further information)
ERROR: Logfile of failure stored in: /disk0/pokybuild/build0/tmp/work/i586-poky-linux/gcc-cross-4.5.1-r2/temp/log.do_generate_swabber_report.4654
Log data follows:
| Distribution is fedora-S-64
| Regenerating
| Reading package directory from /var/lib/rpm, writing out to /disk0/pokybuild/build0/tmp/host-contamination-data/
| Looks like an RPM distribution to me...
| Generating swabber report
| /disk0/pokybuild/build0/tmp/work/i586-poky-linux/gcc-cross-4.5.1-r2/temp/run.do_generate_swabber_report.4654: line 83: 20499 Segmentation fault      (core dumped) swabber -d /disk0/pokybuild/build0/tmp/host-contamination-data/ -l /disk0/pokybuild/build0/tmp/log/contamination-logs -o /disk0/pokybuild/build0/tmp/log/swabber//report-${REPORTSTAMP}.txt -r /disk0/pokybuild/build0/tmp/log/swabber//extra_report-${REPORTSTAMP}.txt -c all -p /disk0/pokybuild/build0 -f ${OEROOT}/meta/conf/swabber /disk0/pokybuild/build0 ${OEROOT} ${CCACHE_DIR}
| ERROR: Function 'do_generate_swabber_report' failed (see /disk0/pokybuild/build0/tmp/work/i586-poky-linux/gcc-cross-4.5.1-r2/temp/log.do_generate_swabber_report.4654 for further information)
NOTE: package gcc-cross-4.5.1-r2: task do_generate_swabber_report: Failed
ERROR: Task 4 (/home/nitin/prj/poky.git/meta/recipes-devtools/gcc/gcc-cross_4.5.1.bb, do_generate_swabber_report) failed with exit code '1'
Comment 10 Nitin Kamble 2011-02-14 16:46:54 UTC
can't reproduce the gcc failure.