From owner-freebsd-hackers Fri Jun 4 13:26: 4 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 D33E115205 for ; Fri, 4 Jun 1999 13:26:00 -0700 (PDT) (envelope-from crossd@cs.rpi.edu) Received: from cs.rpi.edu (crossd@vacuum.cs.rpi.edu [128.213.8.25]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id QAA56354; Fri, 4 Jun 1999 16:25:56 -0400 (EDT) Message-Id: <199906042025.QAA56354@cs.rpi.edu> To: Greg Black Cc: "David E. Cross" , freebsd-hackers@FreeBSD.ORG, crossd@cs.rpi.edu Subject: Re: 3.2-stable, panic #12 In-Reply-To: Message from Greg Black of "Fri, 04 Jun 1999 19:18:56 +1000." <19990604091857.25082.qmail@alice.gba.oz.au> Date: Fri, 04 Jun 1999 16:25:54 -0400 From: "David E. Cross" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > fd=open(argv[1], O_CREAT, 600); > > Since this opens the file so that it cannot be written to, not > to mention the really weird mode it will get if it's created by > that open(), the rest of the thing doesn't deserve to work. > > Generally speaking, it's a good idea to make sure that test code > is at least decent before starting to puzzle over what it does. The code does exactly what it is supposed to. The "600" was a typo that should be "0600". If it makes you feel better s/O_CREAT/O_CREAT|O_RDWR/; the results are the same, the server crashes with a lockmgr: locking against myself panic, a panic that we have seen !13! times in the past 10 days. I would certainly hope and expect it to work (what do you know, it does), considering "the rest" is a simple unlink of the file that _I_ just created. I do not understand why you believe it "does not deserve to work". The ONLY purpose of this code was to create a regular file, unlink it, and then create it again as quickly as possible under the same name. For this purpose the mode is irrelevant, and the R/W status of the FD is irrelevant; the code fulfills its purpose, and in doing so exhibits the aforementioned bug. Generally speaking, you should test the code to see if it works as advertised before trying to fix it. Did this code crash your system when run from 2 solaris 2.6 machines? -- 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