Re: [patch] thread-aware coredumps, 2.5.43-C3

From: Daniel Jacobowitz (dan@debian.org)
Date: Thu Oct 17 2002 - 11:40:40 EST


On Thu, Oct 17, 2002 at 11:11:21AM +0200, Ingo Molnar wrote:
> - properly wait for all threads that share the same MM to serialize with
> the coredumping thread. This is CLONE_VM based, not tied to
> CLONE_THREAD and/or signal semantics, ie. old-style (or different-style)
> threaded apps will be properly stopped as well.
>
> The locking might look a bit complex, but i wanted to keep the
> __exit_mm() overhead as low as possible. It's not quite trivial to get
> these bits right, because 'sharing the MM' is detached from signals
> semantics, so we cannot rely on broadcast-kill catching all threads. So
> zap_threads() iterates through every thread and zaps those which were
> left out. (There's a minimal race left in where a newly forked child
> might escape the attention of zap_threads() - this race is fixed by the
> OOM fixes in the mmap-speedup patch.)

My only problem with this is that you're waiting for all threads by
SIGKILLing them. If a process vforks or clones, and then the child
crashes, the parent will receive a SIGKILL - iff we are dumping core.
That's a change in behavior that seems a bit too arbitrary to me.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer
-
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/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:35 EST