From owner-freebsd-current@FreeBSD.ORG Sun Jun 15 17:43:18 2003 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 22E0737B401 for ; Sun, 15 Jun 2003 17:43:17 -0700 (PDT) Received: from Shenton.org (23.ebbed1.client.atlantech.net [209.190.235.35]) by mx1.FreeBSD.org (Postfix) with SMTP id A3A2243F93 for ; Sun, 15 Jun 2003 17:43:16 -0700 (PDT) (envelope-from chris@Shenton.Org) Received: (qmail 23051 invoked by uid 1000); 16 Jun 2003 00:43:15 -0000 To: current@freebsd.org From: Chris Shenton Date: 15 Jun 2003 20:43:15 -0400 Message-ID: <87of0y3l98.fsf@PECTOPAH.shenton.org> Lines: 64 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: qmail uses 100% cpu after FreeBSD-5.0 to 5.1 upgrade 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: Mon, 16 Jun 2003 00:43:18 -0000 I've been running qmail for years and like it, installed pretty much per www.LifeWithQmail.org. My main system was running FreeBSD 5.0-RELEASE and -CURRENT and qmail was fine. When I just upgraded to 5.1-CURRENT a couple days back, the qmail-send process started using all CPU. last pid: 22793; load averages: 1.06, 1.02, 1.00 up 0+08:13:46 20:36:32 74 processes: 2 running, 72 sleeping Mem: 38M Active, 51M Inact, 84M Wired, 28K Cache, 73M Buf, 452M Free Swap: 2048M Total, 2048M Free PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 615 qmails 132 0 1228K 616K RUN 483:00 96.88% 96.88% qmail-send I noticed an identical complaint on the qmail list, to which there have so far been no replies (except "you should ask the FreeBSD list"): From: Luca Morettoni Subject: qmail on FreeBSD 5.1-CURRENT To: qmail@list.cr.yp.to [...] qmail is run under daemontools and all work fine (the configuration is 2 years old!), but when I delivery the first mail (localy or remote) the qmail-send process fire up to 100% of CPU infinitely All other mail are right delivery, and the CPU use is the only problem, I see in qmail-send.c that select() function, after the first message, allways return 1 A truss shows me it's running in a tight loop over this code: open("lock/trigger",0x4,027757775230) = 8 (0x8) stat("todo",0xbfbffa00) = 0 (0x0) open("todo",0x4,01) = 9 (0x9) fstat(9,0xbfbffa00) = 0 (0x0) fcntl(0x9,0x2,0x1) = 0 (0x0) fstatfs(0x9,0xbfbff900) = 0 (0x0) getdirentries(0x9,0x8059000,0x1000,0x805a214) = 512 (0x200) gettimeofday(0xbfbffbc8,0x0) = 0 (0x0) select(0x9,0xbfbffcbc,0xbfbffc3c,0x0,0xbfbffc24) = 1 (0x1) gettimeofday(0xbfbffbc8,0x0) = 0 (0x0) gettimeofday(0xbfbffbc8,0x0) = 0 (0x0) select(0x9,0xbfbffcbc,0xbfbffc3c,0x0,0xbfbffc24) = 1 (0x1) gettimeofday(0xbfbffbc8,0x0) = 0 (0x0) getdirentries(0x9,0x8059000,0x1000,0x805a214) = 0 (0x0) lseek(9,0x0,0) = 0 (0x0) close(9) = 0 (0x0) gettimeofday(0xbfbffbc8,0x0) = 0 (0x0) select(0x9,0xbfbffcbc,0xbfbffc3c,0x0,0xbfbffc24) = 1 (0x1) gettimeofday(0xbfbffbc8,0x0) = 0 (0x0) close(8) = 0 (0x0) open("lock/trigger",0x4,027757775230) = 8 (0x8) I see nothing besides usual message delivery information in qmail's logs. Failing that, I rebuilt qmail and it seemed to have fixed it, but I didn't wait long enough: it's pegged at 100% CPU, constantly. If what Luca says is true, maybe it hadn't sent a message yet. Anyone else seen this or know what in FreeBSD-5.1 might have changed to cause this? Any thoughts on how I might go about diagnosing this any better? Thanks.