| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
LGTM with a request and a suggestion.
Sorry, something went wrong.
There was a problem hiding this comment.
Wouldn't -L (symbolic link) make more sense?
Can you add a comment here and below explaining why the check is necessary? It's going to look superfluous to the casual reader.
Sorry, something went wrong.
There was a problem hiding this comment.
Yep I'll add a comment - that's a fair point.
Regarding -L, to be honest I wasn't certain it was standard sh syntax and also it would stop someone deliberately overriding it with an executable if they wanted to for any reason, although it appears to work on all the systems I've tried (AIX, Solaris, OS X, and of course linux) so I can add that in along with the -r (Since -L in itself will pass if it's a symlink that points to nothing which wouldn't be useful!)
Sorry, something went wrong.
The node -> out/*/node symlink is getting recreated in parallel with other targets in the makefile which require it (e.g. test-ci) and this seems to be causing a race condition which is showing up on AIX Ref: nodejs#9825
|
@bnoordhuis Done - have added both checks as per my comment on your review. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, it'd be nice to have something that checks that the symlink points to out/Release/node, but there doesn't seem to be a good POSIX way of doing it.
Sorry, something went wrong.
|
We could do, and while I'm not 100% against it I'm somewhat reluctant to use something that could limit portability (it doesn't work on a pure bourne shell). |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
@sxa555 Makes sense. In the future if not doing the check does cause issues for someone we can consider using something like -ef, but it's not currently a problem. |
Sorry, something went wrong.
|
Think this is ready to land. CI run here: https://ci.nodejs.org/job/node-test-pull-request/5206/ |
Sorry, something went wrong.
|
Only failure in CI is on ARM and it looks like the machine had a connection problem as opposed to any specific tests failing. Will land. |
Sorry, something went wrong.
The node -> out/*/node symlink is getting recreated in parallel with other targets in the makefile which require it (e.g. test-ci) and this seems to be causing a race condition which is showing up on AIX Fixes: #9825 PR-URL: #9827 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
|
This needs to land together with #10153 wherever it lands |
Sorry, something went wrong.
Currently when running make node_g the following error is displayed: if [ ! -r node -o ! -L ]; then ln -fs out/Debug/node node_g; fi /bin/sh: line 0: [: argument expected It looks like there was a typo for the NODE_EXE where node became lowercase instead of uppercase. Ref: #9827 PR-URL: #10153 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
The node -> out/*/node symlink is getting recreated in parallel with other targets in the makefile which require it (e.g. test-ci) and this seems to be causing a race condition which is showing up on AIX Fixes: #9825 PR-URL: #9827 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
Currently when running make node_g the following error is displayed: if [ ! -r node -o ! -L ]; then ln -fs out/Debug/node node_g; fi /bin/sh: line 0: [: argument expected It looks like there was a typo for the NODE_EXE where node became lowercase instead of uppercase. Ref: #9827 PR-URL: #10153 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
The node -> out/*/node symlink is getting recreated in parallel with other targets in the makefile which require it (e.g. test-ci) and this seems to be causing a race condition which is showing up on AIX Fixes: nodejs#9825 PR-URL: nodejs#9827 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
The node -> out/*/node symlink is getting recreated in parallel with other targets in the makefile which require it (e.g. test-ci) and this seems to be causing a race condition which is showing up on AIX Fixes: #9825 PR-URL: #9827 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
Currently when running make node_g the following error is displayed: if [ ! -r node -o ! -L ]; then ln -fs out/Debug/node node_g; fi /bin/sh: line 0: [: argument expected It looks like there was a typo for the NODE_EXE where node became lowercase instead of uppercase. Ref: #9827 PR-URL: #10153 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
The node -> out/*/node symlink is getting recreated in parallel with other targets in the makefile which require it (e.g. test-ci) and this seems to be causing a race condition which is showing up on AIX Fixes: #9825 PR-URL: #9827 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
Currently when running make node_g the following error is displayed: if [ ! -r node -o ! -L ]; then ln -fs out/Debug/node node_g; fi /bin/sh: line 0: [: argument expected It looks like there was a typo for the NODE_EXE where node became lowercase instead of uppercase. Ref: #9827 PR-URL: #10153 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
The node -> out/*/node symlink is getting recreated in parallel with other targets in the makefile which require it (e.g. test-ci) and this seems to be causing a race condition which is showing up on AIX Fixes: #9825 PR-URL: #9827 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
Currently when running make node_g the following error is displayed: if [ ! -r node -o ! -L ]; then ln -fs out/Debug/node node_g; fi /bin/sh: line 0: [: argument expected It looks like there was a typo for the NODE_EXE where node became lowercase instead of uppercase. Ref: #9827 PR-URL: #10153 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
The node -> out/*/node symlink is getting recreated in parallel with other targets in the makefile which require it (e.g. test-ci) and this seems to be causing a race condition which is showing up on AIX Fixes: #9825 PR-URL: #9827 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
Currently when running make node_g the following error is displayed: if [ ! -r node -o ! -L ]; then ln -fs out/Debug/node node_g; fi /bin/sh: line 0: [: argument expected It looks like there was a typo for the NODE_EXE where node became lowercase instead of uppercase. Ref: #9827 PR-URL: #10153 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
| Back | FazBrowse Home | New Git URL |
Description of change
Checklist
Affected core subsystem(s)
build
Description of change
Ref: #9825
This PR will stop the "ln -sf out/Release node node" (and it's Debug equivalent) from occurring if it is already in place. This appears to be causing a problem when it is executed in parallel with the node-gyp execution for the build-addons target as it appears to be triggering a race condition (visible in the AIX CI as per the referenced issue although I haven't replicated it on my own system) whereby the deletion of the symlink (A result of the -f) is leaving a small window before it is recreated where the addons build runs, which requires the node symlink to be in place. I can see no obvious reason why this would have ONLY showed up on the v4 release as the same condition can occur on master as far as I can tell.
The disadvantage of the solution in this PR is that if "node" already existed and wasn't previously a symlink to out/Release node then it won't overwrite it. I'm open to alternative suggestions on this - checking the output from "diff node out/Release/node" before replacing would work for example. Tagging @bnoordhuis as he has made some comments in Makefile around thisagainst the build-addons target in the makefile. The problem also goes away if the $(NODE_EXE) target is not listed as ".PHONY" but since that was done for sensible reasons I assume we need to leave that in place, and this is really just a "workaround" for the fact it's not a true dependency.