From owner-freebsd-stable@FreeBSD.ORG Tue Mar 20 12:16:12 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 966C416A404 for ; Tue, 20 Mar 2007 12:16:12 +0000 (UTC) (envelope-from freebsd-stable@clarotech.co.za) Received: from proxy.clarotech.co.za (proxy.clarotech.co.za [196.211.62.90]) by mx1.freebsd.org (Postfix) with ESMTP id 1BFFF13C459 for ; Tue, 20 Mar 2007 12:16:10 +0000 (UTC) (envelope-from freebsd-stable@clarotech.co.za) X-Virus-Scanned: amavisd-new at clarotech.co.za Received: from B52 (b52.clarotech.co.za [192.168.250.126]) by proxy.clarotech.co.za (8.13.8/8.13.8) with ESMTP id l2KCG1jn039258 for ; Tue, 20 Mar 2007 14:16:01 +0200 (SAST) (envelope-from freebsd-stable@clarotech.co.za) From: "Emile Coetzee" To: References: <001101c76707$6e796530$7efaa8c0@clarotech.co.za> <45F94FA8.5020403@FreeBSD.org> <001901c76713$1b46e8e0$7efaa8c0@clarotech.co.za> <45FA8735.80608@FreeBSD.org> Date: Tue, 20 Mar 2007 14:16:00 +0200 Message-ID: <002601c76ae9$85c34680$7efaa8c0@clarotech.co.za> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcdnwvPck+cu1Y6BT+KfiBXhCJrClQDI6q4Q X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 In-Reply-To: <45FA8735.80608@FreeBSD.org> Subject: RE: Openvpn tap uses 99% cpu time X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: emilec@clarotech.co.za List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2007 12:16:12 -0000 Emile Coetzee wrote: > Okay I finally have a ktrace of the offending process. You can view it here: > http://www.clarotech.co.za/dump/openvpn2.txt > >>Thanks for this. If this is the correct trace, of the correct process, then it looks like OpenVPN is hanging immediately on opening the tap device.<< >>One thing that does jump out at me is the use of the persist-tun keyword. Can you try removing the use of this keyword? It is something I've never had to use with OpenVPN.<< I did try it without the persist settings and it seemed to work but then I put it back again and that worked too (i.e. no 100% CPU usage). However after restarting the box and repeating the tests, both produced the 100% CPU usage issue. What I suspect happened is that somehow the tap device was already present and thus openvpn did not need to create one. I then tried to use the cloned_interfaces="tap0" to see if that would create a tap device for me at boot time. But the server hung similarly to when openvpn uses 100% CPU time more or less where I would expect it to initialize the NICs. Unfortunately I did not think to check if the tap device was present before testing it without the persist setting. So it's a bit of mystery. I have lost the box I was testing on (off to a client) and will only be able to setup a new one to do testing on next week. So I will feed back with any new findings. Cheers Emile