[Ltrace-devel] Infinite stream of breakpoint events
Petr Machata
pmachata at gmail.com
Mon Oct 26 19:04:09 UTC 2015
2015-07-25 0:14 GMT+02:00 Andreas Schwab <schwab at linux-m68k.org>:
> When running the attach-process-dlopen test on ppc64 or ppc64le ltrace
> is receiving an endless stream of breakpoint events:
>
> DEBUG: events.c:336: event: BREAKPOINT: pid=17899, addr=0x3fff88d28c04
>
> The last line is repeated infinitely (and ltrace is not interruptable).
> The addr=0x3fff8ff98c04 is the return address from memset (the previous
> insn at 0x3fff8ffa3338 was blr).
>
> This was uncovered by commit bf82100 (Fix address biasing in PPC
> backend), but the bug is older than that. Bisecting while
> cherry-picking bf82100 on every candidate identified 73b85aa (Support
> tracing P_PPC64_JMP_IREL slots) as the bad commit.
That code is somewhat tricky, as we use the resolver function as a
breakpoint site. And memset is an IFUNC I think. Maybe ltrace sees
the same address for return-from-resolver and return-from-memset.
That could lead to double-setting that breakpoint and lead to the
observed endless loop. PPC is notorious for tail calls like this.
Unfortunately I don't have access to PPC anymore, so can't really help
out with this.
Thanks,
Petr
More information about the Ltrace-devel
mailing list