NetBSD Problem Report #51229
From bjjl@rpi.pocketservices.de Thu Jun 9 07:43:28 2016
Return-Path: <bjjl@rpi.pocketservices.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 83ECF7AAB0
for <gnats-bugs@gnats.NetBSD.org>; Thu, 9 Jun 2016 07:43:28 +0000 (UTC)
Message-Id: <20160609074325.37B696C869@rpi.pocketservices.de>
Date: Thu, 9 Jun 2016 09:43:24 +0200 (CEST)
From: netbsd@benjaminlorenz.email
To: gnats-bugs@NetBSD.org
Subject: nodejs SIGSEGV on NetBSD/evbarm
X-Send-Pr-Version: 3.95
>Number: 51229
>Category: pkg
>Synopsis: nodejs SIGSEGV on NetBSD/evbarm
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 09 07:45:00 +0000 2016
>Last-Modified: Sat Jun 11 21:40:01 +0000 2016
>Originator: Benjamin Lorenz
>Release: NetBSD 7.0.1
>Organization:
>Environment:
System: NetBSD rpi.pocketservices.de 7.0.1 NetBSD 7.0.1 (RPI) #1: Sat Jun 4 10:37:02 CEST 2016 root@rpi.pocketservices.de:/usr/obj/sys/arch/evbarm/compile/RPI evbarm
Architecture: earm
Machine: evbarm
>Description:
building lang/nodejs (6.2.0) --without-snapshot and with debugging symbols
(-g -O0). See backtrace of crash below once starting the binary.
(gdb) run
Starting program: /usr/pkg/src/lang/nodejs/work/node-v6.2.0/out/Release/node
Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 1]
0xffff0fc0 in ?? ()
(gdb) bt
#0 0xffff0fc0 in ?? ()
#1 0x00b37478 in v8::base::(anonymous namespace)::LinuxKernelCmpxchg (old_value=0, new_value=1,
ptr=0x16f05c0 <v8::base::entropy_mutex>) at ../deps/v8/src/base/atomicops_internals_arm_gcc.h:187
#2 0x00b374e0 in v8::base::Acquire_CompareAndSwap (ptr=0x16f05c0 <v8::base::entropy_mutex>, old_value=0,
new_value=1) at ../deps/v8/src/base/atomicops_internals_arm_gcc.h:244
#3 0x011f838c in v8::base::CallOnceImpl (once=0x16f05c0 <v8::base::entropy_mutex>, init_func=
0xb37220 <v8::base::LazyInstanceImpl<v8::base::Mutex, v8::base::StaticallyAllocatedInstanceTrait<v8::base::Mutex>, v8::base::DefaultConstructTrait<v8::base::Mutex>, v8::base::ThreadSafeInitOnceTrait, v8::base::LeakyInstanceTrait<v8::base::Mutex> >::InitInstance(v8::base::StaticallyAllocatedInstanceTrait<v8::base::Mutex>::StorageType*)>,
arg=0x16f05c4 <v8::base::entropy_mutex+4>) at ../deps/v8/src/base/once.cc:33
#4 0x00805ea8 in v8::base::CallOnce<void> (once=0x16f05c0 <v8::base::entropy_mutex>,
init_func=0xb37220 <v8::base::LazyInstanceImpl<v8::base::Mutex, v8::base::StaticallyAllocatedInstanceTrait<v8::base::Mutex>, v8::base::DefaultConstructTrait<v8::base::Mutex>, v8::base::ThreadSafeInitOnceTrait, v8::base::LeakyInstanceTrait<v8::base::Mutex> >::InitInstance(v8::base::StaticallyAllocatedInstanceTrait<v8::base::Mutex>::StorageType*)>, arg=0x16f05c4 <v8::base::entropy_mutex+4>) at ../deps/v8/src/base/once.h:95
#5 0x00805e20 in v8::base::ThreadSafeInitOnceTrait::Init<void (*)(void*), void*> (
once=0x16f05c0 <v8::base::entropy_mutex>,
function=0xb37220 <v8::base::LazyInstanceImpl<v8::base::Mutex, v8::base::StaticallyAllocatedInstanceTrait<v8::base::Mutex>, v8::base::DefaultConstructTrait<v8::base::Mutex>, v8::base::ThreadSafeInitOnceTrait, v8::base::LeakyInstanceTrait<v8::base::Mutex> >::InitInstance(v8::base::StaticallyAllocatedInstanceTrait<v8::base::Mutex>::StorageType*)>, storage=0x16f05c4 <v8::base::entropy_mutex+4>) at ../deps/v8/src/base/lazy-instance.h:148
#6 0x00b37190 in v8::base::LazyInstanceImpl<v8::base::Mutex, v8::base::StaticallyAllocatedInstanceTrait<v8::base::Mutex>, v8::base::DefaultConstructTrait<v8::base::Mutex>, v8::base::ThreadSafeInitOnceTrait, v8::base::LeakyInstanceTrait<v8::base::Mutex> >::Init (this=0x16f05c0 <v8::base::entropy_mutex>) at ../deps/v8/src/base/lazy-instance.h:178
#7 0x00b37104 in v8::base::LazyInstanceImpl<v8::base::Mutex, v8::base::StaticallyAllocatedInstanceTrait<v8::base::Mutex>, v8::base::DefaultConstructTrait<v8::base::Mutex>, v8::base::ThreadSafeInitOnceTrait, v8::base::LeakyInstanceTrait<v8::base::Mutex> >::Pointer (this=0x16f05c0 <v8::base::entropy_mutex>) at ../deps/v8/src/base/lazy-instance.h:188
#8 0x011f9d1c in v8::base::RandomNumberGenerator::SetEntropySource (source=
0x6c0928 <node::crypto::EntropySource(unsigned char*, unsigned long)>)
at ../deps/v8/src/base/utils/random-number-generator.cc:25
#9 0x007cb368 in v8::V8::SetEntropySource (
entropy_source=0x6c0928 <node::crypto::EntropySource(unsigned char*, unsigned long)>)
at ../deps/v8/src/api.cc:5398
#10 0x00672bec in node::Start (argc=1, argv=0x7fffccdc) at ../src/node.cc:4458
#11 0x006a0f60 in main (argc=1, argv=0x7fffccdc) at ../src/node_main.cc:53
(gdb)
>How-To-Repeat:
>Fix:
>Audit-Trail:
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Cc:
Subject: Re: pkg/51229: nodejs SIGSEGV on NetBSD/evbarm
Date: Thu, 9 Jun 2016 07:25:37 -0400
On Jun 9, 7:45am, netbsd@benjaminlorenz.email (netbsd@benjaminlorenz.email) wrote:
-- Subject: pkg/51229: nodejs SIGSEGV on NetBSD/evbarm
DO we get the right cpp define for the processor?
https://github.com/nodejs/node/blob/master/deps/v8/src/base/atomicops_internals_arm_gcc.h
christos
From: Joerg Sonnenberger <joerg@bec.de>
To: Christos Zoulas <christos@zoulas.com>
Cc: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/51229: nodejs SIGSEGV on NetBSD/evbarm
Date: Thu, 9 Jun 2016 23:01:52 +0200
On Thu, Jun 09, 2016 at 07:25:37AM -0400, Christos Zoulas wrote:
> On Jun 9, 7:45am, netbsd@benjaminlorenz.email (netbsd@benjaminlorenz.email) wrote:
> -- Subject: pkg/51229: nodejs SIGSEGV on NetBSD/evbarm
>
> DO we get the right cpp define for the processor?
>
> https://github.com/nodejs/node/blob/master/deps/v8/src/base/atomicops_internals_arm_gcc.h
lang/nodejs is missing the fix from lang/nodejs4.
Joerg
From: Benjamin Lorenz <inbox@benjaminlorenz.email>
To: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org, netbsd@benjaminlorenz.email
Cc:
Subject: Re: pkg/51229: nodejs SIGSEGV on NetBSD/evbarm
Date: Fri, 10 Jun 2016 20:41:46 +0200
--=-Hv3ucA4XeAua2UCDQj99
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
On Thu, Jun 09, 2016 at 07:25:37AM -0400, Christos Zoulas wrote:=C2=A0
> On Jun 9, =C2=A07:45am, netbsd@benjaminlorenz.email (netbsd@benjaminlore=
nz.email) wrote:=20
> -- Subject: pkg/51229: nodejs SIGSEGV on NetBSD/evbarm=20
> =20
> DO we get the right cpp define for the processor?=20
> =20
> https://github.com/nodejs/node/blob/master/deps/v8/src/base/atomicops_in=
ternals_arm_gcc.h=20
=20
lang/nodejs is missing the fix from lang/nodejs4.=20
=20
Joerg=20
nodejs4 currently also crashes at startup:
(gdb) start=20
Temporary breakpoint 1 at 0x5a34dc: file ../src/node_main.cc, line 44.=20
Starting program: /usr/pkg/src/lang/nodejs4/work/node-v4.4.5/out/Release/no=
de=C2=A0=20
[Switching to LWP 1]=20
=20
Temporary breakpoint 1, main (argc=3D1, argv=3D0x7fffcccc) at ../src/node_m=
ain.cc:44=20
44=C2=A0 =C2=A0 =C2=A0 =C2=A0 setvbuf(stderr, NULL, _IOLBF, 1024);=20
(gdb) l=20
39=C2=A0 =C2=A0 =C2=A0 =C2=A0 return node::Start(argc, argv);=20
40=C2=A0 =C2=A0 =C2=A0 }=20
41=C2=A0 =C2=A0 =C2=A0 #else=20
42=C2=A0 =C2=A0 =C2=A0 // UNIX=20
43=C2=A0 =C2=A0 =C2=A0 int main(int argc, char *argv[]) {=20
44=C2=A0 =C2=A0 =C2=A0 =C2=A0 setvbuf(stderr, NULL, _IOLBF, 1024);=20
45=C2=A0 =C2=A0 =C2=A0 =C2=A0 return node::Start(argc, argv);=20
46=C2=A0 =C2=A0 =C2=A0 }=20
47=C2=A0 =C2=A0 =C2=A0 #endif=20
(gdb) n=20
=20
Program received signal SIGSEGV, Segmentation fault.=20
0xffff0fc0 in ?? ()=20
(gdb) bt=20
#0=C2=A0 0xffff0fc0 in ?? ()=20
#1=C2=A0 0x0087ddd8 in v8::base::(anonymous namespace)::LinuxKernelCmpxchg =
(=20
=C2=A0 =C2=A0 old_value=3D0, new_value=3D1, ptr=3D0x12cb500 <v8::base::entr=
opy_mutex>)=20
=C2=A0 =C2=A0 at ../deps/v8/src/base/atomicops_internals_arm_gcc.h:186=20
#2=C2=A0 0x0087dec4 in v8::base::Acquire_CompareAndSwap (=20
=C2=A0 =C2=A0 ptr=3D0x12cb500 <v8::base::entropy_mutex>, old_value=3D0, new=
_value=3D1)=20
=C2=A0 =C2=A0 at ../deps/v8/src/base/atomicops_internals_arm_gcc.h:243=20
#3=C2=A0 0x00e6da3c in v8::base::CallOnceImpl (=20
=C2=A0 =C2=A0 once=3D0x12cb500 <v8::base::entropy_mutex>, init_func=3D=20
=C2=A0 =C2=A0 0x862da4 <v8::base::LazyInstanceImpl<v8::base::Mutex, v8::bas=
e::StaticallyAllocatedInstanceTrait<v8::base::Mutex>, v8::base::DefaultCons=
tructTrait<v8::base::Mutex>, v8::base::ThreadSafeInitOnceTrait, v8::base::L=
eakyInstanceTrait<v8::base::Mutex> >::InitInstance(v8::base::StaticallyAllo=
catedInstanceTrait<v8::base::Mutex>::StorageType*)>, arg=3D0x12cb504 <v8::b=
ase::entropy_mutex+4>)=20
=C2=A0 =C2=A0 at ../deps/v8/src/base/once.cc:33
=
--=-Hv3ucA4XeAua2UCDQj99
Content-Type: text/html; charset="utf-8"
<html><head></head><body>On Thu, Jun 09, 2016 at 07:25:37AM -0400, Christos Zoulas wrote: <br><div><blockquote class="mori" style="margin:0 0 0 .8ex;border-left:1px solid #CCC;padding-left:1ex;"> > On Jun 9, 7:45am, netbsd@benjaminlorenz.email (netbsd@benjaminlorenz.email) wrote:
<br> > -- Subject: pkg/51229: nodejs SIGSEGV on NetBSD/evbarm
<br> >
<br> > DO we get the right cpp define for the processor?
<br> >
<br> > https://github.com/nodejs/node/blob/master/deps/v8/src/base/atomicops_internals_arm_gcc.h
<br>
<br> lang/nodejs is missing the fix from lang/nodejs4.
<br>
<br> Joerg
</blockquote></div><div><br></div><div><br></div>nodejs4 currently also crashes at startup:<div><br></div><div><p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">(gdb) start</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">Temporary breakpoint 1 at 0x5a34dc: file ../src/node_main.cc, line 44.</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">Starting program: /usr/pkg/src/lang/nodejs4/work/node-v4.4.5/out/Release/node </span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">[Switching to LWP 1]</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo; min-height: 15px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">Temporary breakpoint 1, main (argc=1, argv=0x7fffcccc) at ../src/node_main.cc:44</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">44 setvbuf(stderr, NULL, _IOLBF, 1024);</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">(gdb) l</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">39 return node::Start(argc, argv);</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">40 }</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">41 #else</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">42 // UNIX</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">43 int main(int argc, char *argv[]) {</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">44 setvbuf(stderr, NULL, _IOLBF, 1024);</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">45 return node::Start(argc, argv);</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">46 }</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">47 #endif</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">(gdb) n</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo; min-height: 15px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">Program received signal SIGSEGV, Segmentation fault.</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">0xffff0fc0 in ?? ()</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">(gdb) bt</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">#0 0xffff0fc0 in ?? ()</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">#1 0x0087ddd8 in v8::base::(anonymous namespace)::LinuxKernelCmpxchg (</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures"> old_value=0, new_value=1, ptr=0x12cb500 <v8::base::entropy_mutex>)</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures"> at ../deps/v8/src/base/atomicops_internals_arm_gcc.h:186</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">#2 0x0087dec4 in v8::base::Acquire_CompareAndSwap (</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures"> ptr=0x12cb500 <v8::base::entropy_mutex>, old_value=0, new_value=1)</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures"> at ../deps/v8/src/base/atomicops_internals_arm_gcc.h:243</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">#3 0x00e6da3c in v8::base::CallOnceImpl (</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures"> once=0x12cb500 <v8::base::entropy_mutex>, init_func=</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures"> 0x862da4 <v8::base::LazyInstanceImpl<v8::base::Mutex, v8::base::StaticallyAllocatedInstanceTrait<v8::base::Mutex>, v8::base::DefaultConstructTrait<v8::base::Mutex>, v8::base::ThreadSafeInitOnceTrait, v8::base::LeakyInstanceTrait<v8::base::Mutex> >::InitInstance(v8::base::StaticallyAllocatedInstanceTrait<v8::base::Mutex>::StorageType*)>, arg=0x12cb504 <v8::base::entropy_mutex+4>)</span></p>
<p style="margin: 0px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures"> at ../deps/v8/src/base/once.cc:33</span></p></div><div><span style="font-variant-ligatures: no-common-ligatures"><br></span></div></body></html>
--=-Hv3ucA4XeAua2UCDQj99--
From: Joerg Sonnenberger <joerg@bec.de>
To: Benjamin Lorenz <inbox@benjaminlorenz.email>
Cc: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org, netbsd@benjaminlorenz.email
Subject: Re: pkg/51229: nodejs SIGSEGV on NetBSD/evbarm
Date: Sat, 11 Jun 2016 23:38:44 +0200
On Fri, Jun 10, 2016 at 08:41:46PM +0200, Benjamin Lorenz wrote:
> nodejs4 currently also crashes at startup:
Yeah, more Linux-only crap. Take a look at protobuf, that should be
mostly usable as base for a full fix.
Joerg
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.