Re: duplicity ftp backup / ncftp no longer working since 8.0-Release

2010-01-01 Thread Manfred Usselmann
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 checking
> >> >> > on select() return in ncftp3.  If you change every instance of
> >> >> > select() result checking in ftp/ncftp3 from "==1" to ">=1" the problem
> >> >> > seems to go away.
> >> >> >
> >> >> > result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL,
> >> >> > SELECT_TYPE_ARG5 &tv);
> >> >> > -if (result == 1) {
> >> >> > +if (result >= 1) {
> >> >>
> >> >> I will try this.
> >> >
> >> > Did work for me!
> >> >
> >> > Thanks,
> >> > Manfred
> >>
> >> OK.   I will try to report it to the upstream (ncftp.com/contact), and
> >> 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=140934 mentions a fix to
> > FreeBSD 8 which sounds like it should have solved our issue. Don't know
> > why it didn't.
> >
> > Regards,
> > Manfred
> >
> 
> 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.
> 
> 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).
> 
> http://www.freebsd.org/cgi/cvsweb.cgi/ports/ftp/ncftp3/files/Attic/patch-SConnect.c
> 
> 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.
> 
> So, long story short, you still need to manually patch the source of
> ncftp until either
> 
> A)  Vendor updates base code (or)
> B)  Someone submits a patch to the freebsd port of ftp/ncftp3 (3.2.3)
> 
> 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.
> 
> 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. 

Thanks,
Manfred



-- 
Manfred Usselmann 
ICG IT Consulting GmbH, Kelkheim
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.0 
+0200
+++ ncftp-3.2.3.fixed/autoconf_local/aclocal.m4 2009-12-14 14:00:45.0 
+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.0 +0200
+++ ncftp-3.2.3.fixed/configure 2009-12-14 14:01:58.0 +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.0 +0100
+++ ncftp-3.2.3.fixed/libncftp/io_util.c2009-12-14 14:07:48.0 
+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) {
+ 

Re: duplicity ftp backup / ncftp no longer working since 8.0-Release

2010-01-01 Thread David Horn
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 checking
>> >> > on select() return in ncftp3.  If you change every instance of
>> >> > select() result checking in ftp/ncftp3 from "==1" to ">=1" the problem
>> >> > seems to go away.
>> >> >
>> >> > result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL,
>> >> > SELECT_TYPE_ARG5 &tv);
>> >> > -if (result == 1) {
>> >> > +if (result >= 1) {
>> >>
>> >> I will try this.
>> >
>> > Did work for me!
>> >
>> > Thanks,
>> > Manfred
>>
>> OK.   I will try to report it to the upstream (ncftp.com/contact), and
>> 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=140934 mentions a fix to
> FreeBSD 8 which sounds like it should have solved our issue. Don't know
> why it didn't.
>
> Regards,
> Manfred
>

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.

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).

http://www.freebsd.org/cgi/cvsweb.cgi/ports/ftp/ncftp3/files/Attic/patch-SConnect.c

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.

So, long story short, you still need to manually patch the source of
ncftp until either

A)  Vendor updates base code (or)
B)  Someone submits a patch to the freebsd port of ftp/ncftp3 (3.2.3)

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.

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)

Good Luck.

---Dave Horn
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: duplicity ftp backup / ncftp no longer working since 8.0-Release

2010-01-01 Thread Manfred Usselmann
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 checking
> >> > on select() return in ncftp3.  If you change every instance of
> >> > select() result checking in ftp/ncftp3 from "==1" to ">=1" the problem
> >> > seems to go away.
> >> >
> >> > result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL,
> >> > SELECT_TYPE_ARG5 &tv);
> >> > -if (result == 1) {
> >> > +if (result >= 1) {
> >>
> >> I will try this.
> >
> > Did work for me!
> >
> > Thanks,
> > Manfred
> 
> OK.   I will try to report it to the upstream (ncftp.com/contact), and
> 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=140934 mentions a fix to
FreeBSD 8 which sounds like it should have solved our issue. Don't know
why it didn't.

Regards,
Manfred

-- 
Manfred Usselmann 
ICG IT Consulting GmbH, Kelkheim
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: duplicity ftp backup / ncftp no longer working since 8.0-Release

2009-12-14 Thread David Horn
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 checking
>> > on select() return in ncftp3.  If you change every instance of
>> > select() result checking in ftp/ncftp3 from "==1" to ">=1" the problem
>> > seems to go away.
>> >
>> > result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL,
>> > SELECT_TYPE_ARG5 &tv);
>> > -if (result == 1) {
>> > +if (result >= 1) {
>>
>> I will try this.
>
> Did work for me!
>
> Thanks,
> Manfred

OK.   I will try to report it to the upstream (ncftp.com/contact), and
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.

---Dave
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: duplicity ftp backup / ncftp no longer working since 8.0-Release

2009-12-14 Thread Manfred Usselmann
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 checking
> > on select() return in ncftp3.  If you change every instance of
> > select() result checking in ftp/ncftp3 from "==1" to ">=1" the problem
> > seems to go away.
> > 
> > result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL,
> > SELECT_TYPE_ARG5 &tv);
> > -if (result == 1) {
> > +if (result >= 1) {
> 
> I will try this.

Did work for me!

Thanks,
Manfred



-- 
Manfred Usselmann 
ICG IT Consulting GmbH, Kelkheim
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: duplicity ftp backup / ncftp no longer working since 8.0-Release

2009-12-13 Thread Manfred Usselmann
On Mon, 14 Dec 2009 00:23:17 -0500
David Horn  wrote:

> On Sun, Dec 13, 2009 at 4:32 AM, Manfred Usselmann
>  wrote:
> >
> > since my upgrade to 8.0-RELEASE my backup solution with duplicity is no
> > longer working because ncftpput fails.
> >
> > The error message from ncftp 3.2.2_1: Could not read reply from control
> > connection -- timed out.
> >
> > S.a. http://www.freebsd.org/cgi/query-pr.cgi?pr=140934
> >
> > Does anybody know a solution or a workaround?
> 
> I have seen this with ncftpput as well, but at least in my case, it
> was a warning, and not a fatal error.  Check your ftp server to see if
> the backup file has indeed been transferred.

The file is getting transferred, but duplicity assumes that it is not
and abends. 


> I believe that there is something unusual going on with the checking
> on select() return in ncftp3.  If you change every instance of
> select() result checking in ftp/ncftp3 from "==1" to ">=1" the problem
> seems to go away.
> 
> result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL,
> SELECT_TYPE_ARG5 &tv);
> -if (result == 1) {
> +if (result >= 1) {

I will try this.

Thanks!

Manfred



-- 
Manfred Usselmann 
ICG IT Consulting GmbH, Kelkheim
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: duplicity ftp backup / ncftp no longer working since 8.0-Release

2009-12-13 Thread David Horn
On Sun, Dec 13, 2009 at 4:32 AM, Manfred Usselmann
 wrote:
> Hi,
>
> since my upgrade to 8.0-RELEASE my backup solution with duplicity is no
> longer working because ncftpput fails.
>
> The error message from ncftp 3.2.2_1: Could not read reply from control
> connection -- timed out.
>
> S.a. http://www.freebsd.org/cgi/query-pr.cgi?pr=140934
>
> Does anybody know a solution or a workaround?

I have seen this with ncftpput as well, but at least in my case, it
was a warning, and not a fatal error.  Check your ftp server to see if
the backup file has indeed been transferred.

I believe that there is something unusual going on with the checking
on select() return in ncftp3.  If you change every instance of
select() result checking in ftp/ncftp3 from "==1" to ">=1" the problem
seems to go away.

result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, NULL,
SELECT_TYPE_ARG5 &tv);
-if (result == 1) {
+if (result >= 1) {

Good Luck.

---Dave H
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"