FIN_WAIT_2 Warning: JSQ \"fix\" bad!

Mike Muuss mike at brl-tgr
Wed Apr 24 14:15:26 AEST 1985


The recently re-posted John Quarterman "fix" for hanging FIN_WAIT_2
connections is *bad*, in a subtle and dangerous way.  We had it installed
for several weeks before we noticed why it was bad.  I have commented
on the list before about this, but it is worth repeating.

A connection may operate correctly in FIN_WAIT_2 state forever.
A good example of this is the following command line:

	rsh tgr batchnews < /dev/null | unbatchnews

The RSH will sense EOF on stdin immediately, and do an advisory
close on the TCP connection *TO* machine "tgr", yet data will continue
to flow *FROM* machine "tgr" for hours.  This connection operates
in FIN_WAIT_2 state the whole time -- THIS IS CORRECT FUNCTION.

If you choose to install JSQ's fix anyways, just remember that
any RSH that you run from a shell file had better run quickly
(ie, within the FIN_WAIT_2 timeout you pick), or the connection
will be broken for you.

Best,
 -Mike Muuss



More information about the Comp.unix.wizards mailing list