From owner-freebsd-hackers Fri Jul 23 23:56: 5 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (Postfix) with ESMTP id 342AA14E53 for ; Fri, 23 Jul 1999 23:56:01 -0700 (PDT) (envelope-from crossd@cs.rpi.edu) Received: from cs.rpi.edu (phoenix.cs.rpi.edu [128.113.96.153]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id CAA05968 for ; Sat, 24 Jul 1999 02:55:47 -0400 (EDT) Message-Id: <199907240655.CAA05968@cs.rpi.edu> To: freebsd-hackers@freebsd.org Subject: mbuf leak found... for real this time. Date: Sat, 24 Jul 1999 02:55:45 -0400 From: "David E. Cross" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I found it... our favorite function... nfsrv_create()!!! :) The problem was/is a create of an already existing file (with O_EXCL|O_CREATE, I would bet, but I don't have anyway to tell) returns *nothing* to the sender. The last time I had this problem it was because nfsrv_create() was not clearing error before its return (signalling to the caller that there was a more severe error and the packet should not be responded to. I have looked through the code, and arround line 1759 there should be a "goto nfsmreply0". Clearly we need to set error to 0 before we depart from this function with this kind of condition, I am just not sure the 'correct' way to do it. Any-who, I am not able to reproduce this reliably since the OS (all OS's I have tried, including the troubled machine) issue a getattr() to see if the file exists as a first stage, not even attempting the create call for the first try. This looks like a race condition waiting for us to loose it. As another aside... I really do think that on returning with an error condition, it may be a good idea to free those mbuf/mbuf-clusters. I cannot see a reason to keep them lying arround. -- David Cross | email: crossd@cs.rpi.edu Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message