joyent/node — Issue #2604: SegFault when using --prof (v0.6.8, platform: ARM)
Author: LeChuck42
Created: 2012-01-24 08:40:11+00:00
State: open

I'm using Linaro 11.09 on a BeagleBoard xM.
test.js:

var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');

My problem:

web@de-kle-webtest02:~$ node test.js
Server running at http://127.0.0.1:1337/

web@de-kle-webtest02:~$ node --prof test.js
Segmentation fault

I tried GDB:

web@de-kle-webtest02:~$ gdb --args node --prof test.js
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabi".
For bug reporting instructions, please see:
...
Reading symbols from /usr/local/bin/node...done.
(gdb) r
Starting program: /usr/local/bin/node --prof test.js
[Thread debugging using libthread_db enabled]
[New Thread 0x2b657460 (LWP 3172)]
[New Thread 0x2be57460 (LWP 3173)]

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x2ad6cce0 in sem_post@@GLIBC_2.4 () from /lib/arm-linux-gnueabi/libpthread.so.0
#2 0x4b337942 in ?? ()
#3 0x4b337942 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

but that doesn't seem too helpful...
Sometimes I get

(gdb) bt
#0 0x9e39df08 in ?? ()
#1 0x0021228e in v8::internal::ProfilerSignalHandler(int, siginfo*, void*) ()
#2 0x9e2c1f70 in ?? ()
#3 0x9e2c1f70 in ?? ()

A v8.log will get generated but is truncated at different points each time I try.
Let me know if there is anything I could do.