Date: Tue, 10 Feb 2004 10:56:04 +0100 From: Frode Nordahl <frode@nordahl.net> To: "Andrew P. Lentvorski, Jr." <bsder@allcaps.org> Cc: current@freebsd.org Subject: Re: rpc.lockd(8) seg faults on 5.2-RELEASE (patch, workaround) Message-ID: <56C69560-5BAF-11D8-A6E1-000A95A9A574@nordahl.net> In-Reply-To: <20040205231849.D41237@mail.allcaps.org> References: <0703C4CC-5805-11D8-951F-000A95A9A574@nordahl.net> <20040205231849.D41237@mail.allcaps.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail-2--684483692 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Hello, This is not a sollution, but I have run with this workaround since friday without incident. I think there are two problems: - freed items are sometimes not removed from the nfslocklist - first element in blockedlocklist sometimes get wrong, causing a infinite loop in retry_blockingfilelocklist() Mvh, Frode --Apple-Mail-2--684483692 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="rpc.lockd.patch" Content-Disposition: attachment; filename=rpc.lockd.patch diff -ru rpc.lockd/lockd_lock.c rpc.lockd.patched/lockd_lock.c --- rpc.lockd/lockd_lock.c Sun Oct 26 07:10:44 2003 +++ rpc.lockd.patched/lockd_lock.c Tue Feb 10 10:46:41 2004 @@ -385,7 +385,7 @@ if (newfl == NULL) { return NULL; } - bzero(newfl, sizeof(newfl)); + bzero(newfl, sizeof(*newfl)); newfl->client.oh.n_bytes = malloc(lockowner->n_len); if (newfl->client.oh.n_bytes == NULL) { @@ -438,6 +438,7 @@ void deallocate_file_lock(struct file_lock *fl) { + LIST_REMOVE(fl, nfslocklist); free(fl->client.oh.n_bytes); free(fl->client_cookie.n_bytes); free(fl); @@ -1246,6 +1247,12 @@ * current element has been moved */ nfl = LIST_NEXT(ifl, nfslocklist); + + if (nfl == ifl) { + debuglog("nfl == ifl, resetting nfl\n"); + nfl = NULL; + } + debuglog("Iterator choice %p\n",ifl); debuglog("Prev iterator choice %p\n",pfl); debuglog("Next iterator choice %p\n",nfl); @@ -2152,7 +2159,7 @@ static struct nlm4_res retval4; debuglog("About to send granted on blocked lock\n"); - sleep(1); + sleep(debugdelay); debuglog("Blowing off return send\n"); cli = get_client(fl->addr, --Apple-Mail-2--684483692 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On Feb 6, 2004, at 08:21, Andrew P. Lentvorski, Jr. wrote: > On Thu, 5 Feb 2004, Frode Nordahl wrote: > >> I also found this in send_granted(): lockd_lock.c:2161 >> >> debuglog("About to send granted on blocked lock\n"); >> sleep(1); >> debuglog("Blowing off return send\n"); >> >> Anyone know what sleep(1) is good for here? > > The sleep() statements near debuglog() stuff are to work around the > fact > that syslog has bugs where it arbitrarily and randomly eats messages > when > you start sending too much data at it too quickly. > > By slowing down the logging, all of the messages get recorded. > > -a > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org" --Apple-Mail-2--684483692--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56C69560-5BAF-11D8-A6E1-000A95A9A574>