From owner-freebsd-bugs@FreeBSD.ORG Fri Dec 7 18:43:02 2012 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 294F49F7 for ; Fri, 7 Dec 2012 18:43:02 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6AE2A8FC12 for ; Fri, 7 Dec 2012 18:43:00 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id go10so826515lbb.13 for ; Fri, 07 Dec 2012 10:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=njf4fo5nyko+dp/IFO1nthhcQUCXXiJCyb+0bO50Xo0=; b=XiG3/ZeiPObOwF1r8smjyATmNvY12kbmV1X3t8FswyM7OtYynbIN19Bt8SXoR9uOFc vIsRTiob6GRRbmOSN+5aBdafM6+DmtxRyBmSWz2owVaIQpxdRjZUX0F4OxSgoPFJ2hy8 v9TSc6HkNENaw3/+JitHesleGtydqnuD9/8Ds= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=njf4fo5nyko+dp/IFO1nthhcQUCXXiJCyb+0bO50Xo0=; b=L6nTHtqjt1Ztbh/6lWfwlzHcPMd3oSKZLtu82LIRuGobJY1AsnHS1EhoddTF6nsjB2 gmNzsA6buw88fA5k9wsXcq8NU2Lj/IsU0XHT5b+MgK7OhziUmUKLLYcm+4oLycVNdt6R vCgq3zj7/18OVN48C1Z8zLVQovySKohiHmXQpl0ylzPIbx53LYMBTzVoyN2+khRggnfh WmYVXepDMEjf7F1LlFGYM8zgDIb36nkGGMhSQuksxatm/wy9xzt71mdC86JBGcaDZr/E ewAoY555CSxthr0gADfaBk41NnagQpozKuVfcRZgXRMWnUrxcbLPjnKPdktl+X8xIY4G 4NIA== Received: by 10.112.101.135 with SMTP id fg7mr2894429lbb.87.1354905779906; Fri, 07 Dec 2012 10:42:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.110.225 with HTTP; Fri, 7 Dec 2012 10:42:29 -0800 (PST) In-Reply-To: <201212071450.qB7Eo0no031297@freefall.freebsd.org> References: <201212071450.qB7Eo0no031297@freefall.freebsd.org> From: Eitan Adler Date: Fri, 7 Dec 2012 13:42:29 -0500 Message-ID: Subject: Re: kern/174236: "kldunload ipdivert" corrupts kernel To: Lutz Donnerhacke Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQm22y6NdD4kUJSZdeiTkLNgAdr/+m8T7yEOMYV2WD6t+/o7fSw9I/NQjvSBL1SDupSdjj2u Cc: freebsd-bugs@freebsd.org, bug-followup X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2012 18:43:02 -0000 On 7 December 2012 09:50, Lutz Donnerhacke wrote: > The following reply was made to PR kern/174236; it has been noted by GNATS. > > From: Lutz Donnerhacke > To: bug-followup@FreeBSD.org > Cc: > Subject: Re: kern/174236: "kldunload ipdivert" corrupts kernel > Date: Fri, 7 Dec 2012 15:45:00 +0100 > > Any module which returns an error on unload will cause the problem. > It's not specific to ipdivert.ko or ipfw.ko or anything else. > > Relevant code section is: > > static int > div_modevent(module_t mod, int type, void *unused) > { > int err = 0; > switch (type) { > [...] > case MOD_QUIESCE: > err = EPERM; > break; > [...] > } > return err; > } > > Please note: Forced unload of ipdivert.ko works fine. If you are able and willing to debug: I'd recommend him to enter debugger and run ps there and get backtraces of the hanging threads it sounds like a leaked lock in the error case If not, just leaving this here for the record ;) -- Eitan Adler