Subject: lib/2939: yp temporary failures are too noisy
To: None <gnats-bugs@gnats.netbsd.org>
From: Arne H. Juul <arnej@pvv.ntnu.no>
List: netbsd-bugs
Date: 11/14/1996 22:29:58
>Number: 2939
>Category: lib
>Synopsis: yp temporary failures are too noisy
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lib-bug-people (Library Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 14 13:35:00 1996
>Last-Modified:
>Originator: Arne H Juul
>Organization:
Norwegian University of Technology and Science
>Release: 1.2
>Environment:
System: NetBSD dvask.pvv.ntnu.no 1.2 NetBSD 1.2 (DVASK) #1: Thu Oct 24 19:32:42 MET DST 1996 arnej@dvask.pvv.ntnu.no:/usr/src/sys/arch/vax/compile/DVASK vax
>Description:
Quite often (maybe a couple of times per day) I get mail from
a couple of NetBSD boxen saying something very much like:
From root@pvv.ntnu.no Thu Nov 14 21:00:25 MET 1996
Date: Thu, 14 Nov 1996 21:00:17 +0100 (MET)
From: root@pvv.ntnu.no (Cron Daemon)
To: root@pvv.ntnu.no
Subject: Cron <root@dvask> /usr/libexec/atrun
yp_next: clnt_call: RPC: Timed out
The problem is that a temporary YP failure always gives
a warning, but probably you just want to retry silently at
least a couple of times.
>How-To-Repeat:
Run a NetBSD machine as an YP client in any normally busy
network.
>Fix:
Proposed patch follows which may not be accourding to
NetBSD style guide:
--- src/lib/libc/yp/yp_first.c.orig Sun May 26 13:26:00 1996
+++ src/lib/libc/yp/yp_first.c Thu Nov 14 22:18:42 1996
@@ -118,7 +118,8 @@
struct ypresp_key_val yprkv;
struct ypreq_key yprk;
struct dom_binding *ysd;
- int r;
+ int r;
+ int ccretries = 0;
if (indomain == NULL || *indomain == '\0'
|| strlen(indomain) > YPMAXDOMAIN)
@@ -144,7 +145,11 @@
xdr_ypreq_key, &yprk, xdr_ypresp_key_val, &yprkv,
_yplib_timeout);
if (r != RPC_SUCCESS) {
- clnt_perror(ysd->dom_client, "yp_next: clnt_call");
+ if ((++ccretries % 4)==0) {
+ char buf[38];
+ snprintf(buf, 38, "yp_next: (%d retries) clnt_call", ccretries);
+ clnt_perror(ysd->dom_client, buf);
+ }
ysd->dom_vers = -1;
goto again;
}
>Audit-Trail:
>Unformatted: