-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[regression] NodeOS don't boot with Node.js v0.11.15 (musl conflict?) #9097
Comments
I'm not familiar with NodeOS, do you think you'd have some bandwidth to find more details about why NodeOS can't run when it uses Node.js v0.11.15? |
NodeOS is basically Node.js compiled against musl as libc running on top of
|
@piranna By "Do you have some bandwidth?" I meant "Do you have some time?", sorry for the confusion. Is it possible to have more details about why Node.js v0.11.15 wouldn't start, like an error message, or a trace output? |
Sorry, it gives no output :-( I could try to run the compiled binary on my
|
@piranna Is the node binary fully statically linked? If not, then running it on Ubuntu would use Ubuntu's libc and libstdc++, and thus would not reproduce the issue, or am I missing something? |
It's compiled agains musl, so it will not use system glibc, I need to
|
@piranna As long as you're able to make it load the same C and C++ runtimes on Ubuntu than on NodeOS, the test should be valid. It doesn't need to be statically linked. |
I've just downloaded, compiled everything from scratch and tested v0.11.15 and it works on my Ubuntu system, but inside NodeOS it doesn't show the Node.js REPL prompt. Maybe it's a problem of using On my Ubuntu machine, LD_LIBRARY_PATH=node_modules/nodeos-cross-toolchain/out/i686-nodeos-linux-musl/lib ldd out/i686/node
linux-gate.so.1 => (0xf77c1000)
libstdc++.so.6 => node_modules/nodeos-cross-toolchain/out/i686-nodeos-linux-musl/lib/libstdc++.so.6 (0xf76da000)
libgcc_s.so.1 => node_modules/nodeos-cross-toolchain/out/i686-nodeos-linux-musl/lib/libgcc_s.so.1 (0xf76bc000)
libc.so => node_modules/nodeos-cross-toolchain/out/i686-nodeos-linux-musl/lib/libc.so (0xf763b000) This is the same output of v0,11,14, that's the only one that works on NodeOS. |
I've been doing a
... and I think that the v8 version is something that would makes sense :-/ I've also found that 8a9f263 doesn't compile at all, too. |
Thank you very much @piranna for taking the time to git bisect this issue! A few issues with the V8 version currently in v0.12 have been reported already, you might want to check if they apply to NodeOS. Regardless, it would be great if we could have a better understanding of what code fails and how. Also, how come NodeOS works when run on Ubuntu and not standalone (if that question makes sense, I'm not familiar with NodeOS at all)? |
@piranna Also, does NodeOS use features behind the |
You are welcome :-) It was easy, just do a git bisect, clean the environment, left it compiling in background, check if it works and repeat, I haven't spend too much time on this :-D
I'm not sure, because it's not showing the REPL prompt, so I'm not be able to check more things... :-/
NodeOS is just a Linux kernel having Node.js running directly on top of it as init/PID1, no more. I though it would be due to usage of musl instead of glibc, but as you said, it's working on Ubuntu, so it should be other thing related to the environment (using |
No, NodeOS builds use standard compilation and no flags, and it's only OpenSSL patched to allow it to compile with musl (just change TERMIO for standard TERMIOS). I'm using v0.11.x because v0.10.x is not capable to compile with musl due to some preprocesson defines. |
I've just checked with Node.js v0.11.16 released just today and the problem is still there. I've also noticed that CPU of QEmu process is somewhat high (although not as high as when in other tests I finished PID 1 process and Linux kernel panicked, that seems it enters on a spin lock by design), so probably this is related to one of the bugs you already pointed out. |
@piranna #9113 is related to the use of Did you try to pass the |
Sorry for that, didn't understood correctly that issue. No, NodeOS is not using any flag at runtine, only standard features, and it's compiled using only this flags:
Where do I need to set this flag?
Not too much except
Currently is showing the Linux kernel boot messages, is this what you means?
Linux kernel don't panic, so it seems Node.js can be able to start but becames unresposive. I can be able to start it with some command line arguments as if running on my Ubuntu machine (in the end, it's just a program... :-P ), so if you tell me what arguments to give it I can be able to see if there's some success, and maybe also I would be able to exec a Javascript file, too :-) Only problem would be if it's related with output data to console (I think no), so I couldn't be able to see anything and since it's an initramfs I will not be able to store the data on a file, too, but I would do a |
I need to test it, but I believe nodejs/node#690 could be related to this. |
Ok, I've check it and no, they are not related. I can be able to write on the console, but it doesn't get to the stdio of the Node.js executable, like when a console is dead. |
Sorry for the delay, my 64 bits machine hard disk died and I wanted to test on the same environment, but this will be delayed some more days. I'm going to test on my previous 32 bits machine, if it works it could work on the 64 bits when I recover it, but if not, then it will not work on the 64 bits one or there's a new bug related to the 32 bits environment, so at least it's not a useless test :-) |
Ok, I've checked the commit ac21a53 on 32 bits and it's not working, so seems this bug is still there, sorry... :-( |
@piranna Thank you again for your support! The commit you would want to test though is d6249d0, and it requires the other commits here: https://github.com/joyent/node/pull/9185/commits. ac21a53 in itself wouldn't solve the issue with NodeOS, as it only brings bug fixes and new features to Do you have some time to try these commits? |
I though they were chained, so doing checkout of it would be enought... how
|
@piranna Yes, if you did a I had interpreted your previous message as if you had specifically cherry-picked ac21a53, sorry for the confusion, and thank you again for your help! |
Any update on this? Seems v0.12.7 has still the problem... Doesn't have the v8 been updated in this time? What other things could I do? Maybe check with io.js? Would the build process be the same? |
Could this has been fixed in Node.js 4.0.0? What's the status of these issues now? |
@piranna I'm afraid it's not really something we can help you with unless you have very specific information on what's causing your project to fail. I'm going to close this issue. If you have more information, please file a new one at https://github.com/nodejs/node/issues. |
At shown at NodeOS/NodeOS#92 and found at NodeOS/NodeOS#92 (comment), NodeOS can be build using Node.js v0.11.14 and earlier but not with Node.js v0.11.15, released last week.
When using the latest release, everything compiles fine but when running it Linux boots correctly but Node.js doesn't start nor give you any error. Since NodeOS is a Linux based system the error should be reproducible, so maybe could be related with the usage of musl as libc.
The text was updated successfully, but these errors were encountered: