-
Notifications
You must be signed in to change notification settings - Fork 30k
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
version 6.2.1 always got Segment Fault error and crash #7454
Comments
Do your projects use native add-ons ( If crashes still happen, try collecting a backtrace. Turn on core dumps ( Core dumps are normally written to the current working directory but your distro can reconfigure that, see |
@bnoordhuis Thanks a lot, firstly, I have no native add-ons in my project, and then we've got a core dump, let me try |
@bnoordhuis I have done that, below is all track, what's the matter?
|
Thanks. Is it possible for you to try a debug build? You can compile one with As a quick sanity check, can you open the core file with gdb and run this?
|
|
Thanks. The offending code appears to be this:
It's probably a bad pointer dereference but I can't quite place it. %r13 corresponds to the fourth argument (the function prologue moves %rcx to it), which is a bool. 0x0(%r13) doesn't make sense in that context because it's basically a nullptr dereference. That it doesn't crash until a few instructions later probably means I read it wrong but I don't see how. Did you have any luck with the debug binary? Do you get crashes with the v6.2.1 release binary from nodejs.org? |
@bnoordhuis Thanks a lot, so you mean I should compile a binary for debugging, current node version I used is 6.2.1 and it is compiled from source. I'll try to compile a binary for debugging, but do you have any idea to quickly resolve the problem because many of our projects in production environment crashed and we really worry about this bug. |
I don't have a clear picture as to the cause yet so I'm afraid I can't offer any real advice at this point. You could try downgrading to the latest v4 release and see if that resolves or ameliorates it. |
@bnoordhuis Actually, previously I tried 5.X version but it has a critical problem in garbage collecting. Maybe I need try 4.X. |
@bnoordhuis I've done with compiling debug version, what's next? use it to run my project? |
Yes. I would like to know if the backtrace from the core dump is the same and whether the
Hey, what do you think I am? |
@bnoordhuis haha, let me try first. |
@bnoordhuis I got below message using debug version:
|
Thanks, that is useful info. I believe I have an inkling of the cause. Does |
@bnoordhuis Sure, let me email you the script, the you can easily reproduce. I use ubuntu 12.04. |
@bnoordhuis I've sent you the email, please check. thanks. |
I got your email but the script seems to be incomplete. Did you get a chance to test this?
|
@bnoordhuis I can add |
Run it repeatedly until you see a crash or you're satisfied it no longer crashes? |
@bnoordhuis I have ran twice and finished without any error, why? |
@bnoordhuis retried twice again, no error, no crash. what's next? |
Was that with |
@bnoordhuis with |
@bnoordhuis Another two retries, no error. what's next? |
It disables the optimizer. I had a suspicion the bug was in the way the optimizer deals with array literals. Can you check if applying v8/v8@d721121 fixes the crash?
|
I had no idea you could git apply to a directory... That simplifies so
much!
Thanks Ben!!!
|
@bnoordhuis Sorry, I don't understand what should I do? when I checkout the latest version from https://github.com/v8/v8 and use your command line to apply diff, but got following errors: anything wrong ? |
@mike442144 you should apply diff to https://github.com/nodejs/node, not V8 |
@targos Okay, let me try it thanks. |
@targos @bnoordhuis
and I got the same error:
|
Ah... I could swear it applied to V8 5.0 (what ships with node v6) but it doesn't because of the removal of strong mode in V8 5.1 (what is currently in master.) What you could try is building node.js master from source and check if you still get the crash. If you do, apply the patch and see if it helps. I'll look into back-porting the patch to v6 but that will be next week at the soonest. |
@bnoordhuis Thanks, I'll compile from node.js master branch to try again and wait for you to fix it. |
@bnoordhuis Hi Ben, I've retried twice on latest version which is cloned from github without your patch, and the script did well. Does it mean that the team has fixed the bug in latest version? and what's next? waiting for the team to release v6.2.3 or v7.0.0 or anything else should I do? |
Was that with or without
We plan on upgrading to V8 5.1 in v6 the next month or two. I'm going to see if I can back-port the patch before that, though. |
@bnoordhuis without |
@bnoordhuis Hi Ben, I noticed the 6.3.0 version has just released and what do you think if it has fixed the bug? |
@bnoordhuis Hi Ben, I have tried the v6.3.0 version and ran without
so, I have to wait for you to fix this bug, I'm counting on you. |
Original commit message: Quit creating array literal boilerplates from Crankshaft. It's such a corner case. BUG= Review URL: https://codereview.chromium.org/1865013002 Cr-Commit-Position: refs/heads/master@{nodejs#35346} Fixes: nodejs#7454 PR-URL: nodejs#7632 Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
@bnoordhuis Hi, Ben, Do I have to wait new 6.x version release? |
Yes, see linked pull request #7633. |
@bnoordhuis Okay, I see. thanks for your effort. |
Original commit message: Quit creating array literal boilerplates from Crankshaft. It's such a corner case. BUG= Review URL: https://codereview.chromium.org/1865013002 Cr-Commit-Position: refs/heads/master@{nodejs#35346} Fixes: nodejs#7454
Original commit message: Quit creating array literal boilerplates from Crankshaft. It's such a corner case. BUG= Review URL: https://codereview.chromium.org/1865013002 Cr-Commit-Position: refs/heads/master@{nodejs#35346} Fixes: nodejs#7454 PR-URL: nodejs#7633 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Original commit message: Quit creating array literal boilerplates from Crankshaft. It's such a corner case. BUG= Review URL: https://codereview.chromium.org/1865013002 Cr-Commit-Position: refs/heads/master@{#35346} Fixes: #7454 PR-URL: #7633 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Original commit message: Quit creating array literal boilerplates from Crankshaft. It's such a corner case. BUG= Review URL: https://codereview.chromium.org/1865013002 Cr-Commit-Position: refs/heads/master@{#35346} Fixes: nodejs/node#7454 PR-URL: nodejs/node#7633 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Original commit message: Quit creating array literal boilerplates from Crankshaft. It's such a corner case. BUG= Review URL: https://codereview.chromium.org/1865013002 Cr-Commit-Position: refs/heads/master@{nodejs#35346} Fixes: nodejs#7454 PR-URL: nodejs#7632 Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
With node upgraded to 6.2.1, we got 'Segment Fault error' in several projects. It doesn't happen every time, but the probability is rather high. We've tried 'npm rebuild' according to google search result implying this may have something to do with node native modules. The error still remains.
What's your advice?
The text was updated successfully, but these errors were encountered: