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
{{ message }}
Repository navigation
assertion failure in src/node_worker.cc with large number of workers #31614
(gdb) where
#0 0x00007ffff6e04377 in raise () from /lib64/libc.so.6#1 0x00007ffff6e05a68 in abort () from /lib64/libc.so.6#2 0x0000000000a9dea1 in node::Abort() ()#3 0x0000000000a9df17 in node::Assert(node::AssertionInfo const&) ()#4 0x0000000000b3ad12 in node::worker::Worker::Run() ()#5 0x0000000000b3b880 in node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::{lambda(void*)#1}::_FUN(void*) ()#6 0x00007ffff71a3ea5 in start_thread () from /lib64/libpthread.so.0#7 0x00007ffff6ecc8cd in clone () from /lib64/libc.so.6
@bnoordhuis - thanks! the first assertion has this backtrace; not able to obtain for the second one. Looks like it is always triggered by a worker thread, while the main thread is already processing the first assertion failure, because the second one occurs only when first one is present (this is my guess, no proof)
running out of file descriptors looks like a possibility; I will debug from that angle.
If you turn on coredumps, you should be able to get a backtrace. You may need to select the right thread in gdb or just run thread apply all backtrace.
(gdb) where
#0 0x00007f92514c7377 in raise () from /lib64/libc.so.6#1 0x00007f92514c8a68 in abort () from /lib64/libc.so.6#2 0x00007f92514c0196 in __assert_fail_base () from /lib64/libc.so.6#3 0x00007f92514c0242 in __assert_fail () from /lib64/libc.so.6#4 0x0000000000a03319 in uv__close_nocheckstdio (fd=-24) at ../deps/uv/src/unix/core.c:556#5 0x00000000013cd271 in uv__close_nocheckstdio (fd=fd@entry=-24) at ../deps/uv/src/unix/core.c:563#6 0x00000000013de2f7 in uv__read_proc_meminfo (what=what@entry=0x20be946 "MemTotal:")
at ../deps/uv/src/unix/linux-core.c:1016#7 0x00000000013df7f3 in uv_get_total_memory () at ../deps/uv/src/unix/linux-core.c:1043#8 0x0000000000a0dc05 in node::SetIsolateCreateParamsForNode(v8::Isolate::CreateParams*) ()#9 0x0000000000b3a3e7 in node::worker::Worker::Run() ()#10 0x0000000000b3b930 in node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::{lambda(void*)#1}::_FUN(void*) ()#11 0x00007f9251866ea5 in start_thread () from /lib64/libpthread.so.0#12 0x00007f925158f8cd in clone () from /lib64/libc.so.6
this is the stack trace for the second assertion. Looks like the loop creation failed, but the worker creation sequence has progressed thus far, wrongly?
when we run out of descriptors, the error is -24, which is returned by uv_loop_init. the fd at the assertion site is also the same. Is it by chance? or do we fill the uv_loop_t with the error codes?
@gireeshpunathil No, #31621 is unrelated to that second failure, but libuv/libuv#2645 should have fixed that assertion (fd should not be negative anymore when being passed to uv__close_nocheckstdio). That was landed in 05d350a – is your local copy of Node up to date?
@addaleax - that is really promising! my copy does not have it; will check and confirm. [ since the recreate is consistent, the validation will be easy ]
Activity
gireeshpunathil commentedon Feb 2, 2020
In the assertion failure list, I see this too.
gireeshpunathil commentedon Feb 2, 2020
/cc @nodejs/libuv
bnoordhuis commentedon Feb 2, 2020
Does the process runs out of file descriptors? The first assertion is node's problem; it assumes that
uv_loop_init()never fails but it can.How did you trigger the second one? Can you get a backtrace?
gireeshpunathil commentedon Feb 2, 2020
@bnoordhuis - thanks! the first assertion has this backtrace; not able to obtain for the second one. Looks like it is always triggered by a worker thread, while the main thread is already processing the first assertion failure, because the second one occurs only when first one is present (this is my guess, no proof)
running out of file descriptors looks like a possibility; I will debug from that angle.
bnoordhuis commentedon Feb 3, 2020
If you turn on coredumps, you should be able to get a backtrace. You may need to select the right thread in gdb or just run
thread apply all backtrace.gireeshpunathil commentedon Feb 5, 2020
this is the stack trace for the second assertion. Looks like the loop creation failed, but the worker creation sequence has progressed thus far, wrongly?
when we run out of descriptors, the error is
-24, which is returned byuv_loop_init. thefdat the assertion site is also the same. Is it by chance? or do we fill theuv_loop_twith the error codes?gireeshpunathil commentedon Feb 5, 2020
On the other hand, in its current form, #31621 will address this one too?
addaleax commentedon Feb 5, 2020
@gireeshpunathil No, #31621 is unrelated to that second failure, but libuv/libuv#2645 should have fixed that assertion (
fdshould not be negative anymore when being passed touv__close_nocheckstdio). That was landed in 05d350a – is your local copy of Node up to date?gireeshpunathil commentedon Feb 5, 2020
@addaleax - that is really promising! my copy does not have it; will check and confirm. [ since the recreate is consistent, the validation will be easy ]
src,worker: runtime error on loop creation failure
worker: emit runtime error on loop creation failure
worker: emit runtime error on loop creation failure
worker: emit runtime error on loop creation failure
worker: emit runtime error on loop creation failure
worker: emit runtime error on loop creation failure