From owner-freebsd-current@FreeBSD.ORG Sun Jun 13 16:54:32 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20B2116A4CE for ; Sun, 13 Jun 2004 16:54:32 +0000 (GMT) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AE6043D39 for ; Sun, 13 Jun 2004 16:54:31 +0000 (GMT) (envelope-from don@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2657.72) id ; Sun, 13 Jun 2004 12:53:53 -0400 Message-ID: From: Don Bowman To: "'current@freebsd.org'" Date: Sun, 13 Jun 2004 12:53:48 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" Subject: localcru: negative time of 2360 usec for pid 33672 (fork_exit) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2004 16:54:32 -0000 if you run the below test program, periodically you will get: localcru: negative time of 2360 usec for pid 33672 (fork_exit) come out. On stable, you can set 'kern.timecounter.method=1' to workaround this problem. Is there a fix for this on current? $ cat fork_exit.c #include #include #include #include #include #include #include #include char buf[16384]; static int doit() { int fd; char fname[] = "/tmp/fe/template.XXXXXXXXXX"; memset(buf,random(), sizeof(buf)); fd = open(mktemp(fname), O_RDWR|O_CREAT|O_TRUNC, 0666); if (fd > 0) { write(fd, buf, sizeof(buf)); } exit(0); } int main(int argc, char **argv) { unsigned int i; int s; mkdir("/tmp/fe", 0777); for (i = 0; ; i++) { if (fork() == 0) { doit(); } if ((i % 1000) == 0) { while (waitpid(-1, &s, WNOHANG) > 0) ; system("rm /tmp/fe/*"); } } return 0; }