Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::logic_error exception with NODE_DEBUG_NATIVE #31536

Closed
bnoordhuis opened this issue Jan 27, 2020 · 2 comments
Closed

std::logic_error exception with NODE_DEBUG_NATIVE #31536

bnoordhuis opened this issue Jan 27, 2020 · 2 comments

Comments

@bnoordhuis
Copy link
Member

$ git rev-parse HEAD
f2842904c2b6ea2e770f9b3d38115c958fa55c22

$ env NODE_DEBUG_NATIVE=tls gdb -q --args ./out/Release/node test/sequential/test-https-keep-alive-large-write.js 
Reading symbols from ./out/Release/node...
(gdb) r
Starting program: /home/bnoordhuis/src/master/out/Release/node test/sequential/test-https-keep-alive-large-write.js
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7a2c700 (LWP 1581)]
[New Thread 0x7ffff722b700 (LWP 1582)]
[New Thread 0x7ffff6a2a700 (LWP 1583)]
[New Thread 0x7ffff6229700 (LWP 1584)]
[New Thread 0x7ffff5a28700 (LWP 1585)]
[New Thread 0x7ffff7fcb700 (LWP 1586)]
TLSWrap client (5) Created new TLSWrap
[New Thread 0x7ffff5227700 (LWP 1587)]
[New Thread 0x7ffff4a26700 (LWP 1588)]
[New Thread 0x7fffdffff700 (LWP 1589)]
[New Thread 0x7fffdf7fe700 (LWP 1590)]
TLSWrap server (14) Created new TLSWrap
TLSWrap client (5) Trying to read cleartext output
TLSWrap client (5) SSLInfoCallback(SSL_CB_HANDSHAKE_START);
TLSWrap client (5) Read -1 bytes of cleartext output
TLSWrap client (5) Trying to write encrypted output
TLSWrap client (5) Writing 1 buffers to the underlying stream
TLSWrap client (5) Write finished synchronously
TLSWrap client (5) ReadStart()
TLSWrap client (5) DoWrite()
TLSWrap client (5) Writing 60 bytes, written = -1
TLSWrap client (5) Saving data for later write
TLSWrap client (5) Trying to write encrypted output
TLSWrap client (5) Returning from EncOut(), write currently in progress
TLSWrap client (5) OnStreamAfterWrite(status = 0)
TLSWrap client (5) Trying to write cleartext input
TLSWrap client (5) Writing 60 bytes, written = -1
TLSWrap client (5) Pushing data back
TLSWrap client (5) Trying to write encrypted output
TLSWrap client (5) No pending encrypted output
TLSWrap server (14) Read 363 bytes from underlying stream
TLSWrap server (14) Trying to write cleartext input
TLSWrap server (14) Returning from ClearIn(), no pending data
TLSWrap server (14) Trying to read cleartext output
TLSWrap server (14) SSLInfoCallback(SSL_CB_HANDSHAKE_START);
TLSWrap server (14) Read -1 bytes of cleartext output
TLSWrap server (14) Trying to write encrypted output
TLSWrap server (14) Writing 1 buffers to the underlying stream
TLSWrap server (14) Write finished synchronously
TLSWrap server (14) OnStreamAfterWrite(status = 0)
TLSWrap server (14) Trying to write cleartext input
TLSWrap server (14) Returning from ClearIn(), no pending data
TLSWrap server (14) Trying to write encrypted output
TLSWrap server (14) No pending encrypted output
TLSWrap server (14) No pending cleartext input, not inside DoWrite()
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid

Thread 1 "node" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff7a57899 in __GI_abort () at abort.c:79
#2  0x00007ffff7e4d5f6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff7e599ec in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff7e59a47 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff7e59ca9 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff7e4fda4 in std::__throw_logic_error(char const*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x0000555555d552ac in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) [clone .isra.0] ()
#8  0x0000555555d55a99 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > node::SPrintFImpl<char const*&>(char const*, char const*&) ()
#9  0x0000555555d66e40 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > node::SPrintFImpl<int&, char const*&>(char const*, int&, char const*&) ()
#10 0x0000555555d66ecd in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > node::SPrintF<int&, char const*&>(char const*, int&, char const*&) ()
#11 0x0000555555d66f1a in void node::FPrintF<int&, char const*&>(_IO_FILE*, char const*, int&, char const*&) ()
#12 0x0000555555d6700f in void node::UnconditionalAsyncWrapDebug<int&, char const*&>(node::AsyncWrap*, char const*, int&, char const*&) ()
#13 0x0000555555d66566 in node::TLSWrap::InvokeQueued(int, char const*) [clone .cold] ()
#14 0x0000555555f5f4d0 in node::TLSWrap::EncOut() ()
#15 0x0000555555f604eb in node::Environment::NativeImmediateCallbackImpl<node::TLSWrap::EncOut()::{lambda(node::Environment*)#2}>::Call(node::Environment*) ()
#16 0x0000555555da9658 in node::Environment::RunAndClearNativeImmediates(bool) ()
#17 0x0000555555da99b5 in node::Environment::CheckImmediate(uv_check_s*) ()
#18 0x00005555567fd921 in uv__run_check (loop=loop@entry=0x5555594c21a0 <default_loop_struct>) at ../deps/uv/src/unix/loop-watcher.c:67
#19 0x00005555567f5dec in uv_run (loop=0x5555594c21a0 <default_loop_struct>, mode=UV_RUN_DEFAULT) at ../deps/uv/src/unix/core.c:376
#20 0x0000555555e60834 in node::NodeMainInstance::Run() () at ../deps/uv/src/unix/core.c:856
#21 0x0000555555de55ab in node::Start(int, char**) () at ../deps/uv/src/unix/core.c:856
#22 0x00007ffff7a591e3 in __libc_start_main (main=0x555555d6d660 <main>, argc=2, argv=0x7fffffffdd88, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdd78) at ../csu/libc-start.c:308
#23 0x0000555555d6ec0e in _start () at ../deps/uv/src/unix/core.c:856

cc @addaleax

@addaleax
Copy link
Member

Already being fixed in #31523 :)

@addaleax
Copy link
Member

This has been fixed a while ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants