summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Congal <yoann.congal@smile.fr>2025-05-28 08:38:44 +0200
committerKhem Raj <raj.khem@gmail.com>2025-05-28 08:56:38 -0700
commit960fda5707c6a2beab163cbcf8e26fda329c6703 (patch)
tree822d1181dff02f95188a03938dad2bee79d5e617
parentb76b018396dc6b3badfb6535f755f506fb473921 (diff)
downloadmeta-openembedded-960fda5707c6a2beab163cbcf8e26fda329c6703.tar.gz
pcp: fix race condition build error
Extend and submit the existing patch fixing makefile parallelism: > Some QA binaries include localconfig.h but there is no explicit dependencies > between the binary build and the localconfig.h generation. > On heavily loaded systems, this can result in the binary being built > before localconf.h and a compilation error, e.g: > | username.c:8:10: fatal error: localconfig.h: No such file or directory > | 8 | #include "localconfig.h" > | | ^~~~~~~~~~~~~~~ > | compilation terminated. > > Fix this by adding the missing Makefile rule dependency between the > binary (or its pre-link .o) and localconfig.h. AB frequenctly lost the race condition due to (I suppose) its high CPU count and load[0]. [0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/87/builds/44/steps/32/logs/stdio (line 131) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Reviewed-by: Kéléfa Sané <kelefa.sane@smile.fr> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/pcp/pcp/fix_parallel_make.patch116
1 files changed, 108 insertions, 8 deletions
diff --git a/meta-oe/recipes-support/pcp/pcp/fix_parallel_make.patch b/meta-oe/recipes-support/pcp/pcp/fix_parallel_make.patch
index 9cb649a594..7bc045949b 100644
--- a/meta-oe/recipes-support/pcp/pcp/fix_parallel_make.patch
+++ b/meta-oe/recipes-support/pcp/pcp/fix_parallel_make.patch
@@ -1,13 +1,113 @@
1Upstream-Status: Pending 1From 92add24ccfc7e643349a1c091957595ce25a9915 Mon Sep 17 00:00:00 2001
2From: Yoann Congal <yoann.congal@smile.fr>
3Date: Tue, 27 May 2025 08:45:36 +0200
4Subject: [PATCH] QA: cleanup localconfig.h build dependencies
2 5
6Some QA binaries include localconfig.h but there is no explicit dependencies
7between the binary build and the localconfig.h generation.
8On heavily loaded systems, this can result in the binary being built
9before localconf.h and a compilation error, e.g:
10| username.c:8:10: fatal error: localconfig.h: No such file or directory
11| 8 | #include "localconfig.h"
12| | ^~~~~~~~~~~~~~~
13| compilation terminated.
14
15This can be reproduced by adding "sleep 30" at the start of the
16localconfig.h generation rule.
17
18Fix this by adding the missing Makefile rule dependency between the
19binary (or its pre-link .o) and localconfig.h.
20
21Also remove an un-needed scale.o->localconfig.h dependency.
22
23Upstream-Status: Backport [https://github.com/performancecopilot/pcp/commit/8de7bbb06703f224b72fe0994acde3189b742fd2]
24Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
25---
26 qa/src/GNUlocaldefs | 22 +++++++++++-----------
27 1 file changed, 11 insertions(+), 11 deletions(-)
28
29diff --git a/qa/src/GNUlocaldefs b/qa/src/GNUlocaldefs
30index f83826068..e47fbfd72 100644
3--- a/qa/src/GNUlocaldefs 31--- a/qa/src/GNUlocaldefs
4+++ b/qa/src/GNUlocaldefs 32+++ b/qa/src/GNUlocaldefs
5@@ -728,7 +728,7 @@ scale.o: localconfig.h 33@@ -299,7 +299,7 @@ diowr: diowr.c
34 rm -f $@
35 $(CCF) $(CDEFS) -o $@ diowr.c
36
37-endian: endian.c
38+endian: endian.c localconfig.h
39 rm -f $@
40 $(CCF) $(CDEFS) -o $@ endian.c
41
42@@ -331,15 +331,15 @@ exercise: exercise.c
43 rm -f $@
44 $(CCF) $(CDEFS) -o $@ exercise.c $(LDLIBS)
45
46-chkacc1: chkacc1.c
47+chkacc1: chkacc1.c localconfig.h
48 rm -f $@
49 $(CCF) $(CDEFS) -o $@ chkacc1.c $(LDLIBS)
50
51-chkacc2: chkacc2.c
52+chkacc2: chkacc2.c localconfig.h
53 rm -f $@
54 $(CCF) $(CDEFS) -o $@ chkacc2.c $(LDLIBS)
55
56-chkacc3: chkacc3.c
57+chkacc3: chkacc3.c localconfig.h
58 rm -f $@
59 $(CCF) $(CDEFS) -o $@ chkacc3.c $(LDLIBS)
60
61@@ -489,7 +489,7 @@ pmdashutdown: pmdashutdown.c
62 rm -f $@
63 $(CCF) $(CDEFS) -o $@ $@.c $(LDLIBS) -lpcp_pmda
64
65-dumb_pmda: dumb_pmda.c
66+dumb_pmda: dumb_pmda.c localconfig.h
67 $(CCF) $(LCDEFS) $(LCOPTS) -o $@ $@.c $(LDLIBS) -lpcp_pmda
68
69 pmdacache: pmdacache.c
70@@ -633,7 +633,7 @@ else
71 $(CCF) $(CDEFS) -o $@ $@.c $(LIB_FOR_PTHREADS) $(LDLIBS)
72 endif
73
74-multithread2: multithread2.c
75+multithread2: multithread2.c localconfig.h
76 rm -f $@
77 $(CCF) $(CDEFS) -o $@ $@.c $(LIB_FOR_PTHREADS) $(LDLIBS)
78
79@@ -786,7 +786,6 @@ $(NVIDIAQALIB): nvidia-ml.o
80 endif
81
82 arch_maxfd.o: localconfig.h
83-scale.o: localconfig.h
84
6 779246.o: libpcp.h 85 779246.o: libpcp.h
7 aggrstore.o: libpcp.h 86 aggrstore.o: libpcp.h
8 badmmv.o: libpcp.h 87@@ -847,14 +846,14 @@ multithread14.o: libpcp.h
9-chkacc1.o: libpcp.h 88 nameall.o: libpcp.h
10+chkacc1.o: libpcp.h localconfig.h 89 parsehostattrs.o: libpcp.h
11 chkacc2.o: libpcp.h 90 parsehostspec.o: libpcp.h
12 chkacc3.o: libpcp.h 91-pdubufbounds.o: libpcp.h
13 chkacc4.o: libpcp.h 92-pducheck.o: libpcp.h
93+pdubufbounds.o: libpcp.h localconfig.h
94+pducheck.o: libpcp.h localconfig.h
95 pducrash.o: libpcp.h
96-pdu-server.o: libpcp.h
97+pdu-server.o: libpcp.h localconfig.h
98 pmcdgone.o: libpcp.h
99 pmlcmacro.o: libpcp.h
100 pmnsinarchives.o: libpcp.h
101-pmnsunload.o: libpcp.h
102+pmnsunload.o: libpcp.h localconfig.h
103 proc_test.o: libpcp.h
104 qa_libpcp_compat.o: libpcp.h
105 qa_timezone.o: libpcp.h
106@@ -874,6 +873,7 @@ torture_pmns.o: libpcp.h
107 tztest.o: libpcp.h
108 unpack.o: libpcp.h
109 unpickargs.o: libpcp.h
110+username.o: localconfig.h
111 xarch.o: libpcp.h
112 xlog.o: libpcp.h
113 xmktime.o: libpcp.h