Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jan 2018 13:09:37 +0100
From:      Matthias Apitz <guru@unixarea.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: fetch is waiting on input on stdin
Message-ID:  <20180112120937.GA14731@c720-r314251>
In-Reply-To: <20180112084556.GA13812@c720-r314251>
References:  <20180112084556.GA13812@c720-r314251>

next in thread | previous in thread | raw e-mail | index | archive | help

--lrZ03NoBR/3+SXJZ
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

El d=C3=ADa viernes, enero 12, 2018 a las 09:45:56a. m. +0100, Matthias Api=
tz escribi=C3=B3:

>=20
> Hello,
>=20
> This is on:
>=20
> FreeBSD c720-r314251 12.0-CURRENT FreeBSD 12.0-CURRENT #1 r314251M: Fri J=
un 30 08:50:03 CEST 2017     guru@c720-r314251:/usr/obj/usr/src/sys/GENERIC=
  amd64
>=20
> Yesterday I was building some port which fetches the disfiles like this
> command:
>=20
>=20
> # fetch ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/eclipse.org/to=
ols/cdt/releases/9.0/sr1/features/org.eclipse.cdt.msw_9.0.1.201607151550.jar
>=20
> The fetch was hanging for ever. My first thinking was DNS, but then I mon=
itored
> the fetch cmd with truss(1) and saw, that it was awaiting STDIN input.
>=20
> Only using 'make < /dev/null' was able to fetch all the distfiles. Is
> this something new or some bug?
>=20

I have here the relevant part of the sys calls:

- connect to port 21
- FTP server sends greeting
- fetch reads from stdin until EOF seen
- fetch sends FTP login and password

connect(3,{ AF_INET 137.226.34.227:21 },16)	 =3D 0 (0x0)
fcntl(3,F_SETFD,FD_CLOEXEC)			 =3D 0 (0x0)
setsockopt(0x3,0xffff,0x800,0x7fffffffdc7c,0x4)	 =3D 0 (0x0)
read(3,"2",1)					 =3D 1 (0x1)
read(3,"2",1)					 =3D 1 (0x1)
read(3,"0",1)					 =3D 1 (0x1)
read(3," ",1)					 =3D 1 (0x1)
read(3,"W",1)					 =3D 1 (0x1)
read(3,"e",1)					 =3D 1 (0x1)
read(3,"l",1)					 =3D 1 (0x1)
read(3,"c",1)					 =3D 1 (0x1)
read(3,"o",1)					 =3D 1 (0x1)
read(3,"m",1)					 =3D 1 (0x1)
read(3,"e",1)					 =3D 1 (0x1)
read(3," ",1)					 =3D 1 (0x1)
read(3,"t",1)					 =3D 1 (0x1)
read(3,"o",1)					 =3D 1 (0x1)
read(3," ",1)					 =3D 1 (0x1)
read(3,"S",1)					 =3D 1 (0x1)
read(3,"u",1)					 =3D 1 (0x1)
read(3,"n",1)					 =3D 1 (0x1)
read(3,"S",1)					 =3D 1 (0x1)
read(3,"I",1)					 =3D 1 (0x1)
read(3,"T",1)					 =3D 1 (0x1)
read(3,"E",1)					 =3D 1 (0x1)
read(3," ",1)					 =3D 1 (0x1)
read(3,"C",1)					 =3D 1 (0x1)
read(3,"E",1)					 =3D 1 (0x1)
read(3,"U",1)					 =3D 1 (0x1)
read(3,"R",1)					 =3D 1 (0x1)
read(3,"\r",1)					 =3D 1 (0x1)
read(3,"\n",1)					 =3D 1 (0x1)
fcntl(0,F_GETFL,)				 =3D 2 (0x2)
fstat(0,{ mode=3Dcrw--w---- ,inode=3D96,size=3D0,blksize=3D4096 }) =3D 0 (0=
x0)
ioctl(0,TIOCGETA,0xffffd660)			 =3D 0 (0x0)
lseek(0,0x0,SEEK_SET)				 =3D 0 (0x0)
read(0,0x801a85000,4096)			 =3D 0 (0x0)
close(0)					 =3D 0 (0x0)
poll({ 3/POLLOUT|POLLERR },1,100000)		 =3D 1 (0x1)
writev(0x3,0x7fffffffdb50,0x2)			 =3D 16 (0x10)  (USER anonymous\r\n)
read(3,"3",1)					 =3D 1 (0x1)
read(3,"3",1)					 =3D 1 (0x1)
read(3,"1",1)					 =3D 1 (0x1)
read(3," ",1)					 =3D 1 (0x1)
read(3,"P",1)					 =3D 1 (0x1)
read(3,"l",1)					 =3D 1 (0x1)
read(3,"e",1)					 =3D 1 (0x1)
read(3,"a",1)					 =3D 1 (0x1)
read(3,"s",1)					 =3D 1 (0x1)
read(3,"e",1)					 =3D 1 (0x1)
read(3," ",1)					 =3D 1 (0x1)
read(3,"s",1)					 =3D 1 (0x1)
read(3,"p",1)					 =3D 1 (0x1)
read(3,"e",1)					 =3D 1 (0x1)
read(3,"c",1)					 =3D 1 (0x1)
read(3,"i",1)					 =3D 1 (0x1)
read(3,"f",1)					 =3D 1 (0x1)
read(3,"y",1)					 =3D 1 (0x1)
read(3," ",1)					 =3D 1 (0x1)
read(3,"t",1)					 =3D 1 (0x1)
read(3,"h",1)					 =3D 1 (0x1)
read(3,"e",1)					 =3D 1 (0x1)
read(3," ",1)					 =3D 1 (0x1)
read(3,"p",1)					 =3D 1 (0x1)
read(3,"a",1)					 =3D 1 (0x1)
read(3,"s",1)					 =3D 1 (0x1)
read(3,"s",1)					 =3D 1 (0x1)
read(3,"w",1)					 =3D 1 (0x1)
read(3,"o",1)					 =3D 1 (0x1)
read(3,"r",1)					 =3D 1 (0x1)
read(3,"d",1)					 =3D 1 (0x1)
read(3,".",1)					 =3D 1 (0x1)
read(3,"\r",1)					 =3D 1 (0x1)
read(3,"\n",1)					 =3D 1 (0x1)
getlogin(0x800ddfa10,0x21)			 =3D 0 (0x0)
__sysctl(0x7fffffffdc90,0x2,0x7fffffffdd65,0x7fffffffdc88,0x0,0x0) =3D 0 (0=
x0)
poll({ 3/POLLOUT|POLLERR },1,100000)		 =3D 1 (0x1)
writev(0x3,0x7fffffffdb50,0x2)			 =3D 25 (0x19)  (PASS guru@r314251-amd64\r=
\n)
read(3,"2",1)					 =3D 1 (0x1)
read(3,"3",1)					 =3D 1 (0x1)
read(3,"0",1)					 =3D 1 (0x1)
read(3," ",1)					 =3D 1 (0x1)
read(3,"L",1)					 =3D 1 (0x1)
read(3,"o",1)					 =3D 1 (0x1)
read(3,"g",1)					 =3D 1 (0x1)
read(3,"i",1)					 =3D 1 (0x1)
read(3,"n",1)					 =3D 1 (0x1)
read(3," ",1)					 =3D 1 (0x1)
read(3,"s",1)					 =3D 1 (0x1)
read(3,"u",1)					 =3D 1 (0x1)
read(3,"c",1)					 =3D 1 (0x1)
read(3,"c",1)					 =3D 1 (0x1)
read(3,"e",1)					 =3D 1 (0x1)
read(3,"s",1)					 =3D 1 (0x1)
read(3,"s",1)					 =3D 1 (0x1)
read(3,"f",1)					 =3D 1 (0x1)
read(3,"u",1)					 =3D 1 (0x1)
read(3,"l",1)					 =3D 1 (0x1)
read(3,".",1)					 =3D 1 (0x1)
read(3,"\r",1)					 =3D 1 (0x1)
read(3,"\n",1)					 =3D 1 (0x1)


--=20
Matthias Apitz, =E2=9C=89 guru@unixarea.de, =E2=8C=82 http://www.unixarea.d=
e/  =F0=9F=93=B1 +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

--lrZ03NoBR/3+SXJZ
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEXmn7rBYYViyzy/vBR8z35Hb+nREFAlpYpX4ACgkQR8z35Hb+
nRFoSBAAoFBLX55gq153hzMphrzMYFQE57NHPJePl0HOREl8FxS/o+kW4iez/U4h
zj3LdqDWZi602jit0AhdDWvcTLxbjA23o0rgDhwUR2rG7cX8IziHF60O3JGxIG+I
K10WrHbWBQtsupviK3mom2gy/q1H0rE0rWqZcCX2oSES96B90OGGQv5oDCDfyyFx
da2/6rVG6Wf0wZQkNFEdrryox/6P4ryNuYblC0HOIPUns2A10VOogEIzDYnfVm+w
XSjzaTQmCEHopcEavb/NJ7qmhS3qZKncPy4oqH0diPFpT1AGSMiuLrDXQNIdCnvE
nyo7DWW6zYsmqE5+Zn9lvEvtohcWK7TacDENNj02My0RuZyiRgP5XNceg3pXBVjx
1Wv7hbsdH6GfcTa9AttL3VJkAHEhwUVbTNvxgZSAt63ZPe1GLImVF9/zokB7jQnq
duhBftM0dWXQdT4ig+Arx9ypFjhDXKLkl782Rtylwm0eWK9Mv2JUrFfqFOMmy0tv
UkeEYaBqZSpjxPAWRL/xnmdbGgYqgPO1PH7FY/h/vaTJaIgNz+x7tt/XXWLxKB4e
dpXysxjqwtfbzLEP9kocQ6J/7dOwycn5ARveNcx9h7Npi69mhVtHVsD6FBS7STaE
X0fCJVDxVjhYWmyIA8JArmDjPcRWuLxqBpipLX8pyWjvyebO9zU=
=ejNJ
-----END PGP SIGNATURE-----

--lrZ03NoBR/3+SXJZ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180112120937.GA14731>