Wind River Support Network

HomeDefectsLIN5-22396
Fixed

LIN5-22396 : net-snmp non-deterministic builds generate race condition

Created: Jan 19, 2017    Updated: Dec 19, 2017
Resolved Date: Feb 7, 2017
Found In Version: 5.0.1.38
Fix Version: 5.0.1.39
Severity: Standard
Applicable for: Wind River Linux 5
Component/s: Userspace

Description

When building net-snmp, present in the cgp layer, the build is
non-deterministic when an application depends on
elfutils. The configuration of net-snmp will depend of the build order.

The fact that the build is non-deterministic will in some cases cause a
race condition in the builds where the file nlist.h is not present in
the sysroot, but net-snmp has somehow detected it during configuration.
With a deterministic build this should not happen.

Workaround

When looking at the latest version of net-snmp recipe upstream
(http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb?h=master)
this problem has been solved with a packageconfig to elfutils. I also
recognized a patch related to the nlist check that could be applicable. 

Steps to Reproduce

<wrl5_install>/wrlinux/configure --enable-board=qemux86-64
--enable-build=production --enable-kernel=standard
--enable-rootfs=glibc_small --enable-jobs=10
--enable-parallel-pkgbuilds=16 --enable-reconfig --enable-rm-work=no
--with-sstate-dir=../sstate-cache5_1
--with-layer=cgp,wr-security,meta-selinux --with-rcpl-version=auto 

I have simulated the application with dependency to elfutils with the
hello_1.0.bb recipe in the example below.

echo "DEPENDS += \"elfutils\"" >>
../layers/local/recipes-sample/hello/hello_1.0.bb

make bbs

* Configure net-snmp and check for nlist.h

bitbake net-snmp -c configure

find tmp/work -type d -name "do_configure" | xargs grep -R 'checking for
nlist.h'
OUTPUT:
tmp/work/x86_64-wrs-linux/net-snmp-5.7.2-r3.6/temp/do_configure/log.do_configure.604035:checking
for nlist.h... no

* Compile hello

bitbake hello -c compile

* Reconfigure net-snmp and check for nlist.h

bitbake net-snmp -c clean && bitbake net-snmp -c configure

find tmp/work -type d -name "do_configure" | xargs grep -R 'checking for
nlist.h'
OUTPUT:
tmp/work/x86_64-wrs-linux/net-snmp-5.7.2-r3.6/temp/do_configure/log.do_configure.652530:checking
for nlist.h... yes

Other Downloads


Live chat
Online