Re: kernel BUG at kernel/exit.c:792!

From: Linus Torvalds
Date: Wed Dec 03 2003 - 15:10:09 EST

On Wed, 3 Dec 2003, Ingo Molnar wrote:
> only the starting point should be checked. If the starting point is wrong
> then we have no access to the 'thread list' anymore. If the starting point
> is alive then all the thread-list walking within the tasklist_lock is
> safe.

I'm not sure that's true. The starting point is not necessarily the thread
group leader, and then following the chain can see a zombie thread group
leader in the _middle_ without a sighandler pointer - at which point we
BUG() out again.

Guys, that BUG() is _incorrect_.

This is one reason I hate some assert() with a passion. I've seen this way
too often: somebody added an assert for something he thought was a bug,
and then people are too damn afraid to just admit that it wasn't a bug at
all, and just get rid of the f-ing assert. So instead, you add code to
avoid the assert. And that code itself is non-obvious and broken.

So as far as I can tell, the patch from Ingo and Srivatsa just paper over
the _real_ bug. And the real fix is to get rid of the debugging helper
completely, since it no longer serves any purpose, and it is WRONG!

So tell me why it isn't wrong?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at