From owner-freebsd-stable@FreeBSD.ORG Thu Mar 15 13:40:13 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 5C02816A404 for ; Thu, 15 Mar 2007 13:40:13 +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 B0AE713C458 for ; Thu, 15 Mar 2007 13:40:11 +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 l2FDe0QB099788 for ; Thu, 15 Mar 2007 15:40:00 +0200 (SAST) (envelope-from freebsd-stable@clarotech.co.za) From: "Emile Coetzee" To: Date: Thu, 15 Mar 2007 15:40:01 +0200 Message-ID: <001101c76707$6e796530$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: AcdnB25c98Po/LPgQDuOD0C5YifukA== 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 13:40:13 -0000 > > I then ran > > ktrace -p 1083 -f openvpn2.dump > > This produced no data at all. > >Shouldn't. :-) You need to run ktrace then kdump to dump the trace.< I figured that part out on my own thanks ;) The second file is 0kb in size running a kdump on it produces no output. >Correlate the cpu spin with the wallclock time in the kdump output, and paste an excerpt of what you get -- it sounds like it is spinning on a syscall.< I have no idea what exactly you want me to do here. Point me at some reading material if you like or show me some examples. >I can't seem to get the stuff from pastebin, it just times out, so ok to post an excerpt here.< No worries below is the last part of the first ktrace. I have dropped a full copy on our webserver: http://www.clarotech.co.za/dump/openvpn.txt 1082 sh RET read 4096/0x1000 1082 sh CALL mmap(0,0xea000,0x5,0x20002,0x3,0,0,0) 1082 sh RET mmap 672038912/0x280e8000 1082 sh CALL mprotect(0x281b5000,0x1000,0x7) 1082 sh RET mprotect 0 1082 sh CALL mprotect(0x281b5000,0x1000,0x5) 1082 sh RET mprotect 0 1082 sh CALL mmap(0x281b6000,0x6000,0x3,0x12,0x3,0,0xcd000,0) 1082 sh RET mmap 672882688/0x281b6000 1082 sh CALL mmap(0x281bc000,0x16000,0x3,0x1012,0xffffffff,0,0,0) 1082 sh RET mmap 672907264/0x281bc000 1082 sh CALL close(0x3) 1082 sh RET close 0 1082 sh CALL access(0x28092000,0) 1082 sh NAMI "/lib/libncurses.so.6" 1082 sh RET access 0 1082 sh CALL sysarch(0xa,0xbfbfec60) 1082 sh RET sysarch 0 1082 sh CALL mmap(0,0x440,0x3,0x1000,0xffffffff,0,0,0) 1082 sh RET mmap 672997376/0x281d2000 1082 sh CALL munmap(0x281d2000,0x440) 1082 sh RET munmap 0 1082 sh CALL mmap(0,0x3f8,0x3,0x1000,0xffffffff,0,0,0) 1082 sh RET mmap 672997376/0x281d2000 1082 sh CALL munmap(0x281d2000,0x3f8) 1082 sh RET munmap 0 1082 sh CALL mmap(0,0x1208,0x3,0x1000,0xffffffff,0,0,0) 1082 sh RET mmap 672997376/0x281d2000 1082 sh CALL munmap(0x281d2000,0x1208) 1082 sh RET munmap 0 1082 sh CALL mmap(0,0x58d8,0x3,0x1000,0xffffffff,0,0,0) 1082 sh RET mmap 672997376/0x281d2000 1082 sh CALL munmap(0x281d2000,0x58d8) 1082 sh RET munmap 0 1082 sh CALL sigprocmask(0x1,0x28087980,0xbfbfec30) 1082 sh RET sigprocmask 0 1082 sh CALL sigprocmask(0x3,0x28087990,0) 1082 sh RET sigprocmask 0 1082 sh CALL getpid 1082 sh RET getpid 1082/0x43a 1082 sh CALL geteuid 1082 sh RET geteuid 0 1082 sh CALL getppid 1082 sh RET getppid 1006/0x3ee 1082 sh CALL readlink(0x281ade4b,0xbfbfe810,0x3f) 1082 sh NAMI "/etc/malloc.conf" 1082 sh RET readlink -1 errno 2 No such file or directory 1082 sh CALL issetugid 1082 sh RET issetugid 0 1082 sh CALL mmap(0,0x1000,0x3,0x1002,0xffffffff,0,0,0) 1082 sh RET mmap 672997376/0x281d2000 1082 sh CALL break(0x8066000) 1082 sh RET break 0 1082 sh CALL break(0x8067000) 1082 sh RET break 0 1082 sh CALL break(0x8068000) 1082 sh RET break 0 1082 sh CALL stat(0x8067004,0xbfbfebb0) 1082 sh NAMI "/var/mail/support" 1082 sh RET stat 0 1082 sh CALL getuid 1082 sh RET getuid 0 1082 sh CALL geteuid 1082 sh RET geteuid 0 1082 sh CALL getgid 1082 sh RET getgid 0 1082 sh CALL getegid 1082 sh RET getegid 0 1082 sh CALL open(0xbfbfee07,0,0x28066b71) 1082 sh NAMI "./tapserver.sh" 1082 sh RET open 3 1082 sh CALL fcntl(0x3,0,0xa) 1082 sh RET fcntl 10/0xa 1082 sh CALL close(0x3) 1082 sh RET close 0 1082 sh CALL fcntl(0xa,0x2,0x1) 1082 sh RET fcntl 0 1082 sh CALL sigaction(0x2,0,0xbfbfebb0) 1082 sh RET sigaction 0 1082 sh CALL sigaction(0x2,0xbfbfebb0,0xbfbfeb90) 1082 sh RET sigaction 0 1082 sh CALL sigaction(0x2,0,0xbfbfebb0) 1082 sh RET sigaction 0 1082 sh CALL sigaction(0x2,0xbfbfebb0,0) 1082 sh RET sigaction 0 1082 sh CALL sigaction(0x3,0,0xbfbfebb0) 1082 sh RET sigaction 0 1082 sh CALL sigaction(0x3,0xbfbfebb0,0xbfbfeb90) 1082 sh RET sigaction 0 1082 sh CALL sigaction(0x3,0,0xbfbfebb0) 1082 sh RET sigaction 0 1082 sh CALL sigaction(0x3,0xbfbfebb0,0) 1082 sh RET sigaction 0 1082 sh CALL sigaction(0xf,0,0xbfbfebb0) 1082 sh RET sigaction 0 1082 sh CALL sigaction(0xf,0xbfbfebb0,0xbfbfeb90) 1082 sh RET sigaction 0 1082 sh CALL sigaction(0x1c,0,0xbfbfebb0) 1082 sh RET sigaction 0 1082 sh CALL sigaction(0x1c,0xbfbfebb0,0xbfbfeb90) 1082 sh RET sigaction 0 1082 sh CALL __getcwd(0xbfbfe860,0x400) 1082 sh RET __getcwd 0 1082 sh CALL read(0xa,0x8063d60,0x3ff) 1082 sh GIO fd 10 read 80 bytes "/usr/local/sbin/openvpn --daemon --config /usr/local/etc/openvpn/tapserver.conf " 1082 sh RET read 80/0x50 1082 sh CALL break(0x8069000) 1082 sh RET break 0 1082 sh CALL fork 1082 sh RET fork 1083/0x43b 1082 sh CALL getpgrp 1082 sh RET getpgrp 1082/0x43a 1082 sh CALL wait4(0xffffffff,0xbfbfeac8,0x2,0)