You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Managed to get a core dump locally; interesting parts of the thread stack traces:
Thread 7 (Thread 0x7fd3e1708740 (LWP32401)):
#0_int_free (have_lock=0, p=0x557d4eedc500, av=0x7fd3e05a3c40 <main_arena>) at malloc.c:4167
#1__GI___libc_free (mem=0x557d4eedc510) at malloc.c:3124
#20x0000557d4d144471 in std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::_M_erase(std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*) ()
#30x0000557d4d1445e8 in node::native_module::NativeModuleLoader::~NativeModuleLoader() ()
#40x00007fd3e01fb041 in __run_exit_handlers (status=0, listp=0x7fd3e05a3718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
#50x00007fd3e01fb13a in __GI_exit (status=<optimized out>) at exit.c:139
#60x0000557d4d113131 in node::Environment::Exit(int) ()
#70x0000557d4d1388d1 in node::Exit(v8::FunctionCallbackInfo<v8::Value> const&) ()
#80x0000557d4d3b1237 in v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) ()
#90x0000557d4d3b2558 in v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) ()
#100x00001c51e784fb5d in ?? ()
#110x00001c51e7884b30 in ?? ()
#120x00001c51e784fac1 in ?? ()
#130x00007ffef03e0990 in ?? ()
#140x0000000000000006 in ?? ()
[...]
Thread 1 (Thread 0x7fd3df9b6700 (LWP32404)):
#00x0000557d4ef3a400 in ?? ()
#10x0000557d4d6eb6dc in v8::internal::ArrayBufferCollector::FreeingTask::RunInternal() ()
#20x0000557d4d1cbc45 in node::(anonymous namespace)::PlatformWorkerThread(void*) ()
#30x00007fd3e05b06db in start_thread (arg=0x7fd3df9b6700) at pthread_create.c:463
#40x00007fd3e02d988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
I feel like I’ve been seeing a lot more issues based on race conditions with C++ destructors being run from __run_exit_handlers(), but before all threads are torn down… I’m not sure what would have caused that change. Should we maybe be calling _exit() instead? Is there a way to first stop all other threads?
About the specific stack trace, was the destructor being called when one of the strings on the native module loader was already destroyed? I think the std::strings on the loader should all be local to it, so it's kind of difficult to how would the order be reversed..
On the race condition in general, is the current expectation to destroy all the per-process globals only after all the threads are torn down? I wonder if using shared_ptr for these globals would help, but that probably doesn't actually solve the root cause..
And no, I don’t think this is about the specific stack trace – it’s probably some destructor that was called earlier that destroyed some resource on which the V8 platform worker thread relied, or something similar, I would say.
assert.js:86
throw new AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
139 !== 1
at common.mustCall (/home/iojs/build/workspace/node-test-commit-linux-containered/test/parallel/test-cli-syntax.js:97:14)
at /home/iojs/build/workspace/node-test-commit-linux-containered/test/common/index.js:346:15
at ChildProcess.exithandler (child_process.js:301:5)
at ChildProcess.emit (events.js:189:13)
at maybeClose (internal/child_process.js:977:16)
at Socket.stream.socket.on (internal/child_process.js:395:11)
at Socket.emit (events.js:189:13)
at Pipe._handle.close (net.js:612:12)
Activity
mhdawson commentedon Nov 20, 2018
Also failed on linux here: https://ci.nodejs.org/job/node-test-commit-linux-containered/8755/nodes=ubuntu1604_sharedlibs_openssl110_x64/consoleFull
Worker: https://ci.nodejs.org/computer/test-joyent-ubuntu1604_sharedlibs_container-x64-4/
Config:
ubuntu1604_sharedlibs_openssl110_x64Trott commentedon Nov 23, 2018
@mhdawson Core dumped? Yikes! Hopefully build-related and not related to the test? @nodejs/build
refack commentedon Nov 23, 2018
IIUC the core dump was for the tested spawned child process, not the testing process.
node/test/parallel/test-cli-syntax.js
Lines 35 to 40 in d45e303
test: show stdout and stderr in test-cli-syntax when it fails
addaleax commentedon Dec 4, 2018
Managed to get a core dump locally; interesting parts of the thread stack traces:
I feel like I’ve been seeing a lot more issues based on race conditions with C++ destructors being run from
__run_exit_handlers(), but before all threads are torn down… I’m not sure what would have caused that change. Should we maybe be calling_exit()instead? Is there a way to first stop all other threads?/cc @joyeecheung
src: dispose of V8 platform in `process.exit()`
joyeecheung commentedon Dec 4, 2018
About the specific stack trace, was the destructor being called when one of the strings on the native module loader was already destroyed? I think the std::strings on the loader should all be local to it, so it's kind of difficult to how would the order be reversed..
On the race condition in general, is the current expectation to destroy all the per-process globals only after all the threads are torn down? I wonder if using shared_ptr for these globals would help, but that probably doesn't actually solve the root cause..
addaleax commentedon Dec 4, 2018
Potential fix is in #24828 :)
addaleax commentedon Dec 4, 2018
And no, I don’t think this is about the specific stack trace – it’s probably some destructor that was called earlier that destroyed some resource on which the V8 platform worker thread relied, or something similar, I would say.
Fishrock123 commentedon Dec 4, 2018
Another failure:
36 remaining items
gireeshpunathil commentedon Feb 5, 2019
this should be good to close now;
ncudata did now show this up.cc @refack @Trott
Trott commentedon Feb 5, 2019
Agreed: Not seeing it in ncu-ci data. Closing. Obviously, re-open if I'm wrong.
test: show stdout and stderr in test-cli-syntax when it fails
test: move test-cli-syntax to sequential
test: mark test-cli-syntax as flaky/unreliable
src: dispose of V8 platform in `process.exit()`
test: move test-cli-syntax to sequential
test: mark test-cli-syntax as flaky/unreliable
test: show stdout and stderr in test-cli-syntax when it fails
test: move test-cli-syntax to sequential
test: mark test-cli-syntax as flaky/unreliable
src: dispose of V8 platform in `process.exit()`
src: dispose of V8 platform in `process.exit()`