From owner-freebsd-current@FreeBSD.ORG Mon Jun 16 04:13:00 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 5DE7B37B401 for ; Mon, 16 Jun 2003 04:13:00 -0700 (PDT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E0FE43FB1 for ; Mon, 16 Jun 2003 04:12:59 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.9/8.12.9) with ESMTP id h5GBCpM7048828; Mon, 16 Jun 2003 04:12:56 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200306161112.h5GBCpM7048828@gw.catspoiler.org> Date: Mon, 16 Jun 2003 04:12:51 -0700 (PDT) From: Don Lewis To: ths@katjusha.de In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: current@FreeBSD.org Subject: Re: 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 11:13:00 -0000 On 16 Jun, Thorsten Schroeder wrote: > Hi, > > On Sun, 15 Jun 2003, Don Lewis wrote: > >> > I don't know what it could be - perhaps a problem with named pipes >> > ("lock/trigger")? >> > >> > You can find my ktrace output here: http://cs.so36.net/~ths/kdump.txt > >> Which version of fifo_vnops.c? If the problem is present in >> 5.1-RELEASE, then the problem is likely to be the change made in 1.79 >> and 1.85. If the problem didn't show up until after the 5.1-RELEASE, >> then the problem could be the changes in 1.87 or 1.88. > > FreeBSD 5.1-CURRENT #1: Thu Jun 5 19:29:29 CEST 2003 > > fifo_vnops.c: > > $FreeBSD: src/sys/fs/fifofs/fifo_vnops.c,v 1.87 2003/06/01 06:24:32 truckman Exp $ Try upgrading to 1.88 and applying this patch: Index: sys/fs/fifofs/fifo_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/fifofs/fifo_vnops.c,v retrieving revision 1.88 diff -u -r1.88 fifo_vnops.c --- sys/fs/fifofs/fifo_vnops.c 13 Jun 2003 06:58:11 -0000 1.88 +++ sys/fs/fifofs/fifo_vnops.c 16 Jun 2003 08:44:20 -0000 @@ -70,7 +70,6 @@ static int fifo_lookup(struct vop_lookup_args *); static int fifo_open(struct vop_open_args *); static int fifo_close(struct vop_close_args *); -static int fifo_inactive(struct vop_inactive_args *); static int fifo_read(struct vop_read_args *); static int fifo_write(struct vop_write_args *); static int fifo_ioctl(struct vop_ioctl_args *); @@ -98,7 +97,6 @@ { &vop_create_desc, (vop_t *) vop_panic }, { &vop_getattr_desc, (vop_t *) vop_ebadf }, { &vop_getwritemount_desc, (vop_t *) vop_stdgetwritemount }, - { &vop_inactive_desc, (vop_t *) fifo_inactive }, { &vop_ioctl_desc, (vop_t *) fifo_ioctl }, { &vop_kqfilter_desc, (vop_t *) fifo_kqfilter }, { &vop_lease_desc, (vop_t *) vop_null }, @@ -556,32 +554,18 @@ if (fip->fi_writers == 0) socantrcvmore(fip->fi_readsock); } - VOP_UNLOCK(vp, 0, td); - return (0); -} - -static int -fifo_inactive(ap) - struct vop_inactive_args /* { - struct vnode *a_vp; - struct thread *a_td; - } */ *ap; -{ - struct vnode *vp = ap->a_vp; - struct fifoinfo *fip = vp->v_fifoinfo; - VI_LOCK(vp); - if (fip != NULL && vp->v_usecount == 0) { + if (vp->v_usecount == 1) { vp->v_fifoinfo = NULL; VI_UNLOCK(vp); (void)soclose(fip->fi_readsock); (void)soclose(fip->fi_writesock); FREE(fip, M_VNODE); - } - VOP_UNLOCK(vp, 0, ap->a_td); + } else + VI_UNLOCK(vp); + VOP_UNLOCK(vp, 0, td); return (0); } - /* * Print out internal contents of a fifo vnode.