You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Official 5.6.0 binaries crash on Ubuntu Trust 14.04 x64 #5185
I have an amazon instance running Ubuntu 14.04 Trusty x86_64. When I download the "Linux Binaries" from the nodejs.org homepage, the node binary will crash just trying to open the REPL.
If I run node -v I get 5.6.0. If I run just node I get
This is very interesting crash, especially considering that we smoke test the binaries.
@cjthompson may I ask you to share it /etc/resolv.conf with us, if it doesn't contain any private information? Additionally, may I ask you to run it with strace node and gist logs?
The issue appears to be related to /etc/nsswitch.conf not being world-readable. Can anyone confirm if this makes sense? The 5.5.0 binary on the same server worked just fine.
@indutny Want to revert for now? I believe the next v5 release is next week and it'd be a shame to have it broken in two subsequent releases. (I'm assuming we won't have a fix upstreamed in that time.)
@bnoordhuis please disregard my comment about reverting it, looks like this behavior change is actually a pretty important bug fix. At least let's wait for results of dns.reverse testing that I have just asked @cjthompson about.
The patch has been landed c-ares/c-ares@e514088 . I'm going to wait for reply from c-ares team with regards to use of c-ares master branch in our repo, and depending on it we will be able to decide what to do next.
Alright, I have a green light from c-ares team. @bnoordhuis I'm going to submit PR for cherry-picking that commit as soon as I will wake up (/me is sleeptyping at the moment).
Activity
mscdex commentedon Feb 10, 2016
Does the official v5.5.0 binary work?
mscdex commentedon Feb 10, 2016
/cc @indutny
bnoordhuis commentedon Feb 10, 2016
Can't reproduce with the x86 and x64 binaries on FC23 but f1a0827 is the obvious suspect.
@cjthompson Can you try building from source with and without that commit?
indutny commentedon Feb 10, 2016
This is very interesting crash, especially considering that we smoke test the binaries.
@cjthompson may I ask you to share it
/etc/resolv.confwith us, if it doesn't contain any private information? Additionally, may I ask you to run it withstrace nodeand gist logs?Thank you so much for reporting this.
cjthompson commentedon Feb 10, 2016
The issue appears to be related to
/etc/nsswitch.confnot being world-readable. Can anyone confirm if this makes sense? The 5.5.0 binary on the same server worked just fine.EDIT: Might be related to this issue: c-ares/c-ares#33
cjthompson commentedon Feb 10, 2016
strace log: https://gist.github.com/cjthompson/5570c04744715f96dcb5
it's pretty clear at the bottom of the log there's a call to open
/etc/nsswitch.confand permission is denied at which point node promptly crashes.indutny commentedon Feb 10, 2016
@cjthompson it looks like there were no
lookupentries in/etc/resolv.confand because of this is cares tried to readnsswitch.conf.indutny commentedon Feb 10, 2016
@cjthompson and thank you very much for strace log, it really helped!
cjthompson commentedon Feb 10, 2016
At this point I think we've narrowed down the exact cause and the fact that it was a change from 5.5.0 to 5.6.0.
Let me know if there's anything more you need me to debug.
bnoordhuis commentedon Feb 10, 2016
@indutny Want to revert for now? I believe the next v5 release is next week and it'd be a shame to have it broken in two subsequent releases. (I'm assuming we won't have a fix upstreamed in that time.)
indutny commentedon Feb 10, 2016
@bnoordhuis let's revert it until resolving this.
@cjthompson may I ask you to do
stracething with 5.5.0 too? Many thanks in advance.cjthompson commentedon Feb 10, 2016
strace of 5.6.0 with
nsswitch.confpermissions set to 644 https://gist.github.com/cjthompson/6243cfc5ff1063928c90strace of 5.5.0 with
nsswitch.confpermissions set to 600https://gist.github.com/cjthompson/2889a83e10e1b0d3ad2e
indutny commentedon Feb 10, 2016
Whoa, finally found the reason why behavior is different:
node/deps/cares/src/ares_init.c
Lines 213 to 230 in 2848f84
Basically, 5.5.0 is swallowing that lookup init error. @cjthompson may I ask you to run this js snippet:
on v5.5.0 with strict permissions on
nsswitch.conf(the ones on which v5.6.0 crashes)? I expect that it will either error or (more likely) crash.indutny commentedon Feb 10, 2016
@bnoordhuis please disregard my comment about reverting it, looks like this behavior change is actually a pretty important bug fix. At least let's wait for results of
dns.reversetesting that I have just asked @cjthompson about.cjthompson commentedon Feb 10, 2016
Node 5.5.0 with nsswitch.conf permissions as 600:
node 5.5.0 and 5.6.0 with
nsswitch.confset to 644:indutny commentedon Feb 10, 2016
Ah, this is actually better than I expected. Thank you so much, @cjthompson !
@bnoordhuis looks like we will need to revert it after all. Sounds like a plain bug in c-ares. It is caused by c-ares/c-ares@46bb820 , and proposed fix is: c-ares/c-ares#39 .
We can always re-land the c-ares update after c-ares/c-ares#39 will land.
indutny commentedon Feb 11, 2016
The patch has been landed c-ares/c-ares@e514088 . I'm going to wait for reply from c-ares team with regards to use of c-ares master branch in our repo, and depending on it we will be able to decide what to do next.
indutny commentedon Feb 11, 2016
Alright, I have a green light from c-ares team. @bnoordhuis I'm going to submit PR for cherry-picking that commit as soon as I will wake up (/me is sleeptyping at the moment).
indutny commentedon Feb 11, 2016
Should be fixed by #5199
jasnell commentedon Apr 19, 2016
Is this still an issue? Do we need to keep this open?
bnoordhuis commentedon Apr 19, 2016
I'll close. I forgot to after landing the revert.