From owner-freebsd-stable@FreeBSD.ORG Fri Jan 1 17:09:14 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50BAE106566C for ; Fri, 1 Jan 2010 17:09:14 +0000 (UTC) (envelope-from usselmann.m@icg-online.de) Received: from oslo074.server4you.de (oslo074.server4you.de [62.75.178.74]) by mx1.freebsd.org (Postfix) with ESMTP id 6E7438FC1F for ; Fri, 1 Jan 2010 17:09:13 +0000 (UTC) Received: (qmail 21370 invoked from network); 1 Jan 2010 18:09:12 +0100 Received: from p54b26d87.dip.t-dialin.net (HELO icg-pc209.icg-pc213) (84.178.109.135) by oslo074.server4you.de with SMTP; 1 Jan 2010 18:09:12 +0100 Date: Fri, 1 Jan 2010 18:09:11 +0100 From: Manfred Usselmann To: David Horn Message-Id: <20100101180911.beb6ca1e.usselmann.m@icg-online.de> In-Reply-To: <25ff90d61001010712r28f68ddeyd1fb1164be0c9091@mail.gmail.com> References: <20091213103237.d01b51f2.usselmann.m@icg-online.de> <25ff90d60912132123x77198b1o6bfad3bffe0d01a0@mail.gmail.com> <20091214081716.f6e96b85.usselmann.m@icg-online.de> <20091214233123.a5b178c2.usselmann.m@icg-online.de> <25ff90d60912141451y50137b09qa2d5c380093dd8d5@mail.gmail.com> <20100101152827.8eabdf9e.usselmann.m@icg-online.de> <25ff90d61001010712r28f68ddeyd1fb1164be0c9091@mail.gmail.com> Organization: ICG IT Consulting GmbH X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.3; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Fri__1_Jan_2010_18_09_11_+0100_Ntfn9Tqbi86c7cbV" Cc: freebsd-stable@freebsd.org Subject: Re: duplicity ftp backup / ncftp no longer working since 8.0-Release X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2010 17:09:14 -0000 This is a multi-part message in MIME format. --Multipart=_Fri__1_Jan_2010_18_09_11_+0100_Ntfn9Tqbi86c7cbV Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, 1 Jan 2010 10:12:41 -0500 David Horn wrote: > On Fri, Jan 1, 2010 at 9:28 AM, Manfred Usselmann > wrote: > > On Mon, 14 Dec 2009 17:51:31 -0500 > > David Horn wrote: > > > >> On Mon, Dec 14, 2009 at 5:31 PM, Manfred Usselmann > >> wrote: > >> > On Mon, 14 Dec 2009 08:17:16 +0100 > >> > Manfred Usselmann wrote: > >> > > >> >> On Mon, 14 Dec 2009 00:23:17 -0500 > >> >> David Horn wrote: > >> >> > >> >> > I believe that there is something unusual going on with the check= ing > >> >> > on select() return in ncftp3. =A0If you change every instance of > >> >> > select() result checking in ftp/ncftp3 from "=3D=3D1" to ">=3D1" = the problem > >> >> > seems to go away. > >> >> > > >> >> > result =3D select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL, > >> >> > SELECT_TYPE_ARG5 &tv); > >> >> > -if (result =3D=3D 1) { > >> >> > +if (result >=3D 1) { > >> >> > >> >> I will try this. > >> > > >> > Did work for me! > >> > > >> > Thanks, > >> > Manfred > >> > >> OK. =A0 I will try to report it to the upstream (ncftp.com/contact), a= nd > >> failing that we could always patch as part of the ncftp 3.2.3 update > >> into freebsd ports, but glad to hear it worked for you. > > > > The port has been updated to 3.2.3 but without a fix. > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D140934 mentions a fix to > > FreeBSD 8 which sounds like it should have solved our issue. Don't know > > why it didn't. > > > > Regards, > > Manfred > > >=20 > 3.2.3 of ncftp was released by the vendor in July 2009 > (http://www.ncftp.org/), so it would not have yet incorporated the > select() result checking changes. >=20 > I reported the issue to ncftp, and they acknowledged the issue. I can > only assume that it will be addressed in the next vendor release > (3.2.4 ?) The obrien change was a patch to the freebsd ncftp port > (3.2.2) for the same issue, but only on one of the select() instances > (not all of them). >=20 > http://www.freebsd.org/cgi/cvsweb.cgi/ports/ftp/ncftp3/files/Attic/patch-= SConnect.c >=20 > The obrien commit was since reverted for 3.2.3 since the vendor > included the one instance of select() result checking in the base > code. >=20 > So, long story short, you still need to manually patch the source of > ncftp until either >=20 > A) Vendor updates base code (or) > B) Someone submits a patch to the freebsd port of ftp/ncftp3 (3.2.3) >=20 > If you are really concerned about it, create an official patch (use > diff -u) and attach it to your bug report. Bug reports with patches > are much more likely to see action. >=20 > If you are having issues creating a patch let me know and I will try > to find the time to do this in the next week or so. (ENOTIME) Thanks a lot for the detailed explanation! Since the vendor acknowledged the issue I'm fine with waiting until the next version to see if an official fix is included. Nevertheless I have created the attached patch.=20 Thanks, Manfred --=20 Manfred Usselmann ICG IT Consulting GmbH, Kelkheim --Multipart=_Fri__1_Jan_2010_18_09_11_+0100_Ntfn9Tqbi86c7cbV Content-Type: text/plain; name="ncftp323_patch.txt" Content-Disposition: attachment; filename="ncftp323_patch.txt" Content-Transfer-Encoding: 7bit diff -ur ncftp-3.2.3/autoconf_local/aclocal.m4 ncftp-3.2.3.fixed/autoconf_local/aclocal.m4 --- ncftp-3.2.3/autoconf_local/aclocal.m4 2009-07-28 16:45:58.000000000 +0200 +++ ncftp-3.2.3.fixed/autoconf_local/aclocal.m4 2009-12-14 14:00:45.000000000 +0100 @@ -4326,7 +4326,7 @@ for (;;) { ss = ss2; nready = select(fd + 1, &ss, NULL, NULL, &tleft); - if (nready == 1) + if (nready >= 1) break; if (nready < 0) { if (errno != EINTR) { diff -ur ncftp-3.2.3/configure ncftp-3.2.3.fixed/configure --- ncftp-3.2.3/configure 2009-07-28 17:01:30.000000000 +0200 +++ ncftp-3.2.3.fixed/configure 2009-12-14 14:01:58.000000000 +0100 @@ -10010,7 +10010,7 @@ for (;;) { ss = ss2; nready = select(fd + 1, &ss, NULL, NULL, &tleft); - if (nready == 1) + if (nready >= 1) break; if (nready < 0) { if (errno != EINTR) { diff -ur ncftp-3.2.3/libncftp/io_util.c ncftp-3.2.3.fixed/libncftp/io_util.c --- ncftp-3.2.3/libncftp/io_util.c 2005-01-01 22:30:04.000000000 +0100 +++ ncftp-3.2.3.fixed/libncftp/io_util.c 2009-12-14 14:07:48.000000000 +0100 @@ -192,7 +192,7 @@ tv.tv_sec = 1; tv.tv_usec = 0; result = select(fd + 1, SELECT_TYPE_ARG234 &ss, NULL, SELECT_TYPE_ARG234 &ss2, &tv); - if (result == 1) { + if (result >= 1) { /* ready */ cip->stalled = 0; return (1); @@ -271,7 +271,7 @@ tv.tv_sec = 1; tv.tv_usec = 0; result = select(fd + 1, NULL, SELECT_TYPE_ARG234 &ss, SELECT_TYPE_ARG234 &ss2, &tv); - if (result == 1) { + if (result >= 1) { /* ready */ cip->stalled = 0; return (1); diff -ur ncftp-3.2.3/libncftp/ncftp.h ncftp-3.2.3.fixed/libncftp/ncftp.h --- ncftp-3.2.3/libncftp/ncftp.h 2009-07-23 22:20:53.000000000 +0200 +++ ncftp-3.2.3.fixed/libncftp/ncftp.h 2009-12-14 14:19:31.000000000 +0100 @@ -772,9 +772,9 @@ /* The following block may be changed by configure script */ #ifndef Stat -#define Stat stat /* set by configure at 2009-07-23 15:20:53 */ -#define Lstat lstat /* set by configure at 2009-07-23 15:20:53 */ -#define Fstat fstat /* set by configure at 2009-07-23 15:20:53 */ +#define Stat stat +#define Lstat lstat +#define Fstat fstat #endif #define kFtwNoAutoGrowButContinue (-1) diff -ur ncftp-3.2.3/ncftp/gl_getline.c ncftp-3.2.3.fixed/ncftp/gl_getline.c --- ncftp-3.2.3/ncftp/gl_getline.c 2008-07-14 04:35:48.000000000 +0200 +++ ncftp-3.2.3.fixed/ncftp/gl_getline.c 2009-12-14 14:09:19.000000000 +0100 @@ -440,7 +440,7 @@ tv.tv_sec = (tv_sec_t) (tlen / 10); tv.tv_usec = (tv_usec_t) ((tlen % 10) * 100000); result = select(1, &ss, NULL, NULL, &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { diff -ur ncftp-3.2.3/sio/SAccept.c ncftp-3.2.3.fixed/sio/SAccept.c --- ncftp-3.2.3/sio/SAccept.c 2003-09-01 04:14:45.000000000 +0200 +++ ncftp-3.2.3.fixed/sio/SAccept.c 2009-12-14 14:09:59.000000000 +0100 @@ -45,7 +45,7 @@ tv.tv_sec = (tv_sec_t) tlen; tv.tv_usec = 0; result = select(sfd + 1, SELECT_TYPE_ARG234 &ss, NULL, NULL, SELECT_TYPE_ARG5 &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { diff -ur ncftp-3.2.3/sio/SRead.c ncftp-3.2.3.fixed/sio/SRead.c --- ncftp-3.2.3/sio/SRead.c 2005-01-01 22:25:39.000000000 +0100 +++ ncftp-3.2.3.fixed/sio/SRead.c 2009-12-14 14:11:21.000000000 +0100 @@ -74,7 +74,7 @@ tv.tv_sec = (tv_sec_t) tleft; tv.tv_usec = 0; result = select(sfd + 1, SELECT_TYPE_ARG234 &ss, NULL, NULL, SELECT_TYPE_ARG5 &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { diff -ur ncftp-3.2.3/sio/SRecv.c ncftp-3.2.3.fixed/sio/SRecv.c --- ncftp-3.2.3/sio/SRecv.c 2003-09-01 05:55:36.000000000 +0200 +++ ncftp-3.2.3.fixed/sio/SRecv.c 2009-12-14 14:11:58.000000000 +0100 @@ -56,7 +56,7 @@ tv.tv_sec = (tv_sec_t) tleft; tv.tv_usec = 0; result = select(sfd + 1, SELECT_TYPE_ARG234 &ss, NULL, NULL, SELECT_TYPE_ARG5 &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { diff -ur ncftp-3.2.3/sio/SRecvfrom.c ncftp-3.2.3.fixed/sio/SRecvfrom.c --- ncftp-3.2.3/sio/SRecvfrom.c 2003-09-01 04:20:24.000000000 +0200 +++ ncftp-3.2.3.fixed/sio/SRecvfrom.c 2009-12-14 14:12:47.000000000 +0100 @@ -41,7 +41,7 @@ tv.tv_sec = (tv_sec_t) tleft; tv.tv_usec = 0; result = select(sfd + 1, SELECT_TYPE_ARG234 &ss, NULL, NULL, SELECT_TYPE_ARG5 &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { diff -ur ncftp-3.2.3/sio/SRecvmsg.c ncftp-3.2.3.fixed/sio/SRecvmsg.c --- ncftp-3.2.3/sio/SRecvmsg.c 2003-09-01 04:22:23.000000000 +0200 +++ ncftp-3.2.3.fixed/sio/SRecvmsg.c 2009-12-14 14:13:19.000000000 +0100 @@ -64,7 +64,7 @@ tv.tv_sec = (tv_sec_t) tleft; tv.tv_usec = 0; result = select(sfd + 1, SELECT_TYPE_ARG234 &ss, NULL, NULL, SELECT_TYPE_ARG5 &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { diff -ur ncftp-3.2.3/sio/SSend.c ncftp-3.2.3.fixed/sio/SSend.c --- ncftp-3.2.3/sio/SSend.c 2003-09-01 04:25:09.000000000 +0200 +++ ncftp-3.2.3.fixed/sio/SSend.c 2009-12-14 14:14:24.000000000 +0100 @@ -60,7 +60,7 @@ tv.tv_sec = (tv_sec_t) tlen; tv.tv_usec = 0; result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL, SELECT_TYPE_ARG5 &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { diff -ur ncftp-3.2.3/sio/SSendto.c ncftp-3.2.3.fixed/sio/SSendto.c --- ncftp-3.2.3/sio/SSendto.c 2003-09-01 04:25:54.000000000 +0200 +++ ncftp-3.2.3.fixed/sio/SSendto.c 2009-12-14 14:14:48.000000000 +0100 @@ -43,7 +43,7 @@ tv.tv_sec = (tv_sec_t) tleft; tv.tv_usec = 0; result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL, SELECT_TYPE_ARG5 &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { diff -ur ncftp-3.2.3/sio/SSendtoByName.c ncftp-3.2.3.fixed/sio/SSendtoByName.c --- ncftp-3.2.3/sio/SSendtoByName.c 2003-09-01 04:26:18.000000000 +0200 +++ ncftp-3.2.3.fixed/sio/SSendtoByName.c 2009-12-14 14:15:28.000000000 +0100 @@ -46,7 +46,7 @@ tv.tv_sec = (tv_sec_t) tleft; tv.tv_usec = 0; result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL, SELECT_TYPE_ARG5 &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { diff -ur ncftp-3.2.3/sio/SWait.c ncftp-3.2.3.fixed/sio/SWait.c --- ncftp-3.2.3/sio/SWait.c 2005-01-01 21:44:48.000000000 +0100 +++ ncftp-3.2.3.fixed/sio/SWait.c 2009-12-14 14:16:57.000000000 +0100 @@ -34,7 +34,7 @@ #endif ss2 = ss; result = select(sfd + 1, SELECT_TYPE_ARG234 &ss, NULL, SELECT_TYPE_ARG234 &ss2, NULL); - if (result == 1) { + if (result >= 1) { /* ready */ return (1); } else if ((result < 0) && (errno != EINTR)) { @@ -59,7 +59,7 @@ tv.tv_sec = 0; tv.tv_usec = 0; result = select(sfd + 1, SELECT_TYPE_ARG234 &ss, NULL, SELECT_TYPE_ARG234 &ss2, &tv); - if (result == 1) { + if (result >= 1) { /* ready */ return (1); } else if (result == 0) { @@ -93,7 +93,7 @@ tv.tv_sec = (tv_sec_t) tleft; tv.tv_usec = 0; result = select(sfd + 1, SELECT_TYPE_ARG234 &ss, NULL, SELECT_TYPE_ARG234 &ss2, &tv); - if (result == 1) { + if (result >= 1) { /* ready */ return (1); } else if (result < 0) { @@ -153,7 +153,7 @@ #endif ss2 = ss; result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, SELECT_TYPE_ARG234 &ss2, NULL); - if (result == 1) { + if (result >= 1) { /* ready */ return (1); } else if ((result < 0) && (errno != EINTR)) { @@ -178,7 +178,7 @@ tv.tv_sec = 0; tv.tv_usec = 0; result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, SELECT_TYPE_ARG234 &ss2, &tv); - if (result == 1) { + if (result >= 1) { /* ready */ return (1); } else if (result == 0) { @@ -212,7 +212,7 @@ tv.tv_sec = (tv_sec_t) tleft; tv.tv_usec = 0; result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, SELECT_TYPE_ARG234 &ss2, &tv); - if (result == 1) { + if (result >= 1) { /* ready */ return (1); } else if (result < 0) { diff -ur ncftp-3.2.3/sio/SWrite.c ncftp-3.2.3.fixed/sio/SWrite.c --- ncftp-3.2.3/sio/SWrite.c 2003-09-01 04:36:42.000000000 +0200 +++ ncftp-3.2.3.fixed/sio/SWrite.c 2009-12-14 14:17:23.000000000 +0100 @@ -62,7 +62,7 @@ tv.tv_sec = (tv_sec_t) tlen; tv.tv_usec = 0; result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL, SELECT_TYPE_ARG5 &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { diff -ur ncftp-3.2.3/sio/UAccept.c ncftp-3.2.3.fixed/sio/UAccept.c --- ncftp-3.2.3/sio/UAccept.c 2003-09-01 04:37:30.000000000 +0200 +++ ncftp-3.2.3.fixed/sio/UAccept.c 2009-12-14 14:17:50.000000000 +0100 @@ -47,7 +47,7 @@ tv.tv_sec = (tv_sec_t) tlen; tv.tv_usec = 0; result = select(sfd + 1, SELECT_TYPE_ARG234 &ss, NULL, NULL, &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { diff -ur ncftp-3.2.3/sio/URecvfrom.c ncftp-3.2.3.fixed/sio/URecvfrom.c --- ncftp-3.2.3/sio/URecvfrom.c 2003-09-01 04:38:46.000000000 +0200 +++ ncftp-3.2.3.fixed/sio/URecvfrom.c 2009-12-14 14:18:39.000000000 +0100 @@ -41,7 +41,7 @@ tv.tv_sec = (tv_sec_t) tleft; tv.tv_usec = 0; result = select(sfd + 1, SELECT_TYPE_ARG234 &ss, NULL, NULL, SELECT_TYPE_ARG5 &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { diff -ur ncftp-3.2.3/sio/USendto.c ncftp-3.2.3.fixed/sio/USendto.c --- ncftp-3.2.3/sio/USendto.c 2003-09-01 04:39:31.000000000 +0200 +++ ncftp-3.2.3.fixed/sio/USendto.c 2009-12-14 14:19:17.000000000 +0100 @@ -43,7 +43,7 @@ tv.tv_sec = (tv_sec_t) tleft; tv.tv_usec = 0; result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL, SELECT_TYPE_ARG5 &tv); - if (result == 1) { + if (result >= 1) { /* ready */ break; } else if (result == 0) { --Multipart=_Fri__1_Jan_2010_18_09_11_+0100_Ntfn9Tqbi86c7cbV--