From owner-freebsd-bugs@FreeBSD.ORG Wed Oct 17 12:50:01 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF0C616A41A for ; Wed, 17 Oct 2007 12:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CC49613C4B0 for ; Wed, 17 Oct 2007 12:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9HCo1JX077639 for ; Wed, 17 Oct 2007 12:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9HCo1fa077638; Wed, 17 Oct 2007 12:50:01 GMT (envelope-from gnats) Resent-Date: Wed, 17 Oct 2007 12:50:01 GMT Resent-Message-Id: <200710171250.l9HCo1fa077638@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Emile Coetzee Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A881816A421 for ; Wed, 17 Oct 2007 12:47:00 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 8EE7E13C4AA for ; Wed, 17 Oct 2007 12:47:00 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9HCklXR024692 for ; Wed, 17 Oct 2007 12:46:47 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l9HCkljc024691; Wed, 17 Oct 2007 12:46:47 GMT (envelope-from nobody) Message-Id: <200710171246.l9HCkljc024691@www.freebsd.org> Date: Wed, 17 Oct 2007 12:46:47 GMT From: Emile Coetzee To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/117271: OpenVPN TAP uses 99% CPU on releng_6 when if_tap is in /boot/loader.conf X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2007 12:50:02 -0000 >Number: 117271 >Category: misc >Synopsis: OpenVPN TAP uses 99% CPU on releng_6 when if_tap is in /boot/loader.conf >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 17 12:50:01 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Emile Coetzee >Release: RELENG_6 >Organization: Clarotech Consulting >Environment: FreeBSD x 6.2-STABLE FreeBSD 6.2-STABLE #36: Thu Oct 11 02:46:55 SAST 2007 root@x:/usr/obj/usr/src/sys/X i386 >Description: Tracking RELENG_6 with if_tap_load="YES" in /boot/loader.conf. When you start openvpn (/usr/local/sbin/openvpn --cd /usr/local/etc/openvpn --config /usr/local/etc/openvpn/tapsvr.conf) top will list openvpn on 99% CPU usage and the system will become non-responsive. If you remove if_tap_load="YES" from /boot/loader.conf boot the system, run kldload if_tap and start openvpn, the problem does not occur. Compiling tap into the kernel as a pseudo device works correctly as well. If I track RELENG_6_2 I can load if_tap from loader.conf and start openvpn tap service without experiencing any high CPU usage problems as decribed above. So it would seem there is a difference loading the tap device at boot time using loader.conf than loading it from the command line or as part of the kernel in RELENG_6 I first reported this on the mailing lists in March 2007. At that time I did notice some very recent changes for if_tap in the source tree which might be the cause of the problem. http://unix.derkeiler.com/Mailing-Lists/FreeBSD/stable/2007-03/msg00445.html >How-To-Repeat: Track RELENG_6 Install openvpn from ports (/usr/ports/security/openvpn) Configure a VPN server using the tap device (the defaults will do). set if_tap_load="YES" in /boot/loader.conf start openvpn: /usr/local/sbin/openvpn --cd /usr/local/etc/openvpn --config /usr/local/etc/openvpn/tapsvr.conf >Fix: The workaround is to remove if_tap from loader.conf and load it after boot time or compile it into the kernel. >Release-Note: >Audit-Trail: >Unformatted: