Assertion `data > hole' failed to hold
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Description
I now have a program that needs to use shared memory to interact, but the current situation is that when I use rr to start this program, it will report an error. I don't know how to handle this. Maybe it's the same as https://github.com/rr-debugger/rr/issues/2911, but I can't work properly here. The log is as follows:
[INFO log_pending_events()] SYSCALL: mmap
[INFO log_pending_events()] (none)
[RecordSession] EXEC_SYSCALL_DONE: status=0x857f (SYSCALL)
[RecordSession] original_syscallno:9 (mmap); return val:0x79fe62a6f000
[record_syscall] 2962912: processing: SYSCALL: mmap -- time: 264
[AddressSpace] mmap(0x79fe62a6f000, 30586507264, 0x3, 0x1, 0)
[AddressSpace] munmap(0x79fe62a6f000, 30586507264)
[AddressSpace] mapping at 0x7a0581c00000 out of range, done.
[AddressSpace] mapping 0x79fe62a6f000-0x7a0581c00000 rw-s 00000000 00:1c 16 /dev/shm/zc_dtm_mfile
[AddressSpace] no mappings to coalesce
[util] copying file on tmpfs
[FATAL src/record_syscall.cc:6082:find_holes()]
(task 2962912 (rec:2962912) at time 264)
-> Assertion `data > hole' failed to hold. Found data at 2067177472 which should be after hole 2067177472; file end 30586504768, data offset 2067177472
[INFO log_pending_events()] SYSCALL: mmap
[INFO log_pending_events()] (none)
Tail of trace dump:
{
real_time:56990.366748 global_time:244, event:`SYSCALL: perf_event_open' (state:ENTERING_SYSCALL) tid:2962912, ticks:44010
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0xffffffffffffffff rsi:0x0 rdi:0x681ffe70 rbp:0x7ffe2cb499d0 rsp:0x681ffe20 r8:0x0 r9:0x0 r10:0xffffffffffffffff r11:0x246 r12:0x1 r13:0x681ffe70 r14:0x2d35e0 r15:0x7a0581eb5000 rip:0x70000005 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x12a fs_base:0x7a0581e45200 gs_base:0x0
}
{
real_time:56990.366865 global_time:245, event:`SYSCALL: perf_event_open' (state:EXITING_SYSCALL) tid:2962912, ticks:44010
rax:0x3 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0xffffffffffffffff rsi:0x0 rdi:0x681ffe70 rbp:0x7ffe2cb499d0 rsp:0x681ffe20 r8:0x0 r9:0x0 r10:0xffffffffffffffff r11:0x246 r12:0x1 r13:0x681ffe70 r14:0x2d35e0 r15:0x7a0581eb5000 rip:0x70000005 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x12a fs_base:0x7a0581e45200 gs_base:0x0
}
{
real_time:56990.366950 global_time:246, event:`SYSCALL: fcntl' (state:ENTERING_SYSCALL) tid:2962912, ticks:44011
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x64 rsi:0x406 rdi:0x3 rbp:0x3 rsp:0x681ffdc0 r8:0x0 r9:0x0 r10:0x0 r11:0x246 r12:0x1 r13:0x681ffe70 r14:0x2d35e0 r15:0x7a0581eb5000 rip:0x70000005 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x48 fs_base:0x7a0581e45200 gs_base:0x0
}
{
real_time:56990.367038 global_time:247, event:`SYSCALL: fcntl' (state:EXITING_SYSCALL) tid:2962912, ticks:44011
rax:0x64 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x64 rsi:0x406 rdi:0x3 rbp:0x3 rsp:0x681ffdc0 r8:0x0 r9:0x0 r10:0x0 r11:0x246 r12:0x1 r13:0x681ffe70 r14:0x2d35e0 r15:0x7a0581eb5000 rip:0x70000005 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x48 fs_base:0x7a0581e45200 gs_base:0x0
{ tid:2962912, addr:0x7a0581e6e5ec, length:0x1 }
}
{
real_time:56990.367120 global_time:248, event:`SYSCALL: rrcall_init_buffers' (state:ENTERING_SYSCALL) tid:2962912, ticks:44016
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x0 rsi:0x0 rdi:0x681ffe70 rbp:0x3 rsp:0x681ffe20 r8:0x0 r9:0x0 r10:0x0 r11:0x246 r12:0x64 r13:0x681ffe70 r14:0x2d35e0 r15:0x7a0581eb5000 rip:0x70000005 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x3e9 fs_base:0x7a0581e45200 gs_base:0x0
}
{
real_time:56990.367768 global_time:249, event:`SYSCALL: rrcall_init_buffers' (state:EXITING_SYSCALL) tid:2962912, ticks:44016
rax:0x70004000 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x0 rsi:0x0 rdi:0x681ffe70 rbp:0x3 rsp:0x681ffe20 r8:0x0 r9:0x0 r10:0x0 r11:0x246 r12:0x64 r13:0x681ffe70 r14:0x2d35e0 r15:0x7a0581eb5000 rip:0x70000005 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x3e9 fs_base:0x7a0581e45200 gs_base:0x0
{ map_file:"<ZERO>", addr:0x70004000, length:0x100000, prot_flags:"rw-s", file_offset:0x0, device:64512, inode:15859824, data_file:"", data_offset:0x0, file_size:0x100000 }
{ tid:2962912, addr:0x7a0581e6e5ec, length:0x1 }
{ tid:2962912, addr:0x681ffe70, length:0x20 }
}
{
real_time:56990.368048 global_time:250, event:`SYSCALLBUF_FLUSH' tid:2962912, ticks:44178
{ syscall:'gettimeofday', ret:0x0, size:0x20 }
}
{
real_time:56990.368244 global_time:251, event:`PATCH_SYSCALL' tid:2962912, ticks:44178
rax:0x1 rbx:0x11 rcx:0xffffffffffffffff rdx:0x11 rsi:0x7ffe2cb49830 rdi:0x2 rbp:0x7ffe2cb49730 rsp:0x7ffe2cb49708 r8:0x75 r9:0x0 r10:0x0 r11:0x246 r12:0x11 r13:0x7ffe2cb49830 r14:0x7a0581e044e0 r15:0x11 rip:0x7a0581d1c572 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7a0581e45200 gs_base:0x0
{ map_file:"<ZERO>", addr:0x7a0581e13000, length:0x1000, prot_flags:"r-xp", file_offset:0x0, device:0, inode:0, data_file:"", data_offset:0x0, file_size:0x1000 }
{ tid:2962912, addr:0x7a0581e13000, length:0x5e }
{ tid:2962912, addr:0x7a0581d1c572, length:0x8 }
}
{
real_time:56990.368253 global_time:252, event:`SYSCALLBUF_RESET' tid:2962912, ticks:44178
}
{
real_time:56990.368370 global_time:253, event:`SYSCALL: write' (state:ENTERING_SYSCALL) tid:2962912, ticks:44196
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x11 rsi:0x7ffe2cb49830 rdi:0x2 rbp:0x681fffa0 rsp:0x681ffd40 r8:0x75 r9:0x0 r10:0x0 r11:0x246 r12:0x7ffe2cb49830 r13:0x11 r14:0x0 r15:0x11 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x1 fs_base:0x7a0581e45200 gs_base:0x0
}
{
real_time:56990.368471 global_time:254, event:`SYSCALL: write' (state:EXITING_SYSCALL) tid:2962912, ticks:44196
rax:0x11 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x11 rsi:0x7ffe2cb49830 rdi:0x2 rbp:0x681fffa0 rsp:0x681ffd40 r8:0x75 r9:0x0 r10:0x0 r11:0x246 r12:0x7ffe2cb49830 r13:0x11 r14:0x0 r15:0x11 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x1 fs_base:0x7a0581e45200 gs_base:0x0
}
{
real_time:56990.368616 global_time:255, event:`SYSCALL: write' (state:ENTERING_SYSCALL) tid:2962912, ticks:44406
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x42 rsi:0x7ffe2cb49830 rdi:0x2 rbp:0x681fffa0 rsp:0x681ffd40 r8:0x64 r9:0x0 r10:0x0 r11:0x246 r12:0x7ffe2cb49830 r13:0x42 r14:0x0 r15:0x42 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x1 fs_base:0x7a0581e45200 gs_base:0x0
}
{
real_time:56990.368756 global_time:256, event:`SYSCALL: write' (state:EXITING_SYSCALL) tid:2962912, ticks:44406
rax:0x42 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x42 rsi:0x7ffe2cb49830 rdi:0x2 rbp:0x681fffa0 rsp:0x681ffd40 r8:0x64 r9:0x0 r10:0x0 r11:0x246 r12:0x7ffe2cb49830 r13:0x42 r14:0x0 r15:0x42 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x1 fs_base:0x7a0581e45200 gs_base:0x0
}
{
real_time:56990.368878 global_time:257, event:`SYSCALL: write' (state:ENTERING_SYSCALL) tid:2962912, ticks:44667
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x22 rsi:0x7ffe2cb49830 rdi:0x2 rbp:0x681fffa0 rsp:0x681ffd40 r8:0x75 r9:0x0 r10:0x0 r11:0x246 r12:0x7ffe2cb49830 r13:0x22 r14:0x0 r15:0x22 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x1 fs_base:0x7a0581e45200 gs_base:0x0
}
{
real_time:56990.369070 global_time:258, event:`SYSCALL: write' (state:EXITING_SYSCALL) tid:2962912, ticks:44667
rax:0x22 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x22 rsi:0x7ffe2cb49830 rdi:0x2 rbp:0x681fffa0 rsp:0x681ffd40 r8:0x75 r9:0x0 r10:0x0 r11:0x246 r12:0x7ffe2cb49830 r13:0x22 r14:0x0 r15:0x22 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x1 fs_base:0x7a0581e45200 gs_base:0x0
}
{
real_time:56990.369292 global_time:259, event:`PATCH_SYSCALL' tid:2962912, ticks:44720
rax:0x101 rbx:0xa0002 rcx:0xffffffffffffffff rdx:0xa0002 rsi:0x7ffe2cb49850 rdi:0xffffff9c rbp:0x7ffe2cb49840 rsp:0x7ffe2cb497f0 r8:0x22 r9:0x0 r10:0x0 r11:0x246 r12:0x1ff r13:0x7ffe2cb49850 r14:0x62239c459aa8 r15:0x7a0581eb5000 rip:0x7a0581d1c8b2 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7a0581e45200 gs_base:0x0
{ tid:2962912, addr:0x7a0581e1305e, length:0x5e }
{ tid:2962912, addr:0x7a0581d1c8b2, length:0x8 }
}
{
real_time:56990.369404 global_time:260, event:`SYSCALL: openat' (state:ENTERING_SYSCALL) tid:2962912, ticks:44736
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0xa0002 rsi:0x7ffe2cb49850 rdi:0xffffff9c rbp:0x681fffa0 rsp:0x681ffd40 r8:0x22 r9:0x0 r10:0x0 r11:0x246 r12:0x7ffe2cb49850 r13:0x7ffe2cb49850 r14:0x62239c459aa8 r15:0xa0002 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x101 fs_base:0x7a0581e45200 gs_base:0x0
}
{
real_time:56990.369536 global_time:261, event:`SYSCALL: openat' (state:EXITING_SYSCALL) tid:2962912, ticks:44736
rax:0x3 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0xa0002 rsi:0x7ffe2cb49850 rdi:0xffffff9c rbp:0x681fffa0 rsp:0x681ffd40 r8:0x22 r9:0x0 r10:0x0 r11:0x246 r12:0x7ffe2cb49850 r13:0x7ffe2cb49850 r14:0x62239c459aa8 r15:0xa0002 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x101 fs_base:0x7a0581e45200 gs_base:0x0
}
{
real_time:56990.369710 global_time:262, event:`PATCH_SYSCALL' tid:2962912, ticks:44747
rax:0x9 rbx:0x0 rcx:0xffffffffffffffff rdx:0x3 rsi:0x71f190640 rdi:0x0 rbp:0x7ffe2cb49990 rsp:0x7ffe2cb49980 r8:0x3 r9:0x0 r10:0x1 r11:0x246 r12:0x1 r13:0x0 r14:0x62239c459aa8 r15:0x7a0581eb5000 rip:0x7a0581d2531a eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7a0581e45200 gs_base:0x0
{ tid:2962912, addr:0x7a0581e130bc, length:0x5e }
{ tid:2962912, addr:0x7a0581d2531a, length:0x8 }
}
{
real_time:56990.369845 global_time:263, event:`SYSCALL: mmap' (state:ENTERING_SYSCALL) tid:2962912, ticks:44756
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x3 rsi:0x71f190640 rdi:0x0 rbp:0x681fffa0 rsp:0x681ffd40 r8:0x3 r9:0x0 r10:0x1 r11:0x246 r12:0x1 r13:0x0 r14:0x62239c459aa8 r15:0x7a0581eb5000 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x9 fs_base:0x7a0581e45200 gs_base:0x0
}
[FATAL src/log.cc:512:start_emergency_debug()] (session doesn't look interactive, aborting emergency debugging)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at find_holes() in src/record_syscall.cc around line 6082 and the emergency-debugging path in src/log.cc around line 512. Reproduce the reported shared-memory mmap failure involving /dev/shm and inspect why the assertion is reached. Done means rr handles this trace without aborting at the reported assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100