Re: clone, mm->count, and coredumps

Ramakrishna@canine.wipinfo.soft.net,
Thu, 29 Jul 1999 20:26:57 +0530 (IST)


> Brian Kelly wrote:
> >
> > Ramakrishna@canine.wipinfo.soft.net wrote:
> > >Since all the threads ( processes in Linux, though cloned and sharing same
> > >MM ) might be running at the time of core-dump in one of the threads,
> > >there is most likely possibility of the MM getting changed by the time
> > >the dump file is written. This is so because the other processes do not
> > >have any knowledge of one of the threads( cloned processes ) being dumped.
> >
> > True, but I have yet to encounter a threaded core dump where this has
> > thrown me off the scent of the real bug.
>
> I'll second that. I tend to be most interested in the stack trace of the
> offending thread. Besides, if the thread crashed while it was modifying
> global structures that get modified by other threads, it was probably
> holding a mutex for those structures while the coredump was being
> generated.
Agreed, one tends to look at the offending thread. But the thread which dumped
the core need not always be the offender.

Ex: If one of the other threads execution path has corrupted the shared data,
and when then a different thread happens to access/modify it, this different
thread dumps core.

But yes, in general it's true that the offending thread is the one which dumps core.

thanks,
Rama.

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