From owner-freebsd-net@FreeBSD.ORG Thu Jun 7 07:30:14 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 510F41065676 for ; Thu, 7 Jun 2012 07:30:14 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0A2A78FC18 for ; Thu, 7 Jun 2012 07:30:14 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so691708pbb.13 for ; Thu, 07 Jun 2012 00:30:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=klrZsZGgjEkCNHK8ujwc2T+jo6ufY7Ml6YqK+Acfk+s=; b=HVkMSunrwWQJSs9TgSc8Q3kJKZmc993LRMJsnaoUWWxkALYSi8nIBKuX2mTzMQ4S9M 3apMHs/ImwN8Fg/8ngVbgYU+Rz2mBfBL8mqkAPY4muncdbjmzwQn/0Nr/JTKxKuZSSiY okGwzV4ZubhhLocYLMAVtuyAZGwhkHtj2K5EWro5V0ABfygfKw/dcUCImYOzGzH1Z1LK N0JrW7LMTq6p+QHitWTB8RycDJeAyZPhelGpWeQQtx+2JpOZps+hKqmG9DUrooDH8Vbr Gpuwfvd9ABmE/YDLLXPTPUgiARhDzy3dHIAAkiWdETFq96TYcIv+0tuNaDPRw+y+Svpp jatA== MIME-Version: 1.0 Received: by 10.68.200.197 with SMTP id ju5mr6956886pbc.19.1339054213590; Thu, 07 Jun 2012 00:30:13 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.68.73.161 with HTTP; Thu, 7 Jun 2012 00:30:13 -0700 (PDT) In-Reply-To: <4FD0537C.7070802@FreeBSD.org> References: <4FD0537C.7070802@FreeBSD.org> Date: Thu, 7 Jun 2012 19:30:13 +1200 X-Google-Sender-Auth: 6brZDHXFsb-Lq2oPLwvmK1jW-kg Message-ID: From: Andrew Thompson To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlSDCuwT0HId7znMWb5IK/jKci4FTS7R9Wx1l+vDlcO9w7BQkMIHRFkc4f8XcRxBhcebhZJ Cc: freebsd-net@freebsd.org, Emanuel Haupt Subject: Re: 'ifconfig tun0 destroy' gets stuck X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 07:30:14 -0000 On 7 June 2012 19:08, Andriy Gapon wrote: > > I experience a problem where vpnc can not exit cleanly and gets stuck. > pstree shows this chain: > =A0|-+=3D 31375 root vpnc > =A0| \-+- 13412 root /bin/sh /usr/local/sbin/vpnc-script-custom > =A0| =A0 \--- 13446 root ifconfig tun0 destroy > > $ procstat -k 13446 > =A0PID =A0 =A0TID COMM =A0 =A0 =A0 =A0 =A0 =A0 TDNAME =A0 =A0 =A0 =A0 =A0= KSTACK > 13446 102739 ifconfig =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_switch > sleepq_wait _cv_wait_unlock tun_destroy tun_clone_destroy ifc_simple_dest= roy > if_clone_destroyif if_clone_destroy ifioctl soo_ioctl kern_ioctl sys_ioct= l > amd64_syscall Xfast_syscall > > My system is FreeBSD 10.0-CURRENT amd64 r236503. > > I think that this started happening recently but I am not sure exactly wh= en. > Maybe after recent vpnc-scripts update or maybe after base system + kerne= l update. This means the tun device is still open, this behavior hasn't changed in 3.5 years. http://svnweb.freebsd.org/base?view=3Drevision&revision=3D186391 Andrew