rr-debugger / rr

Record and Replay Framework
http://rr-project.org/
Other
9.18k stars 585 forks source link

record assertion: Assertion `!registers_dirty' failed to hold. Registers shouldn't already be dirty #2337

Open hotsphink opened 5 years ago

hotsphink commented 5 years ago

Binary is at https://gist.github.com/hotsphink/a0a3f6fbc41771796bcc36734add3e7d though it's probably easier to git clone https://gist.github.com/a0a3f6fbc41771796bcc36734add3e7d.git

xz -d the js binary, then run on the included sample file.

[FATAL /home/sfink/src/rr/src/Task.cc:1533:did_waitpid() errno: EDOM] 
 (task 3766 (rec:3766) at time 786)
 -> Assertion `!registers_dirty' failed to hold. Registers shouldn't already be dirty
Tail of trace dump:
{
  real_time:2049315.697408 global_time:766, event:`SYSCALLBUF_FLUSH' tid:3767, ticks:5294
  { syscall:'futex', ret:0x0, size:0x14 }
}
{
  real_time:2049315.697417 global_time:767, event:`SYSCALL: futex' (state:ENTERING_SYSCALL) tid:3767, ticks:5294
rax:0xffffffffffffffda rbx:0x7fcab6c01fa0 rcx:0xffffffffffffffff rdx:0x0 rsi:0x80 rdi:0x7fcab7207754 rbp:0xca rsp:0x7fcab6c01e10 r8:0x0 r9:0x7fcab7207718 r10:0x0 r11:0x246 r12:0x7fcab72076c0 r13:0x1 r14:0x0 r15:0x7fcab7207754 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xca fs_base:0x7fcab6e00700 gs_base:0x0
}
{
  real_time:2049315.697423 global_time:768, event:`SYSCALLBUF_RESET' tid:3767, ticks:5294
}
{
  real_time:2049315.697467 global_time:769, event:`SYSCALL: futex' (state:EXITING_SYSCALL) tid:3764, ticks:82023015
rax:0xfffffffffffffff5 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x0 rsi:0x80 rdi:0x7fcab7207720 rbp:0xca rsp:0x681ffe10 r8:0x0 r9:0x7fff0f813f00 r10:0x0 r11:0x246 r12:0x7fcab72076c0 r13:0x1 r14:0x0 r15:0x7fcab7207720 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xca fs_base:0x7fcac4e06180 gs_base:0x0
}
hotsphink commented 5 years ago

Works with rr record -n.

rocallahan commented 5 years ago

Works for me on master.

[roc@localhost a0a3f6fbc41771796bcc36734add3e7d]$ rr record ./js sample.js 
rr: Saving execution to trace directory `/home/roc/.local/share/rr/js-1'.
Assertion failure: isIncremental, at /home/sfink/src/mozilla/js/src/gc/GC.cpp:6977
Segmentation fault
[roc@localhost a0a3f6fbc41771796bcc36734add3e7d]$ rr replay -a
Assertion failure: isIncremental, at /home/sfink/src/mozilla/js/src/gc/GC.cpp:6977
[roc@localhost a0a3f6fbc41771796bcc36734add3e7d]$ 
rocallahan commented 5 years ago

Shouldn't be too hard for you to debug I think. Try logging where registers are getting dirtied and undirtied.