Hang Detector and Reporter:/Test Plan: Difference between revisions

 
(9 intermediate revisions by the same user not shown)
Line 17: Line 17:


== Summary ==
== Summary ==
* Similar to how Mozilla collects crash data, this new capability will allow Mozilla to collect, analyze, and fix browser hangs.
* The Hang Reporter feature - reports transient main thread hangs to Telemetry.
* It relies on having Firefox compiled with frame pointers to unwind call stacks and because of this it is only useful on Windows builds from the Profiling branch.
* The Hang Reporter functionality is #ifdef'd out on regular release builds.
* It will not be enabled in release builds and the intended audience is Firefox developers.
 
'''Demo of the functionality:'''
The minimum steps to see a demo of the functionality is to set up the profiling Nightly and  the Symbolication Server locally.
 
How to set up the profiling Nightly:<br>
1. Install the profiling link from [https://people.mozilla.com/~vdjeric/firefox-14.0a1.en-US.win32.installer.exe here]<br>
2. Go to Help menu -> Options -> Advanced -> Update -> enable the option to 'Never check for updates' -> OK<br>
3. Go to Help menu -> Options -> Advanced -> General -> enable the option to 'Submit performance data'.<br>
4. Install the custom [https://people.mozilla.com/~vdjeric/ping.telemetry.xpi about:telemetry add-on]<br>
 
How to set up the Symbolication Server:<br>
Prerequisites:<br>
Install [http://code.google.com/p/msysgit/, Git for Windows] or Cygwin and [http://www.activestate.com/activepython/downloads, Python] or Cygwin.
 
5. Download some of the symbols for Nightly profiling build by extracting the [https://people.mozilla.com/~vdjeric/symbols_ffx.zip, zip] locally.<br>
6. Run “git clone git://github.com/vdjeric/Snappy-Symbolication-Server.git” in Windows command line.<br>
7. Edit the Snappy Symbolication Server’s “sample.conf” file:<br>
* the firefoxSymbolsPath and the osSymbolsPath have to point to the “symbols_ffx” directory downloaded in step 5.<br>
8.  Run the symbolication server locally with the command “python symbolicationWebService.py sample.conf”.<br>
9. To see the hang stacks go to your profiling Nightly -> in about config enable the pref toolkit.telemetry.enabled to true -> navigate to about:telemetry page -> click on 'Force Hang' button -> reload the page and click on the 'Symbolicate Stacks' button.<br>
 
The stack should look like this:
 
<tt><u>'''Hang report #1 (18 seconds):'''<br/></u>
??? (in ntdll.dll)<br>
PRMJ_Now (in mozjs.dll)<br>
js_Date(JSContext *,unsigned int,JS::Value *) (in mozjs.dll)<br>
???<br>
???<br></tt>
 
Note that:
* the minimum interval for capturing a hang is 10 seconds;
* the value of the hang can be changed in about:config via the preference hangmonitor.timeout;
 
== References ==
== References ==


*[https://wiki.mozilla.org/Hang_Detector_and_Reporter: Wiki page]
*[https://wiki.mozilla.org/Hang_Detector_and_Reporter: Wiki page]
*[http://blog.mozilla.com/vdjeric/ blog mozilla.com]


== Use Cases ==
== Use Cases ==


* TBD
* Check the hang stacks:
** having the telemetry disabled or the hangmonitor.timeout pref set to zero;
** having the telemetry enabled or the hangmonitor.timeout pref set to zero;
** having the telemetry disabled or the hangmonitor.timeout pref set to non-zero;
** having the telemetry enabled or the hangmonitor.timeout pref set to non-zero;


== Test Cases ==
== Test Cases ==

Latest revision as of 13:28, 6 April 2012

Hang Detector and Reporter

Feature Status Lead engineer QA Lead Status
Hang Detector and Reporter Development in progress Vladan Djeric Simona Badau OK

Summary

  • The Hang Reporter feature - reports transient main thread hangs to Telemetry.
  • It relies on having Firefox compiled with frame pointers to unwind call stacks and because of this it is only useful on Windows builds from the Profiling branch.
  • The Hang Reporter functionality is #ifdef'd out on regular release builds.
  • It will not be enabled in release builds and the intended audience is Firefox developers.

Demo of the functionality: The minimum steps to see a demo of the functionality is to set up the profiling Nightly and the Symbolication Server locally.

How to set up the profiling Nightly:
1. Install the profiling link from here
2. Go to Help menu -> Options -> Advanced -> Update -> enable the option to 'Never check for updates' -> OK
3. Go to Help menu -> Options -> Advanced -> General -> enable the option to 'Submit performance data'.
4. Install the custom about:telemetry add-on

How to set up the Symbolication Server:
Prerequisites:
Install Git for Windows or Cygwin and Python or Cygwin.

5. Download some of the symbols for Nightly profiling build by extracting the zip locally.
6. Run “git clone git://github.com/vdjeric/Snappy-Symbolication-Server.git” in Windows command line.
7. Edit the Snappy Symbolication Server’s “sample.conf” file:

  • the firefoxSymbolsPath and the osSymbolsPath have to point to the “symbols_ffx” directory downloaded in step 5.

8. Run the symbolication server locally with the command “python symbolicationWebService.py sample.conf”.
9. To see the hang stacks go to your profiling Nightly -> in about config enable the pref toolkit.telemetry.enabled to true -> navigate to about:telemetry page -> click on 'Force Hang' button -> reload the page and click on the 'Symbolicate Stacks' button.

The stack should look like this:

Hang report #1 (18 seconds):
??? (in ntdll.dll)
PRMJ_Now (in mozjs.dll)
js_Date(JSContext *,unsigned int,JS::Value *) (in mozjs.dll)
???
???

Note that:

  • the minimum interval for capturing a hang is 10 seconds;
  • the value of the hang can be changed in about:config via the preference hangmonitor.timeout;

References

Use Cases

  • Check the hang stacks:
    • having the telemetry disabled or the hangmonitor.timeout pref set to zero;
    • having the telemetry enabled or the hangmonitor.timeout pref set to zero;
    • having the telemetry disabled or the hangmonitor.timeout pref set to non-zero;
    • having the telemetry enabled or the hangmonitor.timeout pref set to non-zero;

Test Cases

  • The test cases for this feature can be viewed here.

Important Bugs

  • 712109 - Implement non-fatal chromehang by turning on frame-pointers on a branch

Not Tested

  • TBD

Sign off Criteria

  • All the test cases were executed.
  • All the major bugs have been fixed.