rr-debugger / rr-debugger/rr

Could not insert hardware watchpoint

Open
#4,001 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.7k
Forks
662
Avg merge
2d 3h
Merged PRs (30d)
2

Description

Sorry in advance if this isn't a bug.

Error message

When using one hardware breakpoint to watch a variable the following error occurs:

(rr) next
Warning:
Could not insert hardware watchpoint 3.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.

Command aborted.

This continues even when deleting old breakpoints.

Steps to reproduce

(rr) b <some_func>
(rr) c
(rr) b <some_line>
(rr) c
(rr) watch <some_var>
(rr) c
Warning:
Could not insert hardware watchpoint 3.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.

Command aborted.
(rr) info breakpoints
Num     Type           Disp Enb
1       breakpoint     keep y                      <some_func>
	breakpoint already hit 1 time
2       breakpoint     keep y                      <some_line>
	breakpoint already hit 1 time
3       hw watchpoint  keep y                      <some_var>
(rr) del 1 2
(rr) c
Warning:
Could not insert hardware watchpoint 3.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.

Command aborted.

In GDB, this same arrangement works, even without trying to delete old breakpoints.

System Info

$ uname -a
Linux <hostname> 6.15.8-zen1-2-zen #1 ZEN SMP PREEMPT_DYNAMIC <date> x86_64 GNU/Linux
$ lscpu
Architecture:                x86_64
  CPU op-mode(s):            32-bit, 64-bit
  Address sizes:             39 bits physical, 48 bits virtual
  Byte Order:                Little Endian
CPU(s):                      8
  On-line CPU(s) list:       0-7
Vendor ID:                   GenuineIntel
  Model name:                Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz
    CPU family:              6
    Model:                   60
    Thread(s) per core:      2
    Core(s) per socket:      4
    Socket(s):               1
...
    Flags:                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology non
                             stop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_f
                             ault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts vnmi md_clear flush_l1d
Virtualization features:     
  Virtualization:            VT-x
Caches (sum of all):         
  L1d:                       128 KiB (4 instances)
  L1i:                       128 KiB (4 instances)
  L2:                        1 MiB (4 instances)
  L3:                        6 MiB (1 instance)
NUMA:                        
  NUMA node(s):              1
  NUMA node0 CPU(s):         0-7
Vulnerabilities:
...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source files, tests, or entry points. Start by reproducing the breakpoint and watchpoint sequence in rr, then compare its behavior with GDB and inspect the hardware breakpoint handling. Done means the remaining watchpoint can be inserted after the earlier breakpoints are deleted, without the command being aborted.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.