Closed
Bug 626437
Opened 15 years ago
Closed 15 years ago
New shark code only works once, then fails, then hangs
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: gal)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
690 bytes,
patch
|
bzbarsky
:
review+
pcwalton
:
feedback+
|
Details | Diff | Splinter Review |
BUILD: Current tip TM build
STEPS TO REPRODUCE:
1) Put the following in ~/test.js: "startProfiling(); stopProfiling();"
2) Start shark and put it in programmatic control mode
3) Build an optimized js shell with --enable-shark
4) Run |js ~/test.js|
5) Run |js ~/test.js|
6) Run |js ~/test.js|
(yes, do it three times).
EXPECTED RESULTS: 3 profiles generated
ACTUAL RESULTS: Step 4 generates a profile. Step 5 doesn't generate a profile. Step 6 hangs the shell; attaching a debugger shows this stack:
#0 0x00007fff846c82da in mach_msg_trap ()
#1 0x00007fff846c894d in mach_msg ()
#2 0x000000010018022b in Shark::Start ()
#3 0x0000000100104ce9 in js::Probes::startProfiling ()
#4 0x000000010003e961 in StartProfiling ()
This severely limits the usefulness of the new profiler hooks, unfortunately. :(
Assignee | ||
Comment 1•15 years ago
|
||
Patrick does this happen with your code too or did I break something?
Assignee | ||
Comment 2•15 years ago
|
||
(Patrick is not in today, we will look tomorrow.)
![]() |
Reporter | |
Comment 3•15 years ago
|
||
More data:
a) Step 2 in comment 0 needs to include setting the sampling interval to 20us.
If I leave it at 1ms, then shark gives an alert about no samples, and the js
shell hangs.
b) The hang from step 6 above and the hang from (a) above both stop if I quit
shark.
Assignee | ||
Comment 5•15 years ago
|
||
bz want to give this a spin?
Assignee | ||
Updated•15 years ago
|
Attachment #505537 -
Flags: review?(bzbarsky)
Comment 6•15 years ago
|
||
Comment on attachment 505537 [details] [diff] [review]
patch
Works for me.
Attachment #505537 -
Flags: feedback+
![]() |
Reporter | |
Comment 7•15 years ago
|
||
This fixes the steps in comment 0, but only with the 20us setting. If I use a sample interval large enough that there are no samples, then the shell still hangs waiting on shark. I'd tell you where it hangs, but trying to attach gdb to it hangs gdb....
Separate bug on that?
![]() |
Reporter | |
Comment 8•15 years ago
|
||
Comment on attachment 505537 [details] [diff] [review]
patch
r=me; the other issue is more likely a problem in the sharkctl stuff...
Attachment #505537 -
Flags: review?(bzbarsky) → review+
Comment 9•15 years ago
|
||
(In reply to comment #7)
> This fixes the steps in comment 0, but only with the 20us setting. If I use a
> sample interval large enough that there are no samples, then the shell still
> hangs waiting on shark. I'd tell you where it hangs, but trying to attach gdb
> to it hangs gdb....
>
> Separate bug on that?
Did this happen with the old CHUD stuff?
Assignee | ||
Comment 10•15 years ago
|
||
Whiteboard: fixed-in-tracemonkey
![]() |
Reporter | |
Comment 11•15 years ago
|
||
> Did this happen with the old CHUD stuff?
Not that I recall. I certainly recall getting that popup from Shark in some cases, but I never recall the browser freezing in the process.
Comment 12•15 years ago
|
||
(In reply to comment #11)
> > Did this happen with the old CHUD stuff?
>
> Not that I recall. I certainly recall getting that popup from Shark in some
> cases, but I never recall the browser freezing in the process.
Okay, if you could file a followup bug then that'd be awesome. If I had to guess I'd say that Shark is trying to send us an error code, but I haven't reverse engineered that part of the protocol yet, so we end up blocking on a Mach message that never arrives.
Comment 13•15 years ago
|
||
cdleary-bot mozilla-central merge info:
http://hg.mozilla.org/mozilla-central/rev/33313f209f4d
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
![]() |
Reporter | |
Comment 14•15 years ago
|
||
> Okay, if you could file a followup bug then that'd be awesome
Filed bug 628153
You need to log in
before you can comment on or make changes to this bug.
Description
•