Re: Multithreaded core dumps

Alexander Viro (viro@math.psu.edu)
Thu, 30 Aug 2001 05:03:59 -0400 (EDT)


On Thu, 30 Aug 2001, Alan Cox wrote:

> > I am inclined to believe that that is the case. Unfortunately, I have no
> > advice to give - but I am writing because I think that it would be neat if
> > you have the time and the inclination for you to document your findings as
> > you progress and put them on the web.
>
> The 2.4-ac tree supports dumping core.$pid for the threads that actually
> died

... and these dumps are not reliable. Living thread may modify the
contents of dump as it's being written out. I.e. you are getting
false alarms - inconsistent data that was never there.

Think of a linked list protected by a mutex. Half of its entries are
already written out. Surviving thread removes an element. It updates
the in-core structures correctly. The problem being, in the dump
we get part of memory from before that change and part - after. If
you notice that when you are looking at the dump - welcome to a nice
chase after the bug that never existed.

-
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/