Discussion:
[arch-ports] node-gyp segfault on node 11.1.0 archlinux32
Matthew Hague via arch-ports
2018-11-24 17:01:50 UTC
Permalink
Hi,

I am currently running into the following problem trying to run

$ npm install hci-bluetooth-socket

I am told i need to run "node-gyp configure" first, which always
segfaults:

$ node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-***@3.8.0
gyp info using ***@11.1.0 | linux | ia32
gyp http GET https://nodejs.org/download/release/v11.1.0/node-v11.1.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v11.1.0/node-v11.1.0-headers.tar.gz
zsh: segmentation fault (core dumped) node-gyp configure

I have tried with node-gyp 3.7 with the same results. Has anyone else
encountered this problem or have ideas how to diagnose/fix? I am
currently attempting to install a different version of node.

Here is a bit more information. It's a bit light, but i'm not sure what
else to provide!

$ pacman -Qs node
local/node-gyp 3.8.0-1.0
Node.js native addon build tool
local/nodejs 11.1.0-1.2
Evented I/O for V8 javascript

$ uname -a
Linux matteee 4.18.16-arch1-1.0-ARCH #1 SMP PREEMPT Tue Oct 23 20:21:46 CEST 2018 i686 GNU/Linux

Thanks,

Matt
Andreas Baumann
2018-11-25 20:03:17 UTC
Permalink
Post by Matthew Hague via arch-ports
Hi,
I am currently running into the following problem trying to run
$ npm install hci-bluetooth-socket
$ node-gyp configure
gyp info it worked if it ends with ok
gyp http GET https://nodejs.org/download/release/v11.1.0/node-v11.1.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v11.1.0/node-v11.1.0-headers.tar.gz
zsh: segmentation fault (core dumped) node-gyp configure
Hi,


I can reproduce the segfault with node-gyp 3.8.0-1.0 and nodejs 11.1.0-1.2
on Archlinux32 stable and testing:

(gdb) bt
#0 0x0087eed9 in node::fs::FSReqCallback::~FSReqCallback() ()
#1 0x008705f4 in node::fs::FSReqAfterScope::~FSReqAfterScope() ()
#2 0x0087083a in node::fs::AfterInteger(uv_fs_s*) ()
#3 0xb7ec5a10 in uv.work_done () from /usr/lib/libuv.so.1
#4 0xb7ec95fe in ?? () from /usr/lib/libuv.so.1
#5 0xb7ed9498 in uv.io_poll () from /usr/lib/libuv.so.1
#6 0xb7ec9fe1 in uv_run () from /usr/lib/libuv.so.1
#7 0x0083e477 in node::Start(v8::Isolate*, node::IsolateData*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) ()
#8 0x0083c6a0 in node::Start(int, char**) ()
#9 0x007eb1a1 in main ()

Maybe this is a linking mismatch between nodejs and libuv?

The only way to find out is most likely to build all affected packages
with debug symbols and have a look.

Cheers

Andreas
Post by Matthew Hague via arch-ports
I have tried with node-gyp 3.7 with the same results. Has anyone else
encountered this problem or have ideas how to diagnose/fix? I am currently
attempting to install a different version of node.
Here is a bit more information. It's a bit light, but i'm not sure what
else to provide!
$ pacman -Qs node local/node-gyp 3.8.0-1.0
Node.js native addon build tool
local/nodejs 11.1.0-1.2
Evented I/O for V8 javascript
$ uname -a Linux matteee 4.18.16-arch1-1.0-ARCH #1 SMP PREEMPT
Tue Oct 23 20:21:46 CEST 2018 i686 GNU/Linux
Thanks,
Matt
_______________________________________________
arch-ports mailing list
https://lists.archlinux.org/listinfo/arch-ports
--
Andreas Baumann
Trottenstrasse 20
CH-8037 Zuerich
Telefon: +41(0)76/373 01 29
E-mail: ***@andreasbaumann.cc
Homepage: www.andreasbaumann.cc
Matthew Hague via arch-ports
2018-11-25 20:57:40 UTC
Permalink
Post by Andreas Baumann
I can reproduce the segfault with node-gyp 3.8.0-1.0 and nodejs 11.1.0-1.2
Great, at least it's not something weird i did.

I have managed to compile nodejs 10.0.0 by adjusting the PKGBUILD and it
fixes the error. I will try compiling nodejs 11.1.0 in this way and see
what happens -- maybe it will the linking problem will go away?

Best,

Matt
Eli Schwartz
2018-11-26 02:30:21 UTC
Permalink
Post by Matthew Hague via arch-ports
Post by Andreas Baumann
I can reproduce the segfault with node-gyp 3.8.0-1.0 and nodejs 11.1.0-1.2
Great, at least it's not something weird i did.
I have managed to compile nodejs 10.0.0 by adjusting the PKGBUILD and it
fixes the error.  I will try compiling nodejs 11.1.0 in this way and see
what happens -- maybe it will the linking problem will go away?
So in essence you're saying it works with community/nodejs-lts-dubnium?
--
Eli Schwartz
Bug Wrangler and Trusted User
Matthew Hague via arch-ports
2018-11-26 20:57:58 UTC
Permalink
Post by Andreas Baumann
Maybe this is a linking mismatch between nodejs and libuv?
Using makepkg to build the PKGBUILD for nodejs 11 does not work.

However, from the upstream source files, if i modify PKGBUILD to the i686
arch, and comment out --shared-libuv in build(), the segfault goes away.

I think it's beyond my resources to track down the specific problem with
libuv.

Best,

Matt

Loading...