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

periodic errors #33

Closed
gregtillbrook opened this issue Oct 26, 2012 · 9 comments
Closed

periodic errors #33

gregtillbrook opened this issue Oct 26, 2012 · 9 comments

Comments

@gregtillbrook
Copy link

Hi there.

Ive been using node-sass as part of grunt-sass (set to auto regenerate with grunts watch task) and have been seeing the following periodic errors.

Error shown;
node(14524,0x1017bb000) malloc: *** mmap(size=1152921504876556288) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
terminate called throwing an exceptionAbort trap: 6

The errors seem to happen randomly, roughly once in every 10 runs. If I build again after an error, everything goes fine.

Any idea what could cause that?
Cheers,
Greg

O.S. = Mac OS X
node-sass v0.2.4 as part of grunt-sass v0.2.4

@deanmao
Copy link
Contributor

deanmao commented Oct 26, 2012

hm hard to tell from here. can you run with gdb and give us a stack trace?

@gregtillbrook
Copy link
Author

hmm - not used gdb yet. Ill have a play this weekend and see what I turn up

@gregtillbrook
Copy link
Author

Ah, it hadn't clicked that gdb is a C++ debugger. Is that easy to hook up? I thought the debugged object needs to have been built with debugging enabled?

For what its worth I tried debugging with node-inspector but got nothing in the inspector when it died and console output was a little different but not looking any more helpful;

node(15428,0x1034fe000) malloc: *** mmap(size=2305843009485295616) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
terminate called throwing an exception[1]- Killed: 9 node_modules/grunt/bin/grunt watch
[2]+ Killed: 9 grunt watch
Abort trap: 6

@deanmao
Copy link
Contributor

deanmao commented Oct 26, 2012

gdb works for c/c++, and will still give decent info even without debugging symbols. node-sass is mostly just a thin wrapper around libsass, which is all c++ code so node-inspector will not output anything useful for us.

@gregtillbrook
Copy link
Author

Ive had a play with gbc so lets see if Ive been using it right! I attached to the grunt sass process and when the error occured got this;

Program received signal SIGABRT, Aborted.
[Switching to process 18273 thread 0x2803]
0x00007fff8a32dce2 in __pthread_kill ()

I then tried 'backtrace' and got something that appears like it may be more useful - is it?

0 0x00007fff8a32dce2 in __pthread_kill ()
1 0x00007fff8bcf57d2 in pthread_kill ()
2 0x00007fff8bce6a7a in abort ()
3 0x00007fff9141e7bc in abort_message ()
4 0x00007fff9141bfcf in default_terminate ()
5 0x00007fff8885b1cd in _objc_terminate ()
6 0x00007fff9141c001 in safe_handler_caller ()
7 0x00007fff9141c05c in std::terminate ()
8 0x00007fff9141d152 in __cxa_throw ()
9 0x00007fff848e8255 in std::__throw_length_error ()
10 0x00007fff8490e84e in std::string::_Rep::_S_create ()
11 0x00007fff849102fa in std::string::_S_construct<char const*> ()
12 0x00007fff849104a8 in std::basic_string<char, std::char_traits, std::allocator >::basic_string ()
13 0x000000010172c0f8 in Sass::Token::to_string () at :68
14 0x000000010172c0f8 in Sass::Node::to_string (this=0x7fff8bd0f711, inside_of=Sass::Node::none) at ../libsass/node_emitters.cpp:68
15 0x000000010172f5d1 in std::string::data () at ../libsass/node_emitters.cpp:390
16 0x000000010172f5d1 in std::string::_M_data () at /usr/include/c++/4.2.1/bits/basic_string.h:2413
17 0x000000010172f5d1 in std::operator<< <char, std::char_traits, std::allocator > () at /usr/include/c++/4.2.1/bits/basic_string.h:1542
18 0x000000010172f5d1 in Sass::Node::emit_nested_css (this=0x102844e88, buf=@0x1017ba708, depth=1, at_toplevel=false, in_media_query=true) at ../libsass/node_emitters.cpp:390
19 0x000000010172fa13 in std::operator<< std::char_traits () at /usr/include/c++/4.2.1/ostream:427
20 0x000000010172fa13 in Sass::Node::emit_nested_css (this=0x10300bf28, buf=@0x1017ba708, depth=<value temporarily unavailable, due to optimizations>, at_toplevel=<value temporarily unavailable, due to optimizations>, in_media_query=false) at ../libsass/node_emitters.cpp:428
21 0x000000010172f4df in Sass::Node::emit_nested_css (this=0x1017bac58, buf=@0x1017ba708, depth=0, at_toplevel=true, in_media_query=false) at ../libsass/node_emitters.cpp:379
22 0x0000000101709787 in std::basic_stringstream<char, std::char_traits, std::allocator >::str () at /usr/include/c++/4.2.1/sstream:133
23 0x0000000101709787 in Sass::Document::emit_css (this=<value temporarily unavailable, due to optimizations>, style=<value temporarily unavailable, due to optimizations>) at ../libsass/document.cpp:141
24 0x0000000101733581 in std::string::_M_rep () at ../libsass/sass_interface.cpp:51
25 0x0000000101733581 in std::string::_M_data () at /usr/include/c++/4.2.1/bits/basic_string.h:605
26 0x0000000101733581 in std::string::size () at /usr/include/c++/4.2.1/bits/basic_string.h:287
27 0x0000000101733581 in process_document (doc=@0x1017bac20, style=0) at ../libsass/sass_interface.cpp:52
28 0x0000000101733157 in sass_compile (c_ctx=0x102800140) at ../libsass/sass_interface.cpp:65
29 0x00000001000462a8 in etp_proc ()
30 0x00007fff8bcf38bf in _pthread_start ()
31 0x00007fff8bcf6b75 in thread_start ()

@gregtillbrook
Copy link
Author

Gah, just noticed the hashes in the stack trace I pasted auto created references in other issues. Have edited them out. Sorry!

@bwilkins
Copy link
Contributor

@gregtillbrook does this issue still persist?

Please try with node-sass 0.4.3, which requires node 0.10.x.

@bwilkins
Copy link
Contributor

Closing due to lack of response.

@gregtillbrook
Copy link
Author

Sorry about the lack of response. Ive long since moved on so no longer an issue for me.

Cheers, Greg

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