From owner-freebsd-current@FreeBSD.ORG Mon Jun 10 15:58:39 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7BC441B9 for ; Mon, 10 Jun 2013 15:58:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id 599AB103F for ; Mon, 10 Jun 2013 15:58:39 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BB933B9B1; Mon, 10 Jun 2013 11:58:38 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Subject: Re: Handle kernel module crashes Date: Mon, 10 Jun 2013 11:46:12 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <51B5E040.2030709@peterschmitt.fr> <51B5E575.1030006@peterschmitt.fr> In-Reply-To: <51B5E575.1030006@peterschmitt.fr> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <201306101146.12579.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 10 Jun 2013 11:58:38 -0400 (EDT) Cc: Florent Peterschmitt X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 10 Jun 2013 15:58:39 -0000 On Monday, June 10, 2013 10:40:53 am Florent Peterschmitt wrote: > Le 10/06/2013 16:28, Ryan Stone a =E9crit : > > On Mon, Jun 10, 2013 at 10:18 AM, Florent Peterschmitt < > > florent@peterschmitt.fr> wrote: > >=20 > >> Hello, > >> > >> It's not a problem but a question, and it's quite simple: > >> > >> How does FreeBSD handle crash from a single kernel module ? > >> > >> If the module internally crashes, does the entire system does too or > >> FreeBSD will continue to live ? > >> > >> Thanks > >> > >=20 > > There is no separation between kernel modules and the kernel proper. A > > crash in a kernel module will crash the entire system. >=20 > Ok and isn't it a "bad" thing ? I mean, even if the video driver > crashes, I still want to have the ability to reboot the right way, > avoiding corrupted files and WIP lose. >=20 > Another thing is a non-critical module that can crash, but because not > used by all apps on the machine, letting them ones that can continue run. >=20 > But I don't know what is the approach of FreeBSD and devs about that. You don't know what the module might have corrupted by the time you crash. It is also quite hard to isolate a crash to a specific module. Many modules operate on data that is shared with the rest of the system, so just because the instruction was inside the module doesn't mean that it isn't currently working on a shared data buffer or holding global locks (or locks belonging to another part of the system). =2D-=20 John Baldwin