Bus Error on Mac OSX

907 views
Skip to first unread message

alanhe

unread,
Nov 21, 2011, 3:40:46 PM11/21/11
to nodejs
I'm trying to install node v0.6.2 on a Mac OS X (10.5.8)

I did the following:
git clone --depth 1 git://github.com/joyent/node.git
cd node
git checkout v0.6.2
./configure --without-ssl # I could not compile successfully
otherwise
make
sudo make install


Everything to this point seems successful...
Even,

node --version
v0.6.2

But, when I try to run the Hello World example there is a pause
followed by "Bus error".

Anyone else seen this? Any suggestions as to what I should do to
overcome this error?

Thanks, Alan

Ben Noordhuis

unread,
Nov 21, 2011, 4:13:29 PM11/21/11
to nod...@googlegroups.com

Alan, can you try this?

make distclean
./configure --debug
make
touch empty.js
gdb --args ./node_g empty.js
run
# wait until it crashes
backtrace

Can you post the backtrace and the output of `gcc -v`?

alanhe

unread,
Nov 21, 2011, 5:03:18 PM11/21/11
to nodejs
I ended up using "./configure --debug --without-ssl" in order to get
the compilation to succeed.

aherod$ gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5493~1/src/configure --disable-
checking -enable-werror --prefix=/usr --mandir=/share/man --enable-
languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/
$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/
lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --
host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5493)


Here is the result of the backtrace:

(gdb) runStarting program: /Users/aherod/node2/node/node_g
empty.jsReading symbols for shared libraries ++++++++
+.......................................................................
done
Program received signal EXC_BAD_ACCESS, Could not access
memory.Reason: KERN_PROTECTION_FAILURE at address:
0x000005340x000fe5cc in v8::internal::Isolate::logger (this=0x0) at
isolate.h:801801    ASSERT(logger_ != NULL);(gdb) backtrace#0
 0x000fe5cc in v8::internal::Isolate::logger (this=0x0) at isolate.h:
801#1  0x0005f375 in v8::HandleScope::RawClose (this=0xbffff0a4,
value=0x1015f70) at /Users/aherod/node2/node/deps/v8/src/api.cc:766#2
 0x0000b6bc in v8::HandleScope::Close<v8::Object> (this=0xbffff0a4,
value={val_ = 0x1015f70}) at v8.h:3954#3  0x0001f444 in Stat
(args=@0xbffff174) at ../src/node_file.cc:410#4  0x000a3b47 in
HandleApiCallHelper<false> (args={<v8::internal::Arguments> =
{<v8::internal::Embedded> = {<No data fields>}, length_ = 3,
arguments_ = 0xbffff26c}, <No data fields>}, isolate=0x9f2000) at /
Users/aherod/node2/node/deps/v8/src/builtins.cc:1105#5  0x000a3c35 in
Builtin_Impl_HandleApiCall (args={<v8::internal::Arguments> =
{<v8::internal::Embedded> = {<No data fields>}, length_ = 3,
arguments_ = 0xbffff26c}, <No data fields>}, isolate=0x9f2000) at /
Users/aherod/node2/node/deps/v8/src/builtins.cc:1122#6  0x000a3c85 in
Builtin_HandleApiCall (args={<v8::internal::Arguments> =
{<v8::internal::Embedded> = {<No data fields>}, length_ = 3,
arguments_ = 0xbffff26c}, <No data fields>}, isolate=0x9f2000) at /
Users/aherod/node2/node/deps/v8/src/builtins.cc:1121#7  0x00b88696
in ?? ()#8  0x00ca0404 in ?? ()#9  0x00c8fcfc in ?? ()#10 0x00b9bf86
in ?? ()#11 0x00c89e11 in ?? ()#12 0x00c94ba5 in ?? ()#13 0x00c94715
in ?? ()#14 0x00c95d0f in ?? ()#15 0x00ba06b2 in ?? ()#16 0x00b9b11a
in ?? ()#17 0x00b8c206 in ?? ()#18 0x000d2f83 in Invoke
(construct=false, func={location_ = 0x1015f64}, receiver={location_ =
0x100f410}, argc=0, args=0x0, has_pending_exception=0xbffff523) at /
Users/aherod/node2/node/deps/v8/src/execution.cc:121#19 0x000d373d in
v8::internal::Execution::Call (callable={location_ = 0x1015f64},
receiver={location_ = 0x100f410}, argc=0, args=0x0,
pending_exception=0xbffff523, convert_receiver=false) at /Users/aherod/
node2/node/deps/v8/src/execution.cc:175#20 0x0006f298 in
v8::Function::Call (this=0x1015f64, recv={val_ = 0x100f410}, argc=0,
argv=0x0) at /Users/aherod/node2/node/deps/v8/src/api.cc:3594#21
0x0000ae33 in Tick () at ../src/node.cc:243#22 0x0000afb1 in
PrepareTick (handle=0x546a60, status=0) at ../src/node.cc:277#23
0x003aeca6 in uv__prepare (loop=0x548520, w=0x546a8c, revents=16384)
at src/unix/core.c:322#24 0x003bdb8a in ev_invoke_pending
(loop=0x548520) at src/unix/ev/ev.c:2143#25 0x003be032 in ev_run
(loop=0x548520, flags=0) at src/unix/ev/ev.c:2428#26 0x003ae5bf in
uv_run (loop=0x5482a0) at src/unix/core.c:192#27 0x0000ac65 in
node::Start (argc=2, argv=0xbffff794) at ../src/node.cc:2478#28
0x0000258a in main (argc=2, argv=0xbffff794) at ../src/node_main.cc:25

Once again, thank you for your time!


On Nov 21, 4:13 pm, Ben Noordhuis <i...@bnoordhuis.nl> wrote:

Ben Noordhuis

unread,
Nov 21, 2011, 5:08:54 PM11/21/11
to nod...@googlegroups.com

Damn, I suppose [1] isn't fixed after all. Can you post the backtrace
and the output of `gcc -v` in the issue? Your mailer has kind of
compacted it.

[1] https://github.com/joyent/node/issues/2061

Ryan Schmidt

unread,
Nov 21, 2011, 11:50:31 PM11/21/11
to nod...@googlegroups.com
On OS X 10.5.5 i386 with Xcode 3.1.4, installing nodejs 0.6.2 with MacPorts, I can confirm the bus error trying to run empty.js with nodejs.

Enabling ssl was not a problem for me -- what problem did you see?

alanhe

unread,
Nov 22, 2011, 10:15:46 AM11/22/11
to nodejs
@Ben - I posted a backtrace and a gcc -v to the issue thread that you
suggested.

@Ryan - When I enable ssl I get an error that others have seen

If I simply use

./configure

compilation fails as follows:

[34/35] cxx: src/node_crypto.cc -> out/Release/src/node_crypto_5.o
/usr/bin/g++ -pthread -arch i386 -m32 -g -O3 -DHAVE_OPENSSL=1 -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_FDATASYNC=0 -
DARCH="ia32" -DPLATFORM="darwin" -D__POSIX__=1 -Wno-unused-parameter -
D_FORTIFY_SOURCE=2 -IRelease/src -I../src -IRelease/deps/http_parser -
I../deps/http_parser -IRelease/deps/uv/include -I../deps/uv/include -
IRelease/deps/uv/src/ares -I../deps/uv/src/ares -IRelease/deps/v8/
include -I../deps/v8/include -Ideps/v8/include ../src/node_crypto.cc -
c -o Release/src/node_crypto_5.o
../src/node_crypto.cc: In member function ‘bool
node::crypto::DiffieHellman::Init(int)’:
../src/node_crypto.cc:3537: error: ‘DH_generate_parameters_ex’ was not
declared in this scope
../src/node_crypto.cc: In static member function ‘static
v8::Handle<v8::Value> node::crypto::DiffieHellman::ComputeSecret(const
v8::Arguments&)’:
../src/node_crypto.cc:3811: error: ‘DH_check_pub_key’ was not declared
in this scope
../src/node_crypto.cc:3814: error: ‘DH_CHECK_PUBKEY_TOO_SMALL’ was not
declared in this scope
../src/node_crypto.cc:3817: error: ‘DH_CHECK_PUBKEY_TOO_LARGE’ was not
declared in this scope
../src/node_crypto.cc: In function ‘void
node::crypto::InitCrypto(v8::Handle<v8::Object>)’:
../src/node_crypto.cc:4293: error: ‘SSL_COMP_get_compression_method’
was not declared in this scope
Waf: Leaving directory `/Users/aherod/node2/node/out'
Build failed: -> task failed (err #1):
{task: cxx node_crypto.cc -> node_crypto_5.o}

make: *** [program] Error 1

I even tried upgrading my version of openssl on my Mac, but it didn't
seem to help...


Thanks, Alan

Ben Noordhuis

unread,
Nov 22, 2011, 11:16:24 AM11/22/11
to nod...@googlegroups.com

You probably have an older version of openssl installed and Node fails
to detect that. Can you open an issue for it? Please include the
output of:

* `openssl version`

* `grep OPENSSL_VERSION_NUMBER /usr/{,local}/include/openssl/opensslv.h`

Jorge

unread,
Nov 22, 2011, 11:27:08 AM11/22/11
to nod...@googlegroups.com
BTW, are you (node-core-guys) aware of this http://google.com/search?q=openssl+lion ?
--
Jorge.

> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

Ben Noordhuis

unread,
Nov 22, 2011, 11:34:31 AM11/22/11
to nod...@googlegroups.com
On Tue, Nov 22, 2011 at 17:27, Jorge <jo...@jorgechamorro.com> wrote:
> BTW, are you (node-core-guys) aware of this http://google.com/search?q=openssl+lion ?

The compiler complains loudly when I compile node on my Lion MacBook so yes. :-)

We won't be moving away from OpenSSL any time soon though. Maybe
Selene some day.

Reply all
Reply to author
Forward
0 new messages