Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Segfault against npm binding, not against repository #1679

Closed
Azenet opened this issue Aug 25, 2016 · 3 comments
Closed

Segfault against npm binding, not against repository #1679

Azenet opened this issue Aug 25, 2016 · 3 comments

Comments

@Azenet
Copy link

Azenet commented Aug 25, 2016

This bug report follows a discussion with saper on IRC.

Ionic 2 base install seems to make libsass segfault after installing node-sass through NPM, however if I rebuild the binding from this repository the build works fine.

This is using Debian 7 with Linux x64, gcc 4.7, stdc6 4.7.2-5

Use this repository to reproduce, or follow these steps:

  1. npm install -g ionic@beta
  2. ionic start libsass-segfault --v2
  3. cd libsass-segfault
  4. node node_modules/node-sass/bin/node-sass --include-path node_modules/ionic-angular/ --include-path node_modules/ionicons/dist/scss/ app/theme/app.ios.scss (should segfault)
  5. Clone node-sass repository, cd, node scripts/build -f, cp vendor/linux-x64-48/binding.node libsass-segfault/node_modules/node-sass/vendor/linux-x64-48/binding.node, and rerun command from step 4, does not segfault.

npm rebuild node-sass log after deleting binding:


> node-sass@3.8.0 install node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at node_modules/node-sass/vendor/linux-x64-48/binding.node

> node-sass@3.8.0 postinstall node_modules/node-sass
> node scripts/build.js

"node_modules/node-sass/vendor/linux-x64-48/binding.node" exists. 
 testing binary.
Binary is fine; exiting.
node-sass@3.8.0 node_modules/node-sass

ldd for both bindings are identical:

        linux-vdso.so.1 =>  (0x00007fff5ffc7000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd50e921000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd50e69f000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd50e489000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd50e26d000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd50dee0000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd50f05e000)

Backtrace I get when segfaulting:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffef7fe700 (LWP 9153)]
0x00007ffff49695c2 in Sass::Eval::operator()(Sass::Map*) () from node_modules/node-sass/vendor/linux-x64-48/binding.node
(gdb) bt
#0  0x00007ffff49695c2 in Sass::Eval::operator()(Sass::Map*) () from node_modules/node-sass/vendor/linux-x64-48/binding.node
#1  0x00007ffff496b356 in Sass::Eval::operator()(Sass::List*) () from node_modules/node-sass/vendor/linux-x64-48/binding.node
#2  0x00007ffff4972d51 in Sass::Expand::operator()(Sass::Assignment*) () from node_modules/node-sass/vendor/linux-x64-48/binding.node
#3  0x00007ffff4977c94 in Sass::Expand::operator()(Sass::Import_Stub*) () from node_modules/node-sass/vendor/linux-x64-48/binding.node
#4  0x00007ffff497379c in Sass::Expand::operator()(Sass::Block*) () from node_modules/node-sass/vendor/linux-x64-48/binding.node
#5  0x00007ffff493f7df in Sass::Context::compile() () from node_modules/node-sass/vendor/linux-x64-48/binding.node
#6  0x00007ffff493ba3e in Sass::Data_Context::parse() () from node_modules/node-sass/vendor/linux-x64-48/binding.node
#7  0x00007ffff4913b27 in sass_compiler_parse () from node_modules/node-sass/vendor/linux-x64-48/binding.node
#8  0x00007ffff49140e6 in sass_compile_data_context () from node_modules/node-sass/vendor/linux-x64-48/binding.node
#9  0x00000000010c262d in ?? ()
#10 0x00000000010cec59 in ?? ()
#11 0x00007ffff701cb50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#12 0x00007ffff6d6695d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#13 0x0000000000000000 in ?? ()
@saper
Copy link
Member

saper commented Aug 25, 2016

Thanks @Azenet !

@saper
Copy link
Member

saper commented Oct 22, 2016

Can you try to reproduce the problem using a simple test case from #1757 ?

@saper
Copy link
Member

saper commented Oct 18, 2019

Stale report, please provide a fresh reproduction case if the problem is still there with 4.12.0

@saper saper closed this as completed Oct 18, 2019
jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this issue Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants