Skip to content

Could not insert hardware watchpoint #4001

Open

Description

@unsignedup

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:
...

Activity

  1. changed the title [-]Failed to insert hardware breakpoint[/-] [+]Could not insert hardware watchpoint[/+] on Aug 9, 2025
  2. unsignedup commented on Aug 9, 2025

    @unsignedup
    Author

    NOTE: If you need more information about my system check out my last issue: #3949

  3. GitMensch commented on Aug 19, 2025

    @GitMensch
    Contributor

    GDB tries to setup a hardware breakpoint and fails. The CPU has only a limited amount of data it can insert hardware watchpoints for.

    What do you try to watch?
    How do you currently record and replay?
    What version or RR do you use?

    Side-note: Sometimes it can help to only watch part of the result, so something like print <some_exp>, then watch *<result_pointer> / watch <result>[0] or similar.
    In any case I think that's no RR issue.

  4. rocallahan commented on Aug 23, 2025

    @rocallahan
    Collaborator

    Sorry about the delay...

    What version of rr was this? Have you tried with rr master? What's <some_var>?

    Can you provide a specific example program and a transcript of the error occurring with that program?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions