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

Segmentation fault with vendor/linux-x64-48/binding.node #1572

Closed
thinkrapido opened this issue May 28, 2016 · 18 comments
Closed

Segmentation fault with vendor/linux-x64-48/binding.node #1572

thinkrapido opened this issue May 28, 2016 · 18 comments

Comments

@thinkrapido
Copy link

os: ubuntu 16.04
version: node-sass 3.7.0; libsass0 3.3.4-1

I'm doing ng serve of angular/angular-cli project after installing npm install compass-importer node-sass which causes a segmentation fault in render_sync function

I thought it could be a malformed binary download of binding.node, so I did npm run build and generated the newest version. But this fails as well.

Do you have suggestions how to fix this?

@saper
Copy link
Member

saper commented May 28, 2016

Can you produce a minimal scss code that causes this?

@xzyfer
Copy link
Contributor

xzyfer commented May 29, 2016

node-sass@v3.7.0 should be compiled against LibSass@3.3.6. You're correct that you some how have the wrong native extension. Try deleting you're node_modules folder and reinstall node-sass.

Other than that there is not much we can do since there would be a local environment issue preventing you come downloading the correct native extension. Make sure you don't mistakenly have a configuration variable set.

@saper
Copy link
Member

saper commented May 29, 2016

I wonder what goes wrong here since we embed the correct libsass in the node-sass binary itself, so it should not matter what kind of libsass library is installed by the system. Did you compile the binding yourself?

@thinkrapido
Copy link
Author

I compared the sass/libsass project with the src/libsass folder in node-sass.
Both file sets are identically (except .gitignore and .npmignore, but this shouldn't matter)

@thinkrapido
Copy link
Author

@saper the mere existence of a scss file (it's empty) causes a segmentation fault.

@thinkrapido
Copy link
Author

I deleted the compass-importer module from my angular-cli project.

Now the compilation of scss files work fine.

I suggest further investigation about compass-importer and node-sass dependencies.

@saper
Copy link
Member

saper commented May 29, 2016

Well, I don't think I can reproduce your problem. node-sass does not work with Compass, but we should not have a core dump. Can you try to produce a backtrace?

@thinkrapido
Copy link
Author

I really don't know how to do this.

I tried to find the core dump on my system but was not successful.
Where shall I look?

How do I create a backtrace?

@saper
Copy link
Member

saper commented May 30, 2016

first, try ulimit -c 500000 to enable core dumps (if disabled), once you get a core, you can do gdb <yournodeengine> <corefile> and ask for "bt"

Alternatively you can run your thing under gdb --args <nodeengine> <parameters> - in this case it will break to debugger immediately when crashing.

@thinkrapido
Copy link
Author

@nschonni
A blank scss file produces a segmentation fault

h1 { color: red; }

as well

but only in combination with compass-importer

@saper
Copy link
Member

saper commented May 31, 2016

@thinkrapido can you prepare a small self-contained repo to reproduce the problem?

@thinkrapido
Copy link
Author

gdb /usr/local/bin/node core

Reading symbols from /usr/local/bin/node...done.

warning: core file may not match specified executable file.
[New LWP 4032]
[New LWP 4035]
[New LWP 4033]
[New LWP 4039]
[New LWP 4041]
[New LWP 4040]
[New LWP 4038]
[New LWP 4034]
[New LWP 4037]
[New LWP 4036]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `angular-cli                 '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000930da0 in v8::Value::IsArray() const ()
[Current thread is 1 (Thread 0x7f60ff0b4740 (LWP 4032))]
(gdb) bt
#0  0x0000000000930da0 in v8::Value::IsArray() const ()
#1  0x00007f60f906e024 in CustomImporterBridge::post_process_return_value(v8::Local<v8::Value>) const () from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#2  0x00007f60f906d9d6 in CallbackBridge<Sass_Import**, void*>::operator()(std::vector<void*, std::allocator<void*> >) ()
   from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#3  0x00007f60f906b843 in sass_importer(char const*, Sass_Importer*, Sass_Compiler*) () from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#4  0x00007f60f90a1e46 in Sass::Context::call_loader(std::string const&, char const*, Sass::ParserState&, Sass::Import*, std::vector<Sass_Importer*, std::allocator<Sass_Importer*> >, bool) ()
   from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#5  0x00007f60f916460b in Sass::Parser::parse_import() () from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#6  0x00007f60f9169924 in Sass::Parser::parse_block_node(bool) () from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#7  0x00007f60f916c62b in Sass::Parser::parse_block_nodes(bool) () from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#8  0x00007f60f916d1fc in Sass::Parser::parse() () from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#9  0x00007f60f909ee8b in Sass::Context::register_resource(Sass::Include const&, Sass::Resource const&, Sass::ParserState*) ()
   from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#10 0x00007f60f909f98c in Sass::Data_Context::parse() () from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#11 0x00007f60f9077b27 in sass_compiler_parse () from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#12 0x00007f60f90780e6 in sass_compile_data_context () from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#13 0x00007f60f906b264 in render_sync(Nan::FunctionCallbackInfo<v8::Value> const&) () from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#14 0x00007f60f9068e56 in Nan::imp::FunctionCallbackWrapper(v8::FunctionCallbackInfo<v8::Value> const&) () from /home/jbc/Work/igs/angcli/node_modules/node-sass/vendor/linux-x64-48/binding.node
#15 0x0000000000956081 in v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ()
#16 0x00000000009a9e8b in v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>) ()
#17 0x00000000009aa431 in v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) ()
#18 0x0000161bd7a0961b in ?? ()
#19 0x0000161bd7a09561 in ?? ()
#20 0x00007ffd02bb2810 in ?? ()
#21 0x00007ffd02bb2870 in ?? ()
#22 0x0000161bd847851c in ?? ()
#23 0x00003029a71de4d9 in ?? ()
#24 0x000026a6130bab49 in ?? ()
#25 0x00000629327b2389 in ?? ()
#26 0x00003029a71de4d9 in ?? ()
#27 0x0000290740f04189 in ?? ()
#28 0x0000290740f04189 in ?? ()
#29 0x00003029a71e8079 in ?? ()
#30 0x0000007e3eb37b21 in ?? ()
#31 0x00007ffd02bb28c0 in ?? ()
#32 0x0000161bd8477ee7 in ?? ()
#33 0x000026a6130bab49 in ?? ()
#34 0x00000629327b33f9 in ?? ()
#35 0x00003029a71e8079 in ?? ()
#36 0x0000290740f041e9 in ?? ()
#37 0x0000290740f041e9 in ?? ()
#38 0x000026a6130bab49 in ?? ()
#39 0x00000629327dc581 in ?? ()
#40 0x0000062932761ac9 in ?? ()
#41 0x00007ffd02bb2910 in ?? ()
#42 0x0000161bd8477b76 in ?? ()
#43 0x0000007e3eae1a01 in ?? ()
#44 0x0000007e3eae43e1 in ?? ()
#45 0x0000007e3eb373f1 in ?? ()
#46 0x000026a6130b7f61 in ?? ()
#47 0x00000629327dc581 in ?? ()
#48 0x0000007e3eb373f1 in ?? ()
#49 0x0000007e3eb36e81 in ?? ()
#50 0x0000007e3eb36cd1 in ?? ()
#51 0x00007ffd02bb2948 in ?? ()
#52 0x0000161bd7a0d157 in ?? ()
#53 0x0000007e3eb200c1 in ?? ()
#54 0x0000290740f04189 in ?? ()
#55 0x0000000300000000 in ?? ()
#56 0x0000007e3eb36e81 in ?? ()
#57 0x0000000b00000000 in ?? ()
#58 0x00007ffd02bb29b0 in ?? ()
#59 0x0000161bd825ab27 in ?? ()
#60 0x0000007e3eb36db9 in ?? ()
#61 0x0000000000000000 in ?? ()

@thinkrapido
Copy link
Author

thinkrapido commented May 31, 2016

@saper

https://drive.google.com/file/d/0B6ajHGm5eAS6c0pDLW1ZZWdFdVU/view?usp=sharing

package.json contains compass-importer and node-sass modules

only src/app/angular-test.component.scss was added

prerequisites:

npm install -g angular-cli

in angular-test folder:

npm install

and execute with ng serve

@NamPNQ
Copy link

NamPNQ commented Jun 3, 2016

I have same issuse
My os: Arch
Node version: 6.2.1
Npm version: 3.9.5

gdb ./binding.node

(gdb) bt full
#0  0x000000000008a916 in ?? ()
No symbol table info available.
#1  0x00005555555e008c in handle_error ()
No symbol table info available.

@xzyfer
Copy link
Contributor

xzyfer commented Jun 6, 2016

@NamPNQ arch linux is not supported. Our prebuilt binaries to do not run on arch linux, you'll need to compile your own with npm rebuild node-sass.

@NamPNQ
Copy link

NamPNQ commented Jun 6, 2016

@xzyfer I had rebuild and get same isusse

@khoandse
Copy link

khoandse commented Jun 6, 2016

I got the same issue with vendor/linux-x64-48/binding.node here.
I'm running it on CentOS 6.6, Node v.5.3.0
But take a look at this: https://github.com/sass/node-sass-binaries. There's no linux-x64-48_binding.node?
Tried npm rebuild node-sass; even remove node_modules/ and install it all over again for several times but still not working :(

@xzyfer
Copy link
Contributor

xzyfer commented Jun 6, 2016

Please provide small, copy pasteable code samples that cause a segfault so
I see it locally. Preferably using sassmeister.com.
On 6 Jun 2016 8:36 PM, "khoandse" notifications@github.com wrote:

I got the same issue with vendor/linux-x64-48/binding.node here.
I'm running it on CentOS 6.6, Node v.5.3.0
But take a look at this: https://github.com/sass/node-sass-binaries.
There's no linux-x64-48_binding.node?
Tried npm rebuild node-sass; even remove node_modules/ and install it all
over again for several times but still not working :(


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1572 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAjZWJMY8MmjxN4Pv0kmqstsX0LMIqj4ks5qI_gngaJpZM4IpJeV
.

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

6 participants