-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Investigate flaky test-debug-port-from-cmdline #5368
Comments
@Trott Did it timed out? If so, I was about to report it. I have seen it in on
I hope it helps somehow |
@santigimeno Yes, it times out:
|
It looks like there's a deadlock on the child process. I'm getting this backtrace when the test times out:
|
Also, when running the test with node compiled with
|
This is a backtrace from the main thread of the child process with node compiled in debug mode, when the test fails:
|
So we have failures on fedora22 and centos5-64... |
Debian and OS X too, according to @santigimeno. Is this a deadlock in v8 or is the problem somewhere else? @nodejs/v8 |
Typically pthread_mutex_lock is not async-signal-safe, and could deadlock if interrupted with a signal handler that also calls pthread_mutex_lock (possibly only on the same mutex). From the stack traces shown, that might be what is occurring here. |
Could this message from @bnoordhuis be related to the issue? . He says:
|
Yes, seems that's it. |
What's the correct path forward here? Modify the test? Eliminate the test? Change the underlying implementation? Deprecate/eliminate a particular aspect of the feature? Something else? Difficult to determine? |
I've been thinking about that but I'm not sure. The best I've been able to come up with so far is using a semaphore to wake up a watchdog thread from the signal handler (because |
Why would the signal handler for mutex lock attempt to issue a debug break? |
@hashseed I'm not sure I understand the question. We call |
Let me see if I understand the backtrace correctly:
I suspect that it used to work in older V8 because we did not grab the mutex, but should have. One solution I can think of is to introduce an API to probe the mutex to see whether it can be acquired. If not, the embedder needs to reschedule the signal. |
Here it is being flaky for the Linux fips build too: https://ci.nodejs.org/job/node-test-commit-linux-fips/1368/nodes=ubuntu1404-64/console |
Failure on ppcle-ubuntu1404: https://ci.nodejs.org/job/node-test-commit-plinux/2132/nodes=ppcle-ubuntu1404/console |
Failure on armv7-wheezy: https://ci.nodejs.org/job/node-test-commit-arm/3087/nodes=armv7-wheezy/tapTestReport/test.tap-182/ |
Calling v8::Debug::DebugBreak() directly from the signal handler is unsafe because said function tries to grab a mutex. Work around that by starting a watchdog thread that is woken up from the signal handler, which then calls v8::Debug::DebugBreak(). Using a watchdog thread also removes the need to use atomic operations so this commit does away with that. Fixes: nodejs#5368 PR-URL: nodejs#5904 Reviewed-By: Anna Henningsen <[email protected]>
Calling v8::Debug::DebugBreak() directly from the signal handler is unsafe because said function tries to grab a mutex. Work around that by starting a watchdog thread that is woken up from the signal handler, which then calls v8::Debug::DebugBreak(). Using a watchdog thread also removes the need to use atomic operations so this commit does away with that. Fixes: #5368 PR-URL: #5904 Reviewed-By: Anna Henningsen <[email protected]>
Calling v8::Debug::DebugBreak() directly from the signal handler is unsafe because said function tries to grab a mutex. Work around that by starting a watchdog thread that is woken up from the signal handler, which then calls v8::Debug::DebugBreak(). Using a watchdog thread also removes the need to use atomic operations so this commit does away with that. Fixes: nodejs#5368 PR-URL: nodejs#5904 Reviewed-By: Anna Henningsen <[email protected]>
Calling v8::Debug::DebugBreak() directly from the signal handler is unsafe because said function tries to grab a mutex. Work around that by starting a watchdog thread that is woken up from the signal handler, which then calls v8::Debug::DebugBreak(). Using a watchdog thread also removes the need to use atomic operations so this commit does away with that. Fixes: #5368 PR-URL: #5904 Reviewed-By: Anna Henningsen <[email protected]>
Calling v8::Debug::DebugBreak() directly from the signal handler is unsafe because said function tries to grab a mutex. Work around that by starting a watchdog thread that is woken up from the signal handler, which then calls v8::Debug::DebugBreak(). Using a watchdog thread also removes the need to use atomic operations so this commit does away with that. Fixes: #5368 PR-URL: #5904 Reviewed-By: Anna Henningsen <[email protected]>
Calling v8::Debug::DebugBreak() directly from the signal handler is unsafe because said function tries to grab a mutex. Work around that by starting a watchdog thread that is woken up from the signal handler, which then calls v8::Debug::DebugBreak(). Using a watchdog thread also removes the need to use atomic operations so this commit does away with that. Fixes: #5368 PR-URL: #5904 Reviewed-By: Anna Henningsen <[email protected]>
Calling v8::Debug::DebugBreak() directly from the signal handler is unsafe because said function tries to grab a mutex. Work around that by starting a watchdog thread that is woken up from the signal handler, which then calls v8::Debug::DebugBreak(). Using a watchdog thread also removes the need to use atomic operations so this commit does away with that. Fixes: #5368 PR-URL: #5904 Reviewed-By: Anna Henningsen <[email protected]>
Example failure:
/cc the short list of folks who have touched the test in the last year or so, no reason to think they're responsible, but you know, gotta start somewhere... @misterdjules @joaocgreis @bnoordhuis
The text was updated successfully, but these errors were encountered: