Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 352198 - =sys-process/audit-1.7.3 intermittent failure to emerge (missing .h, make exits with jobserver tokens available)
Summary: =sys-process/audit-1.7.3 intermittent failure to emerge (missing .h, make exi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-20 02:36 UTC by Israel G. Lugo
Modified: 2011-01-25 03:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info =sys-process/audit-1.7.3 (info.txt,4.36 KB, text/plain)
2011-01-20 02:43 UTC, Israel G. Lugo
Details
build.log of the first failure (gcc-4.3.4) (build-first-failure.log,51.99 KB, text/plain)
2011-01-20 02:46 UTC, Israel G. Lugo
Details
build.log of the second failure (gcc-4.4.4) (build-second-failure.log,51.99 KB, text/plain)
2011-01-20 02:47 UTC, Israel G. Lugo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Israel G. Lugo 2011-01-20 02:36:59 UTC
Emerging =sys-process/audit-1.7.3 fails intermittently with the following error:

[...]
make[2]: Entering directory `/tmp/portage/sys-process/audit-1.7.3/work/audit-1.7.3/src/mt'
cp ../../lib/libaudit.h .
cp ../../lib/gen_tables.h .
cp ../../lib/i386_tables.h .
cp ../../lib/ia64_tables.h .
cp ../../lib/ppc_tables.h .
cp ../../lib/s390_tables.h .
cp ../../lib/s390x_tables.h .
cp ../../lib/x86_64_tables.h .
cp ../../lib/alpha_tables.h .
cp ../../lib/actiontabs.h .
cp ../../lib/fieldtabs.h .
cp ../../lib/flagtabs.h .
cp ../../lib/machinetabs.h .
cp ../../lib/msg_typetabs.h .
cp ../../lib/optabs.h .
cp ../../lib/errtabs.h .
cp ../../lib/audit_logging.c .
cp ../../lib/message.c .
cp ../../lib/netlink.c .
cp ../../lib/lookup_table.c .
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../..    -fPIC -DPIC -D_REENTRANT -D_GNU_SOURCE -O2 -march=opteron -pipe -c audit_logging.c
audit_logging.c:37:21: error: private.h: No such file or directory
audit_logging.c: In function 'audit_log_user_message':
audit_logging.c:238: error: 'HIDE_IT' undeclared (first use in this function)
audit_logging.c:238: error: (Each undeclared identifier is reported only once
audit_logging.c:238: error: for each function it appears in.)
audit_logging.c: In function 'audit_log_user_comm_message':
audit_logging.c:302: error: 'HIDE_IT' undeclared (first use in this function)
audit_logging.c: In function 'audit_log_acct_message':
audit_logging.c:405: error: 'REAL_ERR' undeclared (first use in this function)
audit_logging.c: In function 'audit_log_user_avc_message':
audit_logging.c:456: error: 'REAL_ERR' undeclared (first use in this function)
audit_logging.c: In function 'audit_log_semanage_message':
audit_logging.c:581: error: 'REAL_ERR' undeclared (first use in this function)
audit_logging.c: In function 'audit_log_user_command':
audit_logging.c:694: error: 'HIDE_IT' undeclared (first use in this function)
make[2]: *** [audit_logging.o] Error 1
make[2]: Leaving directory `/tmp/portage/sys-process/audit-1.7.3/work/audit-1.7.3/src/mt'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/portage/sys-process/audit-1.7.3/work/audit-1.7.3'
make: *** [all] Error 2
make: INTERNAL: Exiting with 4 jobserver tokens available; should be 3!
emake failed
 * ERROR: sys-process/audit-1.7.3 failed:
 *   emake failed
 *
 * Call stack:
 *     ebuild.sh, line  56:  Called src_compile
 *   environment, line 5140:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed"

Checking the source of the failed build, the "private.h" file is located on the following 2 directories:
audit-1.7.3 # find -name private.h
./lib/private.h
./auparse/private.h

I have tried to emerge this at least 4 times, that I can remember. It failed, then succeeded, then failed, then succeeded. The times it failed was during emerge -ve world; the times it succeeded was manually emerging the single package (emerge -va1 =sys-process/audit-1.7.3). The first failure happened using gcc-4.3.4, the second failure happened using gcc-4.4.4.

I am using EMERGE_DEFAULT_OPTS="--jobs=2 --load-average=3" and MAKEOPTS="--jobs=3 --load-average=3". This is an amd64 hardened multiuser server.

I've experienced similar intermittent failures with the same internal make error on another server (different hardware), with another package (=dev-vcs/git-1.7.3.4-r1). I've reported that as bug 351663; perhaps the two are related? Perhaps this is a parallelism issue, something that includes private.h without the Makefile knowing about it?

Again, the dev-vcs/git thing happened on a completely separate server, with a completely separate installation (x86 hardened).

I will attach the build.log's of both failed build attempts. They are slightly different but both error out on the same part.

I have a tgz of the build directory for each of the failed attempts and can attach them here if that will help.
Comment 1 Israel G. Lugo 2011-01-20 02:43:24 UTC
Created attachment 260324 [details]
emerge --info =sys-process/audit-1.7.3

Attaching system info from the last time the emerge failed.
Comment 2 Israel G. Lugo 2011-01-20 02:46:59 UTC
Created attachment 260326 [details]
build.log of the first failure (gcc-4.3.4)

Attaching build.log of the first failure. I can produce the .tgz of this build directory if necessary.
Comment 3 Israel G. Lugo 2011-01-20 02:47:31 UTC
Created attachment 260328 [details]
build.log of the second failure (gcc-4.4.4)

Attaching build.log of the second failure. I can also produce a .tgz of this build directory.
Comment 4 Rafał Mużyło 2011-01-20 03:10:22 UTC
So, then test, if '-j1' helps.
Comment 5 Israel G. Lugo 2011-01-20 04:03:04 UTC
(In reply to comment #4)
> So, then test, if '-j1' helps.
> 

I have been unable to reproduce the problem by emerging the ebuild individually, even with the current -j setting. I tried "emerge -va1 =sys-process/audit-1.7.3" 5 times since, and it always succeeded.

It may be purely random, or it may be related to other ebuilds building at the same time. Unfortunately, this is a production server and I need to resume my normal work on it as there are still several changes that need to be made. I shall try a new emerge -ve world to see if it fails again.
Comment 6 Wormo (RETIRED) gentoo-dev 2011-01-20 07:08:49 UTC
Yes, it does look like a parallel build bug.

The problem is in the Makefile -- audit_logging.c doesn't list private.h as a dependency, so for parallel builds it is not guaranteed to have been copied into the src/mt directory in time for the compile to succeed. Having other builds going at the same time (emerge world) changes the timing and must make you run into this race more easily.
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-25 03:52:31 UTC
Fixed in 2.0.5 and backported to other versions.