-
Notifications
You must be signed in to change notification settings - Fork 7.3k
0.8.0 build fails with mksnapshot segfault #3538
Comments
Possibly related to #2912? What does |
By the way, if you want to use a non-default compiler, make sure that you also pass it to make: |
output from
i actually exported CC but reran make specifying CC explicitly with the same result. i then ran configure with
|
Is that the same gcc as /usr/local/bingcc? Do 32 bits build work? You can build one with |
yes. using encap to install so /usr/local/bin/gcc is just a symlink to that gcc binary:
building 32-bit resulted in a different segfault. :)
|
Okay, let's try two more things:
|
by setting
and then dies:
i'll give a debug build a whirl and post results back here. |
@herb Can you post the output of the following?
|
so we're on the same page, how i'm configuring this:
and the debug build seems to work. i was able to read a simple text file with fs.readFileSync. unclear how else to verify it's operation. |
I would like to narrow down the cause of that EINVAL error. Does the test pass if you apply the patch below? diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c
index 318eb71..f4d5419 100644
--- a/deps/uv/src/unix/core.c
+++ b/deps/uv/src/unix/core.c
@@ -425,7 +425,7 @@ int uv__accept(int sockfd) {
assert(sockfd >= 0);
while (1) {
-#if __linux__
+#if 0
peerfd = uv__accept4(sockfd,
NULL,
NULL, What about this one? (Make sure you revert the previous one.) diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c
index 318eb71..958b1c2 100644
--- a/deps/uv/src/unix/core.c
+++ b/deps/uv/src/unix/core.c
@@ -429,7 +429,7 @@ int uv__accept(int sockfd) {
peerfd = uv__accept4(sockfd,
NULL,
NULL,
- UV__SOCK_NONBLOCK|UV__SOCK_CLOEXEC);
+ 0);
if (peerfd != -1)
break; |
By the way, I addressed the -fstrict-aliasing thing in 07e5877. |
the first patch fixes it. the second patch does not. though there are still four failed tests after applying the first patch. |
Same issue, but non of your patches fixes it :(
uname -a
g++ -v
|
@nebjak Can you try the v0.8 or master git branch? |
@herb Do you run a stock kernel or is it one you compiled yourself (with or without custom patches)? |
it's stock.
|
@bnoordhuis both braches (master, v0.8) fail to build with same errors. Also, v0.6.19 builds without problems. |
I'm currently experiencing the same issues. (same errors in the same contexts) |
Can someone please test this patch against the v0.8 branch? diff --git a/configure b/configure
index 8dd6884..11e21a8 100755
--- a/configure
+++ b/configure
@@ -254,7 +254,8 @@ def compiler_version():
version = version_line.split("version")[1].strip().split()[0].split(".")
if not version:
return (False, False, None)
- return ('LLVM' in version_line, 'clang' in CC, tuple(version))
+ version = tuple(map(int, version))
+ return ('LLVM' in version_line, 'clang' in CC, version)
def configure_node(o):
# TODO add gdb
@@ -270,12 +271,9 @@ def configure_node(o):
# turn off strict aliasing if gcc < 4.6.0 unless it's llvm-gcc
# see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45883
# see http://code.google.com/p/v8/issues/detail?id=884
- o['variables']['strict_aliasing'] = b(is_clang or cc_version >= (4,6,0))
-
- # disable strict aliasing in V8 if we're compiling with gcc 4.5.x,
- # it makes V8 crash in various ways
- o['variables']['v8_no_strict_aliasing'] = b(
- not is_clang and (4,5,0) <= cc_version < (4,6,0))
+ strict_aliasing = is_clang or cc_version >= (4,6,0)
+ o['variables']['strict_aliasing'] = b(strict_aliasing)
+ o['variables']['v8_no_strict_aliasing'] = b(not strict_aliasing)
# clang has always supported -fvisibility=hidden, right?
if not is_clang and cc_version < (4,0,0): |
@bnoordhuis Same problem. Trace (just in case I'm missing something)
|
@fgalan Thanks for testing that. I confess I'm kind of stumped. Can you get me a shell account on that machine? |
sorry @bnoordhuis, the machine i'm currently dev'ing on is a VM on my mac. getting a public box with the same stack is fraught with the usual corp nonsense. i'm open to a hangout to share a screen or some hints on where to look so i can do some of my own debugging for you. i've compiled the v0.8 branch (HEAD at 0cdeb8e) and can build and install. my existing code base seems to work ok. tests fail at 'test-child-process-fork2'
which seems to be before the previous errors. |
@herb Some tests are fairly timing sensitive and running them in a VM often exacerbates that. If it's only a handful of tests that fail, just ignore it (within reason). |
gotcha. the test failing actually prevents the other tests from running. running the previous failing test (test/simple/test-http-many-keep-alive-connections.js) directly doesn't error as before. so it looks like this bug is closed from my POV. i'll leave it open for @fgalan but feel free to close it when you feel appropriate. edited: i left out something important, this was with the patch to configure attached above. |
So... not sure if my problem is related to this issue, but it seems to produce the exact same error in one of your comments above:
This occurs once the server is up and running and as the first connection comes in with just the standard example: var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(15915, '127.0.0.1');
console.log('Server running at http://127.0.0.1:15915/'); I'm on a shared host:
This is a fresh install of 0.8.0 from the source code link found on nodejs.org. |
@Mantic can you open a new issue for that? |
Done: #3566 |
@bnoordhuis I can not give you access to the system where I got the problem, but I will try tro reproduce it in a CentOS 6.2 intance at Amazon EC2 and provide you SSH access to it. Thanks! |
Hello, I've the same mksnapshot segfault issue on v0.8.1-release, and on master (ba0efd6), it's not a VM, it's a puny old AMD machine with 2.6.38.4-grsec x86_64. (Though I just get a regular segfault not a PAX security one ([37034928.522036] mksnapshot[10989]: segfault at 20 ip 00000000007cb5c4 sp 000003ff102000c0 error 4 in mksnapshot[400000+501000])
Though I can build master on an other Debian Squeeze VM (also 64-bit) with g++ 4.4.5. (But there the === release test-child-process-fork2 === and === release test-eio-race === tests fail, the first one with an assertion the second one can't kill the event loop and the test timeouts.) |
Hi, When preparing the sandbox for @bnoordhuis, trying to reproduce the bug in a CentOS 6.2 instance at EC2, I have realized (for my big surprise) that in that evironment the node-0.8.0.tar.gz is built without problems. Very annoying, considering that the distribution and version is exactly the same than in my buggy system. I compared both environment and observed a difference in the config.gypi fyle: buggy system:
EC2 instance:
The only difference is So, looking into buggy system:
EC2 instance:
They are the same except from the first one is localized in es_ES and the second one in en_GB. In particular, in the buggy system the last line reads The following patch solves the problem: --- a/configure 2012-06-25 16:37:20.000000000 +0200
+++ b/configure.fix 2012-06-29 23:18:00.834233335 +0200
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# -*- coding: latin-1 -*-
import optparse
import os
import pprint
@@ -247,11 +248,11 @@
lines = proc.communicate()[1].split('\n')
version_line = None
for i, line in enumerate(lines):
- if 'version' in line:
+ if 'versión' in line:
version_line = line
if not version_line:
return None
- version = version_line.split("version")[1].strip().split()[0].split(".")
+ version = version_line.split("versión")[1].strip().split()[0].split(".")
if not version:
return None
return ['LLVM' in version_line] + version However, it is completelly ad hoc for my parcicular operating system locale. I think that the definitive fix should be a more powerfull strategy parsing the Thanks for the help! Fermín |
I cloned master branch but i still have the issue. |
@lpinca Try the v0.8 branch, it's in better shape right now. Haven't really had time to update master yet. |
With v0.8 branch i get this:
|
Right, that's the result of Red Hat's branding of gcc. Can you try the patch from #3601? |
Tested on a CentOS 6 and worked, i'll try on my Fedora when i get back home. Edit: Worked also on Fedora. |
I successfully built (make) with --without-snapshot (seg fault without the option). |
@superbob Use the v0.8 branch as bnoordhuis suggested. |
@lpinca I will try it as soon as a can pass trough my proxy ... I've some problems connecting to github ... |
It's ok for me with v0.8.2 archive. (Could not try the branch because of my corporate proxy). |
centos 5.4. from v0.8.0 tag in github. building v0.6.19 worked fine. repro steps and gdb backtrace below:
The text was updated successfully, but these errors were encountered: