From owner-freebsd-stable@FreeBSD.ORG Thu Mar 15 07:04:55 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 4143816A400 for ; Thu, 15 Mar 2007 07:04:55 +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 A3BC413C45B for ; Thu, 15 Mar 2007 07:04:52 +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 l2F6hWo5071307 for ; Thu, 15 Mar 2007 08:43:32 +0200 (SAST) (envelope-from freebsd-stable@clarotech.co.za) From: "Emile Coetzee" To: Date: Thu, 15 Mar 2007 08:43:31 +0200 Message-ID: <000d01c766cd$3f6aef50$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: AcdmzT8Boxg8D+g3T7q10+fB7GOFJQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 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: Thu, 15 Mar 2007 07:04:55 -0000 I have done some more investigation. Rolling back to RELENG_6_2 solves the problem. I have now had this problem on 3 boxes in 2 days and have been able to reproduce it on a 4th in our lab. Starting openvpn with full debug it stops just before the point where the TAP devices gets initiated. And then the output from top shows openvpn on 99% cpu time (well almost). RELENG_6 [snip] Thu Mar 15 08:27:39 2007 us=333199 OpenVPN 2.0.6 i386-portbld-freebsd6.2 [SSL] [LZO] built on Mar 14 2007 Thu Mar 15 08:27:39 2007 us=344375 Diffie-Hellman initialized with 1024 bit key Thu Mar 15 08:27:39 2007 us=345355 MTU DYNAMIC mtu=0, flags=1, 0 -> 138 Thu Mar 15 08:27:39 2007 us=345376 TLS-Auth MTU parms [ L:1574 D:138 EF:38 EB:0 ET:0 EL:0 ] Thu Mar 15 08:27:39 2007 us=345390 MTU DYNAMIC mtu=1450, flags=2, 1574 -> 1450 RELENG_6_2 [snip] Thu Mar 15 07:18:23 2007 us=437582 OpenVPN 2.0.6 i386-portbld-freebsd6.2 [SSL] [LZO] built on Mar 14 2007 Thu Mar 15 07:18:23 2007 us=448672 Diffie-Hellman initialized with 1024 bit key Thu Mar 15 07:18:23 2007 us=449653 MTU DYNAMIC mtu=0, flags=1, 0 -> 138 Thu Mar 15 07:18:23 2007 us=449676 TLS-Auth MTU parms [ L:1574 D:138 EF:38 EB:0 ET:0 EL:0 ] Thu Mar 15 07:18:23 2007 us=449692 MTU DYNAMIC mtu=1450, flags=2, 1574 -> 1450 Thu Mar 15 07:18:23 2007 us=449759 TUN/TAP device /dev/tap0 opened Thu Mar 15 07:18:23 2007 us=449832 Data Channel MTU parms [ L:1574 D:1450 EF:42 EB:135 ET:32 EL:0 AF:3/1 ] Thu Mar 15 07:18:23 2007 us=450475 GID set to nobody Thu Mar 15 07:18:23 2007 us=450504 UID set to nobody Thu Mar 15 07:18:23 2007 us=450532 Socket Buffers: R=[42080->65536] S=[9216->65536] Thu Mar 15 07:18:23 2007 us=450552 UDPv4 link local (bound): [undef]:1195 Thu Mar 15 07:18:23 2007 us=450567 UDPv4 link remote: [undef] Thu Mar 15 07:18:23 2007 us=450586 MULTI: multi_init called, r=256 v=256 Thu Mar 15 07:18:23 2007 us=450623 IFCONFIG POOL: base=192.168.251.200 size=11 Thu Mar 15 07:18:23 2007 us=450649 IFCONFIG POOL LIST Thu Mar 15 07:18:23 2007 us=450670 PO_INIT maxevents=4 flags=0x00000002 Thu Mar 15 07:18:23 2007 us=450688 Initialization Sequence Completed Thu Mar 15 07:18:23 2007 us=450702 SCHEDULE: schedule_find_least NULL Thu Mar 15 07:18:23 2007 us=450718 PO_CTL rwflags=0x0001 ev=5 arg=0x080891c0 Thu Mar 15 07:18:23 2007 us=450733 PO_CTL rwflags=0x0001 ev=6 arg=0x080891c4 Thu Mar 15 07:18:23 2007 us=450751 I/O WAIT TR|Tw|SR|Sw [10/0] last pid: 1066; load averages: 0.49, 0.12, 0.04 up 0+00:48:00 08:28:16 31 processes: 2 running, 29 sleeping CPU states: 0.0% user, 0.0% nice, 98.5% system, 1.5% interrupt, 0.0% idle Mem: 11M Active, 7956K Inact, 17M Wired, 11M Buf, 448M Free Swap: 1024M Total, 1024M Free PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND 1066 root 1 122 0 2984K 2436K RUN 0:36 96.72% openvpn 786 root 1 96 0 3056K 1900K select 0:00 0.00% ntpd [snip] Vlad Galu: As this is a tap server there is no remote end point to connect to. It is waiting for a windows client to connect. As you can see from the openvpn logs the tap device is not even getting initiated. Luigi Rizzo: I'm no programmer, so suggestions on how to fix it are welcome ;) Regards Emile