We just released rr 1.2 and I think this would be a good time for people to
try to use it for one of the tasks it was designed for: debugging
intermittent test failures.

Consult http://rr-project.org for more information, but the gist is this:
you can use rr to record the execution of Firefox test suites (with 32-bit
Linux Firefox builds). If you see a test failure occur while recording with
rr, you will be able to replay that execution and use gdb to debug the
replay. The replay is exact, so the same failure will reoccur every time
you replay, and in exactly the same way, including addresses of objects
etc. This means that once you've recorded a test failure, it's just a
matter of time before you figure out the bug.

The steps to get started doing this are roughly as follows:
1) Install rr on a Westmere-or-later Linux system (or VM with performance
counters virtualized), build 32-bit Firefox (opt or debug) and verify that
recording Firefox works for you. If it doesn't, please file a github issue
or check https://github.com/mozilla/rr/issues/973 if your system is
Haswell-based.
2) (Optional) Enable chaos mode by editing mfbt/ChaosMode.h to return true
for isActive.
3) (Optional) Enable shuffling of mochitests and reftests (sorry, I have a
patch that needs to land for the latter).
4) Create a script somewhere called rr-record that does "exec ~/rr/bin/rr
record $*"
5) Run your testsuite using mach, and pass the options --debugger rr-record
6) If necessary, run step 5 in a loop until you see test failures you want
to fix, clearing out ~/.rr periodically so your disk doesn't fill.
7) Run "rr replay -a" to verify that the replay works. If it doesn't,
report an rr bug.
8) Run "rr replay" to debug with gdb. Consult the rr documentation for more
information about that.

cjones and I are usually around on #research if you have any issues with
rr, and we'd love to hear from you.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to