Bug in SUN Kernel RPC

Doug Kingston dpk at BRL.ARPA
Wed Dec 17 12:01:41 AEST 1986


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);
  }
  
  /*



More information about the Comp.unix.wizards mailing list