Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!brl-adm!adm!dpk@BRL.ARPA
From: dpk@BRL.ARPA (Doug Kingston)
Newsgroups: comp.unix.wizards
Subject: Bug in SUN Kernel RPC
Message-ID: <1601@brl-adm.ARPA>
Date: Tue, 16-Dec-86 21:01:41 EST
Article-I.D.: brl-adm.1601
Posted: Tue Dec 16 21:01:41 1986
Date-Received: Wed, 17-Dec-86 20:18:28 EST
Sender: news@brl-adm.ARPA
Lines: 45

Index:  sys/rpc/clnt_kudp.c  FIX  (Gould version and others?)

Description:
	The SUN kernel mode RPC can hang while doing remote
RPC that should timeout.  An example is NFS when you remote
mount a filesystem "soft".  Some RPC's to this filesystem
will hang.  Mount is one such RPC.

	This problem was found in our Gould kernels which contain
code almost identical to the SUN code.  I know some other vendors
using this code also have the problem.

	Specifically, the problem is that the function clntkudp_callit
does a sleep on &so->so_rcv.sb_cc.  The timeout routine, ckuwakeup(),
had an incorrect wakeup value which is corrected below.

Repeat By:
	Edit /etc/fstab to remote mount a filesystem.
	Shutdown the remote system.
	Reboot the your system.
	Watch your system hang when it attemps to mount
		the NFS filesystems.

Fix:
	Apply the following diff:

*** /tmp/,RCSt1016522	Tue Dec 16 20:37:15 1986
--- clnt_kudp.c	Mon Dec  8 22:34:48 1986
***************
*** 498,504 ****
  	rpc_debug(4, "cku_timeout\n");
  #endif
  	p->cku_flags |= CKU_TIMEDOUT;
! 	sbwakeup(&p->cku_sock->so_rcv);
  }
  
  /*
--- 498,504 ----
  	rpc_debug(4, "cku_timeout\n");
  #endif
  	p->cku_flags |= CKU_TIMEDOUT;
! 	sbwakeup(&p->cku_sock->so_rcv.sb_cc);
  }
  
  /*