[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] DejaGnu kills the wrong process due to PID-reuse races

From: Pedro Alves
Subject: Re: [PATCH] DejaGnu kills the wrong process due to PID-reuse races
Date: Wed, 29 Jul 2015 09:17:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Hi Ben,

On 07/29/2015 07:30 AM, Ben Elliston wrote:
> Thanks for your patch.  I seem to recall, years ago, the odd
> intermittent GDB test failure that couldn't be explained.  Perhaps
> that was due to this bug?  

Might be, though intermittent GDB test failures due to bugs in the
kernel, GDB, or the test-itself bugs are more likely.  We've been
fixing all of those so that the buildbots (a newish addition) are
stable.  The test that is most affected the
this rogue kill used to expose GDB bugs intermittently...
And that made me not even suspect DejaGnu for months.

> I am wondering, though, why is it happening
> reproducibly for you when PIDs are assigned consecutively?  I wouldn't
> expect the gdb PID to be re-used for quite a long time.

It's usually not gdb's PID that is re-used, but of one of the
inferiors that gdb debugs in gdb's testsuite.  And those are thousands.
And then, gdb's testsuite has a few tests that spawn many short
lived threads in quick succession (e.g., attach-many-short-lived-threads.exp).
Since threads and processes share the number space in Linux, those cause
pid recycling frequently.  In addition, GDB's testsuite has a
parallel test mode that runs several tests / dejagnu instances at
the same time.

For completeness, here's the GDB patch that fixes the rest of
pid-reuse problems, on the gdb testsuite side:

Pedro Alves

reply via email to

[Prev in Thread] Current Thread [Next in Thread]