From owner-freebsd-net@FreeBSD.ORG Wed Jan 23 16:32:39 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AFDA0A79; Wed, 23 Jan 2013 16:32:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8998DEEB; Wed, 23 Jan 2013 16:32:39 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B892EB922; Wed, 23 Jan 2013 11:32:38 -0500 (EST) From: John Baldwin To: freebsd-net@freebsd.org, Emanuel Haupt Subject: Re: kern/173475: [tun] tun(4) stays opened by PID after process is terminated Date: Wed, 23 Jan 2013 11:17:53 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p22; KDE/4.5.5; amd64; ; ) References: <201301230700.r0N701sO066895@freefall.freebsd.org> In-Reply-To: <201301230700.r0N701sO066895@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201301231117.53522.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 23 Jan 2013 11:32:38 -0500 (EST) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2013 16:32:39 -0000 On Wednesday, January 23, 2013 2:00:01 am Emanuel Haupt wrote: > The following reply was made to PR kern/173475; it has been noted by GNATS. > > From: Emanuel Haupt > To: bug-followup@FreeBSD.org, IZ-FreeBSD0701@hs-karlsruhe.de > Cc: > Subject: Re: kern/173475: [tun] tun(4) stays opened by PID after process is > terminated > Date: Wed, 23 Jan 2013 07:59:07 +0100 > > Could you please try the following vpnc patch? It tries to work around > this deadlock situation: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/175067 > > However, the underlying problem with if_tun should be looked at > separately in this PR. This is not a bug in tun, it is a bug in vpnc. (I also see this with openconnect). The problem in the case of openconnect is that the process calls vpnc-script while is still holds an open file descriptor on /dev/tunX. The calling processes need to be fixed to close /dev/tunX before calling the script, or they need to handle destroying of the tunX interfaces themselves rather than letting the script do it. -- John Baldwin