This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix for internal-error: linux_nat_post_attach_wait: Assertion `pid == new_pid && WIFSTOPPED (status)' failed.

On Wed, Oct 14, 2009 at 12:07 PM, Pedro Alves <> wrote:

> Ugh.  Happened much more often for me, like 1 in 5...

It's racy. I've seen different frequency of problems depending on
whether I run kernel 2.6.24 or 2.6.30.

> I don't think you needed the interface change.


> Back to the "simple" variant: The inferior just added is
> always inferior_ptid/current_inferior().  If you look
> at fork-child.c:startup_inferior, you'll see bits of
> code doing exactly what you'd need to do.  E.g.:
>            target_terminal_ours ();
>            target_mourn_inferior ();
>            if (WIFEXITED (status))
>              error (_("During startup program exited with code %d."),
>                     WIFEXITCODE (status));
>            else if (WIFSIGNALED (status))
>              error (_("During startup program exited with signal ..."),
>                     ...);

I don't see above code in fork-child.c (or anywhere else for that
matter). Are you looking at a local patch?

Anyway, here is try #3.

Paul Pluzhnikov

2009-10-14  Paul Pluzhnikov  <>

       * linux-nat.c (linux_nat_post_attach_wait): Adjust assert.
       (lin_lwp_attach_lwp, linux_nat_attach): Handle disappearing LWP.

Attachment: gdb-assert-10757-20091014-2.txt
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]