Closed
Bug 1470293
Opened 8 years ago
Closed 8 years ago
Long delay on trap in shell builds
Categories
(Core :: JavaScript Engine, defect, P5)
Tracking
()
RESOLVED
INVALID
| Tracking | Status | |
|---|---|---|
| firefox62 | --- | fix-optional |
People
(Reporter: mgaudet, Unassigned)
Details
When the jsshell hits a trap (either masm.breakpoint(), or a segfault) on OS/X, I'm experiencing a large delay before the process actually exits:
For example, I've been debugging something, and so I inject masm.breakpoint(). TO make sure I hit it, I run a test case, and and sure enough, masm.breakpoint() hits.
There's then a ~10-30 second delay before it outputs "Trace/BPT trap: 5" as expected.
No idea why this is happening. Seems to be OS/X only. Happens in both debug and opt builds.
But if I just build a boring C program that segafults, I do not see this behaviour.
Darwin Matthews-MacBook-Pro.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64
Sampling the process while it's en-route to dying, I've seen a couple of interesting candidates:
* MachExceptionHandlerThread
* js::MachExceptionHandler
| Reporter | ||
Updated•8 years ago
|
Priority: -- → P4
Comment 1•8 years ago
|
||
Is that a recent regression?
My guess would be that the system might catch it and wait for a debugger to be attached.
Do you see the same slow down while running the same program under a debugger? Does the trap stops the debugger immediately?
Priority: P4 → P5
| Reporter | ||
Comment 2•8 years ago
|
||
(In reply to Nicolas B. Pierron [:nbp] {backlog: 39} from comment #1)
> Is that a recent regression?
It feels worse in the last couple months, but overall, I'd say no. I'm putting a todo item to build an old revision, and see what happens there.
> My guess would be that the system might catch it and wait for a debugger to
> be attached.
> Do you see the same slow down while running the same program under a
> debugger? Does the trap stops the debugger immediately?
Traps hit the debugger very quickly yes.
| Reporter | ||
Comment 3•8 years ago
|
||
Interesting!
I think this might be a Visual Studio Code issue!
I just tried matching the environment inside and outside VS Code, and found the same failures happen instantaneously inside Terminal.app that take 3-5 seconds to resolve inside VSCode!
I'll report a bug there. Closing this as invalid for now.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•