Subject: bin/34796: ftp(1) hangs indefinitely on unresponsive servers
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Hauke Fath <hf@spg.tu-darmstadt.de>
List: netbsd-bugs
Date: 10/12/2006 09:20:00
>Number:         34796
>Category:       bin
>Synopsis:       ftp(1) hangs indefinitely on unresponsive servers
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 12 09:20:00 +0000 2006
>Originator:     Hauke Fath <hf@spg.tu-darmstadt.de>
>Release:        NetBSD 3.1_RC3
>Organization:
	
>Environment:
	
	
System: NetBSD Hochstuhl 3.1_RC3 NetBSD 3.1_RC3 (HOCHSTUHL) #1: Wed Sep 20 13:33:13 CEST 2006 hf@Hochstuhl:/var/obj/netbsd-builds/3/i386/sys/arch/i386/compile/HOCHSTUHL i386
Architecture: i386
Machine: i386
>Description:

	There are unresponsive servers that hang the NetBSD ftp(1)
	client to the point where a timeout provided with '-q' will
	not be observed, and the client will not respond to a 'kill
	-HUP'.

	This gets painful during pkgsrc bulk builds because a build
	will hang and require manual intervention.

	I should probably mention that I operated from a subnet behind
	an ipfilter-equipped router.

>How-To-Repeat:

	From a recent build:

[hf@Hochstuhl] ~ > date
Wed Oct 11 16:26:26 CEST 2006
[hf@Hochstuhl] ~ > ps au | grep 'f\tp'
root 17384  0.0  0.1   420 1012 ttyp5 I+    3:08PM 0:00.00 /usr/bin/ftp -4 -q300 http://raburton.lunarpages.com/apache/mod_auth_cookie/13/mod_auth_cookie.c
root 27416  0.0  0.1   144  728 ttyp5 I+    3:08PM 0:00.00 /bin/sh -c set -e;\t\t\t\t unsorted_sites="http://raburton.lunarpages.com/apache/mod_auth_cookie/13/ http://ftp.f
[hf@Hochstuhl] ~ >

	Invoking the above transfer manually gives the same result,
	but ftp(1) then responds to a HUP signal, other than in the
	bulk build. While the above is a http transfer, I have seen
	hangs with unresponsive ftp servers, too. Invoking 'ftp -d'
	does not give any helpful information.
	
>Fix:
	Unknown to me.

>Unformatted: