-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault of node 10.8.0 x64 on Fedora 27 when running from PATH
#22319
Comments
Just tried |
Update, ok this is super-strange... never mind my last comment, the nightly has the same issue. It appears that the problem happens only when node is executed via a directory in the Works fine when running
But borks when running the same binary from the
Also, it works fine as |
PATH
The tar.xz download from nodejs.org doesn't contain nor link to |
Ah, interesting. Do you have any idea why this might be happening? As you can see from the
And this issue does not happen with either node 8 or 9, which are installed in exactly the same way as 10. |
Attached is the output of
|
I found out that |
At this point I'd cc @nodejs/platform-linux but we don't appear to have such a group 😞 . |
On Fedora 28 I had the same issue. I have no clue where my libnode.so came from. But thanks for giving the full debug logs. Learnt something new about strace and coredumps. 👍 |
@hmt You can try
The path you can get from the output of That might tell you something useful about which rpm it came from, and if it isn't a package on your system then it was probably installed manually at some point. I still think that something is wrong with nodes internals though. |
@nodejs/build Any thoughts/insights on this one? |
nope, and I agree, Node shouldn't be trying to load libnode if it's a stand-alone build. I'm trying to find something in the commit list for 10 that are not in 8 that might point to a change that might be implicated but nothing is standing out. There has been a little bit of work to make compiling Node as a shared library so perhaps it's related to that. 🤷♂️ @bnoordhuis any thoughts on where to look for this one? |
Nothing I can think of without having a closer look I'm afraid. If I have time I'll try to take a look later this week but it might not be until next week as this is a short week for me (not working Friday). |
#25733 looks similar and was reported on Ubuntu. |
@rocketraman - is it still reproducible? IMO this has something to do with dynamic linker / loader's symbol lookup being over-riden by some system settings. excerpts from the dump:
this would mean the symbol excerpts from strace:
the library was loaded (soon?) after the ld cache was contacted, indicating the library being selected by some system (ld) config? is there any output from
is there any output from
|
@gireeshpunathil Yes, easily reproducible.
As I noted in comment #22319 (comment) the latter of those two comes from atom-libs:
and when that is removed, the problem goes away. As also mentioned previously, when node is run as |
@rocketraman - I tried the same steps, but could not reproduce this issue. At the same time, I am unable to mimic the setting that resulted in your ouput of |
@gireeshpunathil I installed atom a long time ago, and I found the rpm for Give that a shot? |
ah! that did the trick! thanks.
same as your case! I will debug this! |
ok, further insights:
this If the object reference (node) does not contain slashes in it, the dynamic linker/loader searches the cache file /etc/ld.so.cache for libraries to be used for symbol lookup that is required in the said object. In this case, the cache was populated by upto node v11.6.0 , node is built with
pay special attention to So this explains:
Hope this helps. |
@rocketraman - any concerns / observations on the above finding? I am closing this as resolved, feel free to re-open if you think there is something outstanding. |
Thanks @gireeshpunathil -- note that node 8 and 9 also did not suffer from this issue, so it looks like the librt stuff was added in 10, and then removed again in 11.7? I can't pretend to understand all the intricacies of this, but it sounds like the behavior has been explained, and good workarounds are available, so I'm good with closing it. Thanks! |
can someone explain this issue in layman term? I'm new in nodejs. |
@od2 Basically node 10 to 11.7 had an alternate library loading mechanism (via librt) which was broken in certain situations, which includes loading an external (and incorrect) libnode when running node from the PATH (i.e. having no slashes in the executable name). To "solve" the problem do one of the following:
|
I get a segfault just by running
node
-- no arguments, just trying to get an interactive shell:Here is the output from
coredumpctl
:This is running
node
directly from the tar.xz download on nodejs.org (sha256 sum verified).Node 8 and 9 work without any issues.
The text was updated successfully, but these errors were encountered: