Date: Sat, 24 Jul 1999 02:55:45 -0400 From: "David E. Cross" <crossd@cs.rpi.edu> To: freebsd-hackers@freebsd.org Subject: mbuf leak found... for real this time. Message-ID: <199907240655.CAA05968@cs.rpi.edu>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907240655.CAA05968>