nodejs / node-v0.x-archive

Moved to https://github.com/nodejs/node
34.44k stars 7.31k forks source link

pcDuino Segmentation fault #4946

Closed WebReflection closed 11 years ago

WebReflection commented 11 years ago

coming from npm I can confirm node does not work in pcDuino .

The unfortunate coincidence is that node works slowly but without problems if compiled as Debug mode while it builds and fails every time it's compiled as Release.

Current build is 0.9.13-pre while gcc is gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

I realize there's not much to do here but at least there is an issue already addressed.

Thanks

bnoordhuis commented 11 years ago

You run configure with --without-snapshot and no openssl flags, right? Can you run the release build in gdb and post the backtrace of the crash? thread apply all backtrace full prints it.

WebReflection commented 11 years ago

As I've said it does not crash if i compile for gdb.

In the npm thread, at the end, all configure and build info.

bnoordhuis commented 11 years ago

Note how I explicitly mentioned 'release build' there. :-)

WebReflection commented 11 years ago

Uh... Right, so ./configure --without-snapshot and sudo make install should produce a gdb compatible executable, correct? Sorry but I'm not familiar with gdb, thanks

bnoordhuis commented 11 years ago

That's correct. The backtrace in release (optimized) builds is often not as useful as with debug builds but it should be accurate enough to pinpoint the component that's segfaulting.

WebReflection commented 11 years ago

doing that, came out it works without problems. What is the difference without snapshot then? now both node and npm seems to be fine ... gonna re-compile without that configure flag to be sure the flag is what makes the difference (since I've pulled before)

WebReflection commented 11 years ago

I can confirm without that --without-snapshot flag Segmentation fault ^_^ ... what's next?

bnoordhuis commented 11 years ago

Are you cross-compiling? If yes, your best best it to always use --without-snapshot. Snapshotting is only reliable when done in the target environment.

WebReflection commented 11 years ago

Everything Ive done is with the pcDuino terminal. No cross compiling, i make there

bnoordhuis commented 11 years ago

Is it still a problem with v0.10?

WebReflection commented 11 years ago

yep, I could not manage to change the OS in this device and tell you if it's a hardware problem or something else :-/

bnoordhuis commented 11 years ago

What does the backtrace in gdb look like? Does it also happen when you compile V8 standalone?

Here is how you test that:

$ cd deps/v8/build
$ ln -s ../../tools/gyp
$ cd ..
$ make native
$ out/native/d8

If standalone V8 also segfaults, verify with gdb if it happens in the same place as node. You may want to clone the v8/v8 repo and check if the issue exists in newer releases.

bnoordhuis commented 11 years ago

No follow-up, closing.

WebReflection commented 11 years ago

apologies, I had no time to test again plus I am waiting for Arch Linux guys to provide an easy way to get rid of that distro ... then I'll try again and eventually come back (hopefully not). Thank you

davidatnie commented 11 years ago

Hi Guys,

I tried to checkout an earlier version of Node v0.8.22 and build it on the pcDuino.. .Installation completed and I was able to run node and get into the REPL ... npm also seems to work ... will test further and see

Previously I built v0.8.22 on the RasPi and it worked as well

These few days, I've been trying to build v0.10.x and was never successful... same with WebReflection, I got "Segmentation fault" upon executing node and npm... but v0.8.22 works

Just wondering if there's anything new in v0.10.x that's tripping node on ARM systems?

My posting in the pcduino forum: http://pcduino.com/forum/index.php?topic=3646.0

Hope that helps :)

WebReflection commented 11 years ago

as quick update, I will re-check but RaspberryPI has no problems with Arch Linux and Node 0.10.x however I haven't managed to install Arch Linux in pcDuino yet (or better, I've tried, but I cannot see a gosh damn thing ^_^)

that one, however, is another story ...

WebReflection commented 11 years ago

@davidatnie with latest kernel and ubuntu, after apt-get update for all packages, an apt-get install gcc and apt-get install git-core I've been able to build without problems node and run it ... it's quite impressive how fast polpetta could go there in both pcDuino and R-Pi

However, and this is for @bnoordhuis too, arm_neon flag is set to 0 but apparently pcDuino supports it without problems. There's no way through configure to set that flag, at least not in the --help so ... any idea?

Thanks

bnoordhuis commented 11 years ago

arm_neon flag is set to 0 but apparently pcDuino supports it without problems.

Maybe the pcDuino supports NEON. V8 however does not. :-)

WebReflection commented 11 years ago

OK, I was wondering what's that config flag about ... never mind, gotcha. Thanks

davidatnie commented 11 years ago

Hi!

That sounds great, thanks! I haven't tried the new pcDuino Ubuntu image yet, but it's great to know that Node.js compiles without problem on that.. I'm assuming this is for the latest version of Node.js (0.10.4) ?

Btw, what is polpetta? :)


Cheers David


From: Andrea Giammarchi [notifications@github.com] Sent: Tuesday, April 23, 2013 3:03 PM To: joyent/node Cc: David EFFENDI (LSL) Subject: Re: [node] pcDuino Segmentation fault (#4946)

@davidatniehttps://github.com/davidatnie with latest kernel and ubuntu, after apt-get update for all packages, an apt-get install gcc and apt-get install git-core I've been able to build without problems node and run it ... it's quite impressive how fast polpetta could go there in both pcDuino and R-Pi

However, and this is for @bnoordhuishttps://github.com/bnoordhuis too, arm_neon flag is set to 0 but apparently pcDuino supports it without problems. There's no way through configure to set that flag, at least not in the --help so ... any idea?

Thanks

— Reply to this email directly or view it on GitHubhttps://github.com/joyent/node/issues/4946#issuecomment-16842549.

National Institute of Education (Singapore) http://www.nie.edu.sg

DISCLAIMER : The information contained in this email, including any attachments, may contain confidential information. This email is intended only for the use of the addressee(s) listed above. Unauthorised sight, dissemination or any other use of the information contained in this email is strictly prohibited. If you have received this email by fault, please notify the sender and delete it immediately.

WebReflection commented 11 years ago

@davidatnie 0.10.5 stable is good too, as well as 0.11.x, no problems anymore.

polpetta is a lightweight client able to serve a folder content through a browser (a tiny server with some simple CGI like capability)

davidatnie commented 11 years ago

Hi Andrea,

I've just tried it out and it worked great now.. I cloned the repo and then directly run configure, make and make-install on it, got v0.11.2-pre

However, earlier on I tried downloading the source (v0.10.5) from the nodejs.org website and got segmentation fault when I built on that one.. so not quite sure where's the mismatch...

btw Polpetta is awesome! :) I'm trying it on the pcduino ... If we hook up the pcduino with a usb powerbank and an openwrt wifi router so people can access it, it'll be a pretty interesting application :)

Cheers David


From: Andrea Giammarchi [notifications@github.com] Sent: Saturday, April 27, 2013 1:04 AM To: joyent/node Cc: David EFFENDI (LSL) Subject: Re: [node] pcDuino Segmentation fault (#4946)

@davidatniehttps://github.com/davidatnie 0.10.5 stable is good too, as well as 0.11.x, no problems anymore.

polpettahttps://github.com/WebReflection/polpetta#-polpetta is a lightweight client able to serve a folder content through a browser (a tiny server with some simple CGI like capability)

— Reply to this email directly or view it on GitHubhttps://github.com/joyent/node/issues/4946#issuecomment-17086821.

National Institute of Education (Singapore) http://www.nie.edu.sg

DISCLAIMER : The information contained in this email, including any attachments, may contain confidential information. This email is intended only for the use of the addressee(s) listed above. Unauthorised sight, dissemination or any other use of the information contained in this email is strictly prohibited. If you have received this email by fault, please notify the sender and delete it immediately.

WebReflection commented 11 years ago

funny I am hacking right now over a refactored part of the library in order to serve as many static files as possible without using too much ram but still being able to cache/gzip :D

about node, not sure why 10.5 should give you errors but you are right, I am on 0.11.2-pre too ... weird!

I might check if Arch Linux has an updated 10.5 stable there (Raspberry Pi) and see if that works. Not sure we should keep writing here though, specially to discuss projects on top of pcDuino :)