From owner-freebsd-current@FreeBSD.ORG Wed Jan 12 07:36:52 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BFBA1065670 for ; Wed, 12 Jan 2011 07:36:52 +0000 (UTC) (envelope-from martin@sugioarto.com) Received: from mailserv.regfish.com (mailserv.regfish.com [79.140.61.33]) by mx1.freebsd.org (Postfix) with ESMTP id BB5488FC14 for ; Wed, 12 Jan 2011 07:36:51 +0000 (UTC) Received: (qmail 22710 invoked from network); 12 Jan 2011 07:10:07 -0000 Received: from pd9ec0ae1.dip0.t-ipconnect.de (HELO yuni.sugioarto.com) (46959-0001@[217.236.10.225]) (envelope-sender ) by mailserv.regfish.com (qmail-ldap-1.03) with SMTP for ; 12 Jan 2011 07:10:07 -0000 Received: from zelda.sugioarto.com (zelda.sugioarto.com [192.168.0.12]) by yuni.sugioarto.com (Postfix) with ESMTP id 7873F1BAC55; Wed, 12 Jan 2011 08:10:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sugioarto.com; s=mail; t=1294816206; bh=7CzTCdzxscdgB504siKgrTN1FhjfECSb/UVLrxzX7RM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: Mime-Version:Content-Type; b=b4fjXgrR+47XWvMh7A6fhEqZ7aqjcxkucZQ0z+pupzraRVhFqwNxmeN9GUn5RDgK5 +RCYoWJuiCuCuYB0L4kCPjs8jX+ZN3ukShqUE6ubtqTjvHfpTbWNhYsUWQ94bXjAwy 6TtBT87crzKlrw8VLEBDoR4aYMMyAMqEBYYsEyPI= Date: Wed, 12 Jan 2011 08:10:00 +0100 From: Martin Sugioarto To: David DEMELIER Message-ID: <20110112081000.5330ae53@zelda.sugioarto.com> In-Reply-To: References: X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/uKZDJ6SL4fmZ+JG+6+s5cWp"; protocol="application/pgp-signature" Cc: freebsd-current@freebsd.org Subject: Re: why panic(9) ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2011 07:36:52 -0000 --Sig_/uKZDJ6SL4fmZ+JG+6+s5cWp Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Tue, 11 Jan 2011 22:11:13 +0100 schrieb David DEMELIER : Hi David, I want to say something to the two statements below. > In fact I like FreeBSD, and I don't expect running anything else. But > I must say that I didnt see windows 2000 crashing on my every boxes I > have before switching to FreeBSD. =46rom my experience, when FreeBSD crashes, it means mostly that you have some defective hardware. Last time when I had regular panics, it was a Xeon CPU that was broken and flipped some bits in its cache when it got a bit hotter. The point is... this kind of errors would never be discovered by MS-Windows. Because it appears to crash from various reasons and you never know if you have hardware problems or a programming error. Then it's also normal that applications on MS-Windows crash here and there. It's mostly ignored because the whole system is not stable. I've had also MS-Windows 2000 long time ago. And it ran on a PC where CPU had wrong frequency multiplicator setting (all the time!). No one complained when it crashed. But when I tried to run a Linux Live-CD on it, it panic'ed very soon (mostly when starting). I suspect that MS-Windows has a few routines which ignore errors and tries to continue... which is very bad, in my opinion! It is really annoying to hear people saying "MS-Windows runs and FreeBSD crashes", because it means to me that FreeBSD discovered another hardware error where MS-Windows failed. (Btw, I changed the CPU a year ago and now it works without panics. Also the wrong multiplicator was corrected and the AMD K5 CPU ran correctly.) > I understand everything, corrupts kernel data must not be used. That's > why panic are made to prevent any dangerous things. =20 Yes. No one wants to lose data. I don't want to say that FreeBSD does not have programming errors. Of course, a panic might be triggered by an unknown situation in a driver. But you have to figure it out somehow, where the origins of the error are. And that's why a panic helps here. The kernel shows you the NEAREST POSSIBLE position where it detected that something went wrong. Panics are also good for diagnosis. =20 But also, you want to get the errors in FreeBSD fixed. I learned that when I insert assertions (see assert(3)) and let my applications crash intentionally when it detects an error, paradoxically the applications have far less errors than the ones that try to run as far as possible. First thing is, as I said before, you discover the programming error NEAR the place it happened (easier to fix). Second, sometimes (after years) a developer forgets what assertions he made to restrict the usage of certain routines (special cases/values are the worst things here). It reminds the developer quickly when doing basic tests (regression tests e.g.). But as I said, I would say that FreeBSD does not panic often. Look first if it's a hardware error (and these PC-DOCTOR applications cannot really discover any problems, I can tell you for sure; also memcheckers do not find errors in memory except for some trivial cases). The best test is to try to compile world on FreeBSD. When a PC survives this, it's functioning well (very probable). Then, think if you use any exotic hardware on your system. Some drivers which are not very common, might not cover every vendor or are still not tested well, because there are not many people who use them. All in all, Panics are important. They show you problems, try to give hints what happened that lead to this situation and save you from subsequent data disasters, as others pointed out. -- Martin --Sig_/uKZDJ6SL4fmZ+JG+6+s5cWp Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iQIcBAEBAgAGBQJNLVPNAAoJEF8wvLx/5p/7MkEP/RGgf+rIg2SV9lUKeE4FAE+L agFbsXs0sAyW/Gca7257QwDmE7Hjhf6UgDKsZsyrZg9PXMcSbvpYXdtCvhODGdQy 9kXwLbzWF5HGNuZxJcFv+BxYXxktPzO8zyoVit2A40rkc8RVMDIUyfjVlMTKgjMr drnCLlxRE8BXdsl1Xn5+K9XWQCu1jR3gPvwzfCRTjTA6FC5TyRxfrZ/gvn8g+OAk 9SrMv0BcrkwZ+PlNAt1mkthRXpdiOGiq4y//p2aFLpScUvhuKdAHSncWIaT614HL KqofW/ncoGFyHeDKIWJd8T/RXWK47RNg6B9ST75lNZWzTyEKv7K7fkFnpnUpj0MT jIpz1b3Iarr6O3xFr3Y8TYqKalEgr+S8lfeycdi/uzUMvPqjij66SPnQrcRkjHia zhbdZIpZZV8CI++XHc0IdGP9tV9oZJg0Ru7nTe8A8BXavefFKxYzwWa/mFh38wj+ b5CucTuVyfEgWk7KNHfTr+9yO5Iq2BnNpPcUlzCG++ARKHk7wF4r03FV4YNUCLe2 B3XXrYKfUI8tW6gfRsMXAoqx8lNbdtN96NmQ83dPDTsfqmCEzCVGSMf00Nsud5va VUf4tIPLBko2C6GmwvUaqALYv5v9iVJaTlFMV5qp5DfrGU4G3wSVFRToZgziAJaI sCdq51FmFNobQDu9DB5T =yk6F -----END PGP SIGNATURE----- --Sig_/uKZDJ6SL4fmZ+JG+6+s5cWp--