Re: BUG: NTPL: waitpid() doesn't return?

From: Linus Torvalds (torvalds_at_osdl.org)
Date: 01/31/04


Date:	Sat, 31 Jan 2004 14:52:36 -0800 (PST)
To: Matthias Urlichs <smurf@smurf.noris.de>


On Sat, 31 Jan 2004, Matthias Urlichs wrote:
>
> So there's definitely something fishy going on here.

Yes. Especially as the actual clone() we're waiting for was this
one:

31342 clone( <unfinished ...>
31342 <... clone resumed> child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x416dbc18) = 31346

which wasn't the detached one at all. I looked at the wrong clone().

> Besides, bert's test program exhibits exactly the same clone()
> arguments, yet it works ...

[ twilight zone music ]

Anyway. It's interesting to see who gets the SIGCHLD (which is why I
looked at the wrong clone) - that goes to 31340:

        31346 exit_group(0) = ?
        31340 --- SIGCHLD (Child exited) @ 0 (0) ---
        31342 waitpid(31346, <unfinished ...>

which is just because we send a thread-group signal, so the signal isn't
actually necessarily directed toward the "real parent".

But the real parent _should_ have been woken up by __wake_up_parent().
And I don't see why that wouldn't happen.

                Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [BUG] 2.6.11- sym53c8xx Broken on pp64
    ... Are you sure it's plain 2.6.11 and not some bk clone of after 2.6.11 was ... I just found a bug in the ppc64 ioremap code that got triggered by ... the set_pte_atpatch that went into bk after 2.6.11 and that triggers ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [PATCH] 2.6.0 - Watchdog patches (BK consistency checks)
    ... On December 30, 2003 02:13 pm, Andy Isaacson wrote: ... and I can do a complete clone (with full data copy and consistency ... It's found IDE corruption, it's found BK ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [uml-devel] [PATCH] nptl/sys_clone fix for i386/ppc
    ... > clone had 2 arguments. ... there may have been some good reason for it which has since disappeared. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Who changed /proc/<pid>/ in 2.6.0-test5-bk9?
    ... CLONE_* flags. ... It might mean that SIGIO cannot be used and that fuser ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Cant bk clone linux-2.5
    ... I cannot clone linux-2.5 bk tree. ... 0.71X expansion ... Running consistency check ... ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)