Closed
Bug 832812
Opened 12 years ago
Closed 12 years ago
Profiler crashes in Box2D demo
Categories
(Core :: JavaScript Engine, defect, P2)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: azakai, Assigned: billm)
References
()
Details
(Keywords: crash)
Crash Data
Attachments
(1 file)
1.63 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
STR:
1. Load http://syntensity.com/static/box2d.html
2. Open console and click to start the profiler.
It consistently crashes,
https://crash-stats.mozilla.com/report/index/bp-e1e9e841-5ffb-44be-b0e4-1f1a62130121
https://crash-stats.mozilla.com/report/index/1775eb39-fbed-4a9b-b1d3-a2b2d2130121
Updated•12 years ago
|
Assignee: nobody → anton
Priority: -- → P2
Comment 1•12 years ago
|
||
On Windows: bp-82fed63c-7318-4864-8ede-66d262130121.
Severity: normal → critical
Crash Signature: [@ JSContext::malloc_(unsigned int)]
[@ js::Vector<wchar_t, int, js::ContextAllocPolicy>::convertToHeapStorage(unsigned int)]
Keywords: crash,
reproducible
OS: Linux → All
Hardware: x86 → All
Comment 2•12 years ago
|
||
I checked it with Gecko Profiler addon and couldn't reproduce the crash. So it seems to be specific either to some specific flags we use or, less likely, our profiler UI. Will be posting updates as I go.
![]() |
||
Comment 3•12 years ago
|
||
Which Firefox versions does this affect?
Reporter | ||
Comment 4•12 years ago
|
||
I saw the crash on nightly. I think the profiler is present only there?
Comment 5•12 years ago
|
||
Yes, current Nightly. Also, a couple of meetings ago we decided to pref the Profiler off for the upcoming release.
Curiously enough, I was playing with this bug yesterday and after some time it stopped being reproducible. Not sure what caused it.
Updated•12 years ago
|
Keywords: reproducible
Comment 6•12 years ago
|
||
I just hit this crash, didn't have the devtools profiler running, but I do have the profiler add-on installed and it now does periodic updates to the server as I understand it.
Comment 7•12 years ago
|
||
As far as the JS engine is concerned the profiler add-on or the devtools profiler are identical. They both use a single toggle option.
Component: Developer Tools: Profiler → JavaScript Engine
Product: Firefox → Core
Comment 8•12 years ago
|
||
My crash report lead me to this bug. Yesterday Firefox would crash whenever I went to the mozilla.dev.platform Google group. On today's Nightly (just updated) it hasn't happened yet so far though.
Example report: https://crash-stats.mozilla.com/report/index/8e3f697c-077a-4093-b9ec-384c12130205
Comment 9•12 years ago
|
||
Nevermind that bit about today's Nightly, I just got it again:
https://crash-stats.mozilla.com/report/index/bp-b6721802-1df9-4c52-91ca-ce5fb2130206
I've turned the profiler addon off for now. So far so good.
Comment 10•12 years ago
|
||
1. Start fresh profile.
2. Install SPS profiler. Enable it.
3. Go to google groups.
4. Switch between "standard view" and "compact list view" 2-3 times.
5. Crash.
Updated•12 years ago
|
Assignee: anton → general
Comment 11•12 years ago
|
||
also occuring on the new Google's "enter web lab" demo. Enable the profiler on the initial load page. Nightly crashes.
https://crash-stats.mozilla.com/report/index/bp-56eba11f-6145-4ea0-a517-a72762130213
Comment 12•12 years ago
|
||
thanks for the additional failures. Stacks appear to be crashing in convertToHeapStorage around line 643.
http://mxr.mozilla.org/mozilla-central/source/js/public/Vector.h#643
Assignee | ||
Comment 13•12 years ago
|
||
This made me crash every time in google groups. The problem is that we're using a hashtable in the profiler data structure (strings) from within off-thread compilation. There hashtable is shared with the main thread, and there's no lock protecting it.
This patch disables off-thread compilation when profiling is enabled. The right way to do this would be to refactor the code to use a separate string table from the compilation thread. However, I don't know this code well and I'd rather just fix it immediately. (There's also a problem here if someone enables the profiler while we're doing off-thread compilation. Let's just pretend that doesn't happen.)
![]() |
||
Updated•12 years ago
|
Attachment #714184 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 14•12 years ago
|
||
Comment 15•12 years ago
|
||
(In reply to Bill McCloskey (:billm) from comment #13)
> This patch disables off-thread compilation when profiling is enabled.
What's the performance impact of that? There's already some overhead so keeping the profiling cost as low as possible lets us use the profiler as an 'always-on look for bad stuff' tools.
Assignee | ||
Comment 16•12 years ago
|
||
(In reply to Benoit Girard (:BenWa) from comment #15)
> (In reply to Bill McCloskey (:billm) from comment #13)
> > This patch disables off-thread compilation when profiling is enabled.
>
> What's the performance impact of that? There's already some overhead so
> keeping the profiling cost as low as possible lets us use the profiler as an
> 'always-on look for bad stuff' tools.
I think there's a modest performance cost. Maybe a few percent on SunSpider, and bigger losses for games that have tons of JS code.
I filed bug 841646 to fix it the right way.
Reporter | ||
Comment 17•12 years ago
|
||
(In reply to Bill McCloskey (:billm) from comment #16)
> (In reply to Benoit Girard (:BenWa) from comment #15)
> > (In reply to Bill McCloskey (:billm) from comment #13)
> > > This patch disables off-thread compilation when profiling is enabled.
> >
> > What's the performance impact of that? There's already some overhead so
> > keeping the profiling cost as low as possible lets us use the profiler as an
> > 'always-on look for bad stuff' tools.
>
> I think there's a modest performance cost. Maybe a few percent on SunSpider,
> and bigger losses for games that have tons of JS code.
>
A large potential issue is that the maximum script size for compilation is higher with off-thread compilation. Can we perhaps disable off-thread compilation when profiling but keep using the higher script size limit ? Compilation pauses during profiling are not terrible, and this way we would be profiling something closer to how the code normally runs.
Comment 18•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•