Closed
Bug 1362239
Opened 7 years ago
Closed 6 years ago
asm.js interrupt callback failing on try server with tsan enabled
Categories
(Core :: JavaScript Engine: JIT, defect, P3)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: sfink, Unassigned)
References
Details
(Keywords: triage-deferred)
I've been trying to get tsan working on try. I'm running into a problem where the shell watchdog timer is unable to stop script execution, eventually causing the test runner to kill the process instead. On my local machine, it appears to work fine. Example test case: jit-tests/tests/asm.js/testTimeout1.js CancelExecution gets invoked. If I switch it to do an infinite loop in regular JS instead of asmjs, it works. I am running with no environment variables set. If I run with asmjs but force ProcessHasSignalHandlers() to return false, it works. Otherwise, InterruptRunningJitCode gets invoked but cx->startHandlingJitInterrupt() fails.
Reporter | ||
Comment 1•7 years ago
|
||
When looking at it with strace, it appears that SIGVTALRM is sent properly, the recipient thread gets it, but just does a sigreturn without doing anything. When searching on the web, it appears that tsan hooks sigaction, but tries to pass it through appropriately. I don't really follow everything that's going on, but I'm guessing something goes wrong there. Is it still valid to disable signal handlers? If I made ProcessHasSignalHandlers return false #ifdef MOZ_TSAN, would it break stuff? It does seem a little unfortunate, since tsan might be useful in finding bugs in signal-handler-using code. For now, I'll probably list out all of these timeout tests and skip them.
Comment 2•7 years ago
|
||
(In reply to Steve Fink [:sfink] [:s:] from comment #1) > Is it still valid to disable signal handlers? If I made > ProcessHasSignalHandlers return false #ifdef MOZ_TSAN, would it break stuff? It would entirely disable asm.js/wasm, so I think we should try to keep this: http://searchfox.org/mozilla-central/source/js/src/wasm/WasmJS.cpp#65-66 That being said, I don't have any ideas why this doesn't properly work.
Reporter | ||
Comment 3•7 years ago
|
||
(In reply to Benjamin Bouvier [:bbouvier] from comment #2) > (In reply to Steve Fink [:sfink] [:s:] from comment #1) > > Is it still valid to disable signal handlers? If I made > > ProcessHasSignalHandlers return false #ifdef MOZ_TSAN, would it break stuff? > > It would entirely disable asm.js/wasm, so I think we should try to keep > this: > http://searchfox.org/mozilla-central/source/js/src/wasm/WasmJS.cpp#65-66 Oh, darn. I was hoping that since Windows returns false sometimes, that some sort of fallback mechanism was still used. > That being said, I don't have any ideas why this doesn't properly work. I'm still guessing it's something about the way TSAN hooks into signal handling, but I don't know what's different about my development desktop where it works. For now, I think I'll figure out the least-effort way to disable wasm for the tsan job.
Updated•7 years ago
|
Keywords: triage-deferred
Priority: -- → P3
Comment 4•6 years ago
|
||
This works fine now. Maybe because we stopped using signal handlers to interrupt running asm.js/wasm/Ion code :)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•