Re: kernel BUG at kernel/exit.c:792!
From: Ingo Molnar
Date: Wed Dec 03 2003 - 15:36:58 EST
On Wed, 3 Dec 2003, Linus Torvalds wrote:
> 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
i share your concern wrt. the abuse of asserts, but a few strategic
BUG_ON()s and WARN_ON()s have done wonders to 2.6 quality already. There
are certain types of bugs that are very hairy to detect if not caught
early enough. Stale thread pointers are one such thing.
in this specific case i doubt we'd be in a better position by not having
this assert. get_tid_list() would not crash the way it asserts now,
because task structs are not cleared after freeing. It might even lead to
incorrect thread lists being generated, if the task struct got reused for
another process. Or if it's reused for something else then we'd get much
rarer crashes in get_tid_list().
i think i'd rather like to see a few bad rounds of attempted fixes than
(much-) harder to reproduce bugs.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/