mozjs: specify TMPDIR
PATCH 1/1 mozjs: specify TMPDIR
Although it is extremely rare the following type of error can occur during configuration:
Creating /tmp/conftest.i53clm4z.cpp with content:
...
x86_64-wrs-linux-g++: error: /tmp/conftest.i53clm4z.cpp: No such file or directory x86_64-wrs-linux-g++: error: /tmp/conftest.i53clm4z.cpp: No such file or directory x86_64-wrs-linux-g++: fatal error: no input files
So, specify a local directory as TMPDIR during configuration.
--- .../dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb +3 -1
@@ -100,7 +100,9 @@ do_configure() { autoconf213 --macrodir=${STAGING_DATADIR_NATIVE}/autoconf213 old-configure.in > old-configure cd ${B} - ${S}/js/src/configure ${EXTRA_OECONF} + # use of /tmp can causes problems on heavily loaded hosts + mkdir -p "${B}/lcl_tmp" + TMPDIR="${B}/lcl_tmp" ${S}/js/src/configure ${EXTRA_OECONF} # Make standard Makefile checks pass touch ${S}/js/src/configure
Signature · 1 line
2.7.4
Quoted 11 lines · Joe Slater
Although it is extremely rare the following type of error can occur during configuration:
Creating
/tmp/conftest.i53clm4z.cppwith content:
...
x86_64-wrs-linux-g++: error:/tmp/conftest.i53clm4z.cpp: No such file or directory x86_64-wrs-linux-g++: error:/tmp/conftest.i53clm4z.cpp: No such file or directory x86_64-wrs-linux-g++: fatal error: no input filesSo, specify a local directory as TMPDIR during configuration.
Do we know the real underlying issue ? it's not clear to me from description
/tmp is always mounted on linux build systems so I am assuming its hitting some sort of race condition
since /tmp is mounted using tmpfs it might be more evident since its faster whereas when its pointing to custom
dir on HDD its hiding the underlying issue.
IOW how is the problem manifested and how is this patch helping ?
Quoted 25 lines
Signed-off-by Joe Slater <[email protected]>--- .../dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb +3
-2@@ -100,7 +100,9 @@ do_configure() { autoconf213 --macrodir=${STAGING_DATADIR_NATIVE}/autoconf213 old-configure.in > old-configure cd ${B} - ${S}/js/src/configure ${EXTRA_OECONF} + # use of /tmp can causes problems on heavily loaded hosts + mkdir -p "${B}/lcl_tmp" + TMPDIR="${B}/lcl_tmp" ${S}/js/src/configure ${EXTRA_OECONF} # Make standard Makefile checks pass touch ${S}/js/src/configure --2.7.4
The symptom seems to be that sometimes, when a lot of similar tempfiles are created under /tmp, a file will be created that cannot be read once the original fd is closed. Moving where these files are created might avoid some underlying problem, but it also might just reduce the failure rate to something so low that you never see it. There should probably be more investigation into what is going on, but it is hard to put much effort into dealing with something that (usually) occurs very rarely and is easily avoided.
Joe
-----Original Message-----
From: Khem Raj <[email protected]>
Sent: Tuesday, August 11, 2020 4:04 PM
To: Slater, Joseph <[email protected]>
Cc: openembeded-devel <[email protected]>; MacLeod, Randy <[email protected]>
Subject: Re: [oe] [meta-oe][PATCH 1/1] mozjs: specify TMPDIR
Quoted 12 lines · Joe Slater
Although it is extremely rare the following type of error can occur during configuration:
Creating
/tmp/conftest.i53clm4z.cppwith content:
...
x86_64-wrs-linux-g++: error:/tmp/conftest.i53clm4z.cpp: No such file or directory
x86_64-wrs-linux-g++: error:/tmp/conftest.i53clm4z.cpp: No such file or directory
x86_64-wrs-linux-g++: fatal error: no input files
Quoted 1 line
So, specify a local directory as TMPDIR during configuration.
Do we know the real underlying issue ? it's not clear to me from description
/tmp is always mounted on linux build systems so I am assuming its hitting some sort of race condition since /tmp is mounted using tmpfs it might be more evident since its faster whereas when its pointing to custom dir on HDD its hiding the underlying issue.
IOW how is the problem manifested and how is this patch helping ?
Quoted 34 lines
Signed-off-by Joe Slater <[email protected]>---
.../dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb
| 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)(quoted diff) +0
-0a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9 .0.bb b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9 .0.bb
index f13a184..629c652 100644
---
a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9 .0.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_ +++ 60.9.0.bb(quoted diff) +0
-0@@ -100,7 +100,9 @@ do_configure() { autoconf213 --macrodir=${STAGING_DATADIR_NATIVE}/autoconf213old-configure.in > old-configure
cd ${B}meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb +3
-2- ${S}/js/src/configure ${EXTRA_OECONF} + # use of /tmp can causes problems on heavily loaded hosts + mkdir -p "${B}/lcl_tmp" + TMPDIR="${B}/lcl_tmp" ${S}/js/src/configure ${EXTRA_OECONF} # Make standard Makefile checks pass touch ${S}/js/src/configure --2.7.4
Quoted 3 lines · Joseph
The symptom seems to be that sometimes, when a lot of similar tempfiles are created under /tmp, a file will be created that cannot be read once the original fd is closed. Moving where these files are created might avoid some underlying problem, but it also might just reduce the failure rate to something so low that you never see it. There should probably be more investigation into what is going on, but it is hard to put much effort into dealing with something that (usually) occurs very rarely and is easily avoided.
this issue has never shown up on builders that I have access to, and I would be interested to know if there are more users seeing this issue as well.
I think we need some more reports on these lines for this change since it will impact everyone
Quoted 65 lines
Joe
-----Original Message-----
From: Khem Raj <[email protected]>
Sent: Tuesday, August 11, 2020 4:04 PM
To: Slater, Joseph <[email protected]>
Cc: openembeded-devel <[email protected]>; MacLeod, Randy <[email protected]>
Subject: Re: [oe] [meta-oe][PATCH 1/1] mozjs: specify TMPDIRQuoted 12 lines · Joe Slater
Although it is extremely rare the following type of error can occur during configuration:
Creating
/tmp/conftest.i53clm4z.cppwith content:
...
x86_64-wrs-linux-g++: error:/tmp/conftest.i53clm4z.cpp: No such file or directory
x86_64-wrs-linux-g++: error:/tmp/conftest.i53clm4z.cpp: No such file or directory
x86_64-wrs-linux-g++: fatal error: no input filesQuoted 1 line
So, specify a local directory as TMPDIR during configuration.
Do we know the real underlying issue ? it's not clear to me from description
/tmp is always mounted on linux build systems so I am assuming its hitting some sort of race condition since /tmp is mounted using tmpfs it might be more evident since its faster whereas when its pointing to custom dir on HDD its hiding the underlying issue.
IOW how is the problem manifested and how is this patch helping ?
Quoted 34 lines
Signed-off-by Joe Slater <[email protected]>---
.../dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb
| 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9 .0.bb b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9 .0.bb
index f13a184..629c652 100644
---
a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9 .0.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_ +++ 60.9.0.bb(quoted diff) +0
-0@@ -100,7 +100,9 @@ do_configure() { autoconf213 --macrodir=${STAGING_DATADIR_NATIVE}/autoconf213old-configure.in > old-configure
cd ${B}meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb +3
-2- ${S}/js/src/configure ${EXTRA_OECONF} + # use of /tmp can causes problems on heavily loaded hosts + mkdir -p "${B}/lcl_tmp" + TMPDIR="${B}/lcl_tmp" ${S}/js/src/configure ${EXTRA_OECONF} # Make standard Makefile checks pass touch ${S}/js/src/configure --2.7.4