From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [patch] change WARN_ON back to "BUG: at ..."
Date: Thu, 21 Dec 2006 10:49:01 -0800 [thread overview]
Message-ID: <458AD71D.2060508@goop.org> (raw)
In-Reply-To: <20061221124327.GA17190@elte.hu>
Ingo Molnar wrote:
> Subject: [patch] change WARN_ON back to "BUG: at ..."
> From: Ingo Molnar <mingo@elte.hu>
>
> WARN_ON() ever triggering is a kernel bug. Do not try to paper over this
> fact by suggesting to the user that this is 'only' a warning, as the
> following recent commit does:
>
I disagree.
I think there are two issues here: intent and effect.
What's the intent of WARN_ON? Presumably its different from BUG_ON,
otherwise you could just use BUG_ON. Or if not, why not just have
BUG_ON? I think in practice many WARN_ONs are clearly not intended to
be as serious as BUG_ON: they warn about unimplemented things, transient
hiccups, clarifications of errno returns, etc. (Whether WARN_ON is a
good mechanism for all these things is a separate issue.)
Their effects are very different too. The effect of WARN_ON is simply a
message; if I see it in a log, I know that something happened which
should be fixed, but the system is in a fairly sane state. If I see a
BUG_ON, then I know something was killed with extreme prejudice - at
best a process got killed, but there may be stray locks held or other
damage - and the system is basically teetering if it hasn't crashed
already. Because the effects of the two warning mechanisms are so
different, I think its important to make them clearly visually distinct
when scanning the kernel output. My eye is trained to see "BUG: " as
meaning "something destabilizing happened"; if warnings also appear that
way, then it is just needlessly confusing.
J
next prev parent reply other threads:[~2006-12-21 18:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-21 12:43 [patch] change WARN_ON back to "BUG: at ..." Ingo Molnar
2006-12-21 13:00 ` Arjan van de Ven
2006-12-21 18:49 ` Jeremy Fitzhardinge [this message]
2006-12-21 23:57 ` Ingo Molnar
2006-12-22 20:04 ` Andrew Morton
2006-12-23 2:06 ` Steven Rostedt
2006-12-23 11:03 ` Ingo Molnar
2006-12-23 12:44 ` Steven Rostedt
2006-12-24 14:16 ` Pavel Machek
2006-12-28 9:15 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=458AD71D.2060508@goop.org \
--to=jeremy@goop.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.