Re: [PATCH/7.10 2/2] gdbserver: Fix non-stop / fork / step-over issues

Don Breazeal
2015-07-31T18:04:24Z

On 7/31/2015 10:03 AM, Pedro Alves wrote:
> Ref: https://sourceware.org/ml/gdb-patches/2015-07/msg00868.html
>
> This adds a test that has a multithreaded program have several threads
> continuously fork, while another thread continuously steps over a
> breakpoint.

Wow.

>
> This exposes several intertwined issues, which this patch addresses:
>
Thanks again for digging into these issues.

---snip---
>
> - The test runs with both "set detach-on-fork" on and off. When off,
> it exercises the case of GDB detaching the fork child explicitly.
> When on, it exercises the case of gdb resuming the child
> explicitly. In the "off" case, gdb seems to exponentially become
> slower as new inferiors are created. This is _very_ noticeable as
> with only 100 inferiors gdb is crawling already, which makes the
> test take quite a bit to run. For that reason, I've disabled the
> "off" variant for now.

Bummer. I was going to ask whether this use-case justifies disabling
the feature completely, but since the whole follow-fork mechanism is of
limited usefulness without exec events, the question is likely moot
anyway.

Do you have any thoughts about whether this slowdown is caused by the
fork event machinery or by some more general gdbserver multiple
inferior problem?

Are you planning to look at the slowdown? Can I help out? I have an
interest in having detach-on-fork 'off' enabled. :-S

thanks
--Don