[Bug 780612] New: KBUILD: attempting execve("fixdep") before chmod("fixdep", 0755) completes
https://bugzilla.novell.com/show_bug.cgi?id=780612 https://bugzilla.novell.com/show_bug.cgi?id=780612#c0 Summary: KBUILD: attempting execve("fixdep") before chmod("fixdep", 0755) completes Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: i686 OS/Version: openSUSE 12.2 Status: NEW Severity: Minor Priority: P5 - None Component: Kernel AssignedTo: kernel-maintainers@forge.provo.novell.com ReportedBy: from-suse@I-love.SAKURA.ne.jp QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20100101 Firefox/15.0.1 Under parallel build, one make process sometimes tries to call execve("scripts/basic/fixdep") before chmod("scripts/basic/fixdep", 0755) requested by ld (invoked by gcc from the other make process) completes. As a result, build fails due to "Permission denied" error. As far as I tested, this is SUSE specific bug, for I don't see this problem when compiling vanilla kernels without using rpmbuild. Reproducible: Sometimes Steps to Reproduce: (1) Install openSUSE 12.2 with minimum packages. (2) Install packages needed for compiling kernel. rpm -ivh http://download.opensuse.org/source/distribution/12.2/repo/oss/suse/src/kern... rpm -ivh http://download.opensuse.org/source/distribution/12.2/repo/oss/suse/nosrc/ke... zypper install rpm-build sparse fdupes (3) Try to compile kernel with "make -j2". rpmbuild -bb --target i686 --define '%_smp_mflags -j2' /usr/src/packages/SPECS/kernel-default.spec Actual Results: If it raced, it will generate like below output. (...snipped...) + test -e /usr/src/packages/BUILD/kernel-default-3.4.6/kabi/i386/symtypes-default + true + make -j2 all CONFIG_DEBUG_SECTION_MISMATCH=y + tee buildlog make[3]: Nothing to be done for `all'. HOSTCC arch/x86/tools/relocs GEN /usr/src/packages/BUILD/kernel-default-3.4.6/linux-obj/Makefile CHK include/linux/version.h CHK include/generated/utsrelease.h HOSTCC scripts/basic/fixdep /bin/sh: scripts/basic/fixdep: Permission denied make[3]: *** [arch/x86/tools/relocs] Error 1 make[2]: *** [archscripts] Error 2 make[2]: *** Waiting for unfinished jobs.... /bin/sh: scripts/basic/fixdep: Permission denied make[3]: *** [scripts/basic/fixdep] Error 1 make[2]: *** [scripts_basic] Error 2 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 + test 2 -eq 0 + test 00 -gt 0 + exit 1 error: Bad exit status from /var/tmp/rpm-tmp.Jvpp8f (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.Jvpp8f (%build) Expected Results: If it did not race, it will generate like below output. (...snipped...) + test -e /usr/src/packages/BUILD/kernel-default-3.4.6/kabi/i386/symtypes-default + true + make -j2 all CONFIG_DEBUG_SECTION_MISMATCH=y + tee buildlog make[3]: Nothing to be done for `all'. HOSTCC arch/x86/tools/relocs Using /usr/src/packages/BUILD/kernel-default-3.4.6/linux-3.4 as source for kernel GEN /usr/src/packages/BUILD/kernel-default-3.4.6/linux-obj/Makefile CHK include/linux/version.h CHK include/generated/utsrelease.h HOSTCC scripts/basic/fixdep CC kernel/bounds.s GEN include/generated/bounds.h CC arch/x86/kernel/asm-offsets.s GEN include/generated/asm-offsets.h CALL /usr/src/packages/BUILD/kernel-default-3.4.6/linux-3.4/scripts/checksyscalls.sh HOSTCC scripts/genksyms/genksyms.o HOSTCC scripts/genksyms/lex.lex.o HOSTCC scripts/genksyms/parse.tab.o HOSTLD scripts/genksyms/genksyms CC scripts/mod/empty.o HOSTCC scripts/mod/mk_elfconfig MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/modpost.o HOSTCC scripts/mod/sumversion.o HOSTLD scripts/mod/modpost (...snipped...) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=780612 https://bugzilla.novell.com/show_bug.cgi?id=780612#c1 Michal Marek <mmarek@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|kernel-maintainers@forge.pr |mmarek@suse.com |ovo.novell.com | --- Comment #1 from Michal Marek <mmarek@suse.com> 2012-09-17 10:53:44 UTC --- I have seen this couple of times already, but I still have no idea what causes this. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=780612 https://bugzilla.novell.com/show_bug.cgi?id=780612#c2 --- Comment #2 from Tetsuo Handa <from-suse@I-love.SAKURA.ne.jp> 2012-09-17 11:20:13 UTC --- (In reply to comment #1)
I have seen this couple of times already, but I still have no idea what causes this.
Parallel build (i.e. giving -j$NUM (where $NUM > 1)) is causing this problem. In fact, giving -j1 solves this problem. Since Makefile can describe only "whether a file exists or not" rather than "whether a file is executable or not", make process is allowed to continue as soon as scripts/basic/fixdep was created by ld process. I think ways to fix this problem is one of below. (1) Use -j1 until making scripts/basic/fixdep and then continue with -j$NUM afterwards. (2) Modify make rules for scripts/basic/fixdep to do like gcc -o scripts/basic/fixdep.tmp scripts/basic/fixdep.c mv scripts/basic/fixdep.tmp scripts/basic/fixdep in order to pause other make processes waiting for scripts/basic/fixdep to be written. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=780612 https://bugzilla.novell.com/show_bug.cgi?id=780612#c3 Jeff Mahoney <jeffm@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |WONTFIX --- Comment #3 from Jeff Mahoney <jeffm@suse.com> 2014-08-08 16:28:53 EDT --- This report is against openSUSE 12.2 which is no longer under maintenance. If you are able to reproduce it with openSUSE 13.1 or openSUSE Factory, please re-open and reset the the "Product" field to the appropriate release. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com