DragonFlyBSD / DPorts

The dedicated application build system for DragonFly BSD
Other
89 stars 44 forks source link

www/node seems to hang randomly #191

Closed mneumann closed 7 years ago

mneumann commented 7 years ago
node --version # v7.9.0

When I start node, the first time, it works. The second time it will just hang infinitively without showing the javascript prompt. The following times it won't work as well.

If someone confirm this problem, we can take a closer look at the origin of the problem. I am running a very recent 4.9:

uname -a
DragonFly babel.localnet 4.9-DEVELOPMENT DragonFly v4.9.0.339.gf23af-DEVELOPMENT #53: Sun Jun 25 19:16:29 CEST 2017     mneumann@babel.localnet:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64
legitparty commented 7 years ago

I had similar issues. Trying to run statsd master, I could only get it to work by passing --inspect-brk to the node command, and opening the URL in chrome, and pressing continue. It would always hang immediately.

legitparty commented 7 years ago

The ktrace is interesting. Note that during the umtx_sleep(), the system usage spikes to 100%.

ktrace.zip

legitparty commented 7 years ago

Text dump from kdump ktrace.txt

legitparty commented 7 years ago
#0  0x0000000801e2a3b8 in _umtx_sleep_err () from /usr/lib/libpthread.so.0
#1  0x0000000801e2a25a in _thr_umtx_wait () from /usr/lib/libpthread.so.0
#2  0x0000000801e2706c in ?? () from /usr/lib/libpthread.so.0
#3  0x0000000801e27471 in _pthread_cond_wait () from /usr/lib/libpthread.so.0
#4  0x0000000801e26aa6 in ?? () from /usr/lib/libpthread.so.0
#5  0x0000000801e26d38 in pthread_rwlock_wrlock () from /usr/lib/libpthread.so.0
#6  0x0000000801e277a3 in ?? () from /usr/lib/libpthread.so.0
#7  0x000000080177fca8 in ?? () from /libexec/ld-elf.so.2
#8  0x000000080177cbcd in _rtld_allocate_tls () from /libexec/ld-elf.so.2
#9  0x0000000801e81c51 in _libc_allocate_tls () from /lib/libc.so.8
#10 0x0000000801e2a02a in _tcb_ctor () from /usr/lib/libpthread.so.0
#11 0x0000000801e29c46 in _thr_alloc () from /usr/lib/libpthread.so.0
#12 0x0000000801e23a8a in pthread_create () from /usr/lib/libpthread.so.0
#13 0x00000000011bd359 in v8::base::Thread::Start() ()
#14 0x000000000112e3bc in v8::platform::WorkerThread::WorkerThread(v8::platform::TaskQueue*) ()
#15 0x0000000001129fcb in v8::platform::DefaultPlatform::EnsureInitialized() ()
#16 0x000000000112a052 in v8::platform::CreateDefaultPlatform(int) ()
#17 0x00000000010adc97 in node::Start(int, char**) ()
#18 0x00000000007cbd2c in _start ()
mneumann commented 7 years ago

this commit should fix it

mneumann commented 7 years ago

fixed by that commit