From owner-freebsd-stable@FreeBSD.ORG Mon Mar 6 22:43:41 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C576816A420 for ; Mon, 6 Mar 2006 22:43:41 +0000 (GMT) (envelope-from kuriyama@imgsrc.co.jp) Received: from black.imgsrc.co.jp (black.imgsrc.co.jp [210.226.20.147]) by mx1.FreeBSD.org (Postfix) with ESMTP id D879443D6A for ; Mon, 6 Mar 2006 22:43:40 +0000 (GMT) (envelope-from kuriyama@imgsrc.co.jp) Received: from localhost (localhost [127.0.0.1]) by black.imgsrc.co.jp (Postfix) with ESMTP id CDAC850858 for ; Tue, 7 Mar 2006 07:43:39 +0900 (JST) Received: from pink.imgsrc.co.jp (pink.imgsrc.co.jp [210.226.20.36]) by black.imgsrc.co.jp (Postfix) with ESMTP id E4DF45085E for ; Tue, 7 Mar 2006 07:43:37 +0900 (JST) Date: Tue, 07 Mar 2006 07:43:37 +0900 Message-ID: <7mveururc6.wl%kuriyama@imgsrc.co.jp> From: Jun Kuriyama To: stable@freebsd.org User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd 0.1 Cc: Subject: rpc.lockd brokenness (2) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 22:43:41 -0000 I'm not yet received enough information to track rpc.lockd problem. As Kris posted before, here is a patch to backout my suspected commit. If someone can easily reproduce this problem, please try with this patch on both of server/client side of rpc.lockd (I'm not sure which of server/client side this affects). http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/80389 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/84953 Any reports about this patch (OK or still problem) are welcome! Index: lock_proc.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/rpc.lockd/lock_proc.c,v retrieving revision 1.18 retrieving revision 1.17 diff -u -r1.18 -r1.17 --- lock_proc.c 3 Feb 2005 22:21:19 -0000 1.18 +++ lock_proc.c 9 Oct 2004 15:36:13 -0000 1.17 @@ -62,8 +62,6 @@ #define CLIENT_CACHE_SIZE 64 /* No. of client sockets cached */ #define CLIENT_CACHE_LIFETIME 120 /* In seconds */ -#define getrpcaddr(rqstp) (struct sockaddr *)(svc_getrpccaller((rqstp)->rq_xprt)->buf) - static void log_from_addr(const char *, struct svc_req *); static void log_netobj(netobj *obj); static int addrcmp(struct sockaddr *, struct sockaddr *); @@ -196,7 +194,7 @@ { CLIENT *client; struct timeval retry_time, time_now; - int error, i; + int i; const char *netid; struct netconfig *nconf; char host[NI_MAXHOST]; @@ -243,11 +241,9 @@ * Need a host string for clnt_tp_create. Use NI_NUMERICHOST * to avoid DNS lookups. */ - error = getnameinfo(host_addr, host_addr->sa_len, host, sizeof host, - NULL, 0, NI_NUMERICHOST); - if (error != 0) { - syslog(LOG_ERR, "unable to get name string for caller: %s", - gai_strerror(error)); + if (getnameinfo(host_addr, host_addr->sa_len, host, sizeof host, + NULL, 0, NI_NUMERICHOST) != 0) { + syslog(LOG_ERR, "unable to get name string for caller"); return NULL; } @@ -566,7 +562,8 @@ res.cookie = arg->cookie; res.stat.stat = getlock(&arg4, rqstp, LOCK_ASYNC | LOCK_MON); - transmit_result(NLM_LOCK_RES, &res, getrpcaddr(rqstp)); + transmit_result(NLM_LOCK_RES, &res, + (struct sockaddr *)svc_getcaller(rqstp->rq_xprt)); return (NULL); } @@ -620,7 +617,8 @@ * a lock to cancel, so this call always fails. */ res.stat.stat = unlock(&arg4, LOCK_CANCEL); - transmit_result(NLM_CANCEL_RES, &res, getrpcaddr(rqstp)); + transmit_result(NLM_CANCEL_RES, &res, + (struct sockaddr *)svc_getcaller(rqstp->rq_xprt)); return (NULL); } @@ -667,7 +665,8 @@ res.stat.stat = unlock(&arg4, 0); res.cookie = arg->cookie; - transmit_result(NLM_UNLOCK_RES, &res, getrpcaddr(rqstp)); + transmit_result(NLM_UNLOCK_RES, &res, + (struct sockaddr *)svc_getcaller(rqstp->rq_xprt)); return (NULL); } @@ -724,7 +723,8 @@ nlm_granted, NULL, NLM_VERS) == 0 ? nlm_granted : nlm_denied; - transmit_result(NLM_GRANTED_RES, &res, getrpcaddr(rqstp)); + transmit_result(NLM_GRANTED_RES, &res, + (struct sockaddr *)svc_getcaller(rqstp->rq_xprt)); return (NULL); } @@ -1067,7 +1067,8 @@ res.cookie = arg->cookie; res.stat.stat = getlock(arg, rqstp, LOCK_MON | LOCK_ASYNC | LOCK_V4); - transmit4_result(NLM4_LOCK_RES, &res, getrpcaddr(rqstp)); + transmit4_result(NLM4_LOCK_RES, &res, + (struct sockaddr *)svc_getcaller(rqstp->rq_xprt)); return (NULL); } @@ -1115,7 +1116,8 @@ * a lock to cancel, so this call always fails. */ res.stat.stat = unlock(&arg->alock, LOCK_CANCEL | LOCK_V4); - transmit4_result(NLM4_CANCEL_RES, &res, getrpcaddr(rqstp)); + transmit4_result(NLM4_CANCEL_RES, &res, + (struct sockaddr *)svc_getcaller(rqstp->rq_xprt)); return (NULL); } @@ -1156,7 +1158,8 @@ res.stat.stat = unlock(&arg->alock, LOCK_V4); res.cookie = arg->cookie; - transmit4_result(NLM4_UNLOCK_RES, &res, getrpcaddr(rqstp)); + transmit4_result(NLM4_UNLOCK_RES, &res, + (struct sockaddr *)svc_getcaller(rqstp->rq_xprt)); return (NULL); } @@ -1212,7 +1215,8 @@ res.stat.stat = lock_answer(arg->alock.svid, &arg->cookie, nlm4_granted, NULL, NLM_VERS4) == 0 ? nlm4_granted : nlm4_denied; - transmit4_result(NLM4_GRANTED_RES, &res, getrpcaddr(rqstp)); + transmit4_result(NLM4_GRANTED_RES, &res, + (struct sockaddr *)svc_getrpccaller(rqstp->rq_xprt)->buf); return (NULL); } -- Jun Kuriyama // IMG SRC, Inc. // FreeBSD Project