Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 48260
Status: open
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: tom.shaw [...] solidsystems.com.au
Cc: jsremba [...] gfs.com
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 0513A19B81E0 for <bug-libnet [...] rt.cpan.org>; Mon, 27 Jul 2009 23:32:15 -0400 (EDT)
Received: (qmail 25148 invoked by uid 103); 28 Jul 2009 03:32:15 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 28 Jul 2009 03:32:15 -0000
Received: from mail-yx0-f190.google.com (HELO mail-yx0-f190.google.com) (209.85.210.190) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Mon, 27 Jul 2009 20:32:10 -0700
Received: by yxe28 with SMTP id 28so310211yxe.33 for <bug-libnet [...] rt.cpan.org>; Mon, 27 Jul 2009 20:32:07 -0700 (PDT)
Received: by 10.100.92.2 with SMTP id p2mr9257790anb.7.1248751927492; Mon, 27 Jul 2009 20:32:07 -0700 (PDT)
Delivered-To: cpan-bug+libnet [...] diesel.bestpractical.com
Subject: Undefined value Net-FTP-2.77 dataconn.pm line 54
MIME-Version: 1.0
X-Spam-Status: No, hits=1.5 required=8.0 tests=HTML_MESSAGE,WEIRD_PORT
Return-Path: <tom.shaw [...] solidsystems.com.au>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-libnet [...] rt.cpan.org
Date: Tue, 28 Jul 2009 11:32:07 +0800
X-Spam-Level: *
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Content-Type: multipart/alternative; boundary=0016e645ab300d02de046fbbb7ed
Message-ID: <5905aedd0907272032p67a21fb6w3eba0b1378950135 [...] mail.gmail.com>
To: bug-libnet [...] rt.cpan.org
From: Tom Shaw <tom.shaw [...] solidsystems.com.au>
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 5850
Download (untitled) / with headers
text/plain 5.7k
Perl: **This is perl, v5.8.9 built for sun4-solaris OS: SunOS hubint 5.10 Generic_141414-01 sun4u sparc SUNW,SPARC-Enterprise Error: Can't use an undefined value as a symbol reference at /opt/WNGperl5/lib/5.8.9/Net/FTP/dataconn.pm line 54. Also seen using the built-in Perl 5.8.4 from Solaris 10 on a different SPARC machine. The server is "Microsoft FTP Service" This seems to be a race condition caused by using the $ftp->list($filename) method. It is likely I am using this method incorrectly, and not handling the dataconn correctly - if so, can I suggest that the documentation be updated to advise users that the "low-level" functions like $ftp->list can interfere with other Net::FTP commands if they are not handled correctly. The documentation currently says: If for some reason you want to have complete control over the data connection, this includes generating it and calling the response method when required, then the user can use these methods to do so. However calling these methods only affects the use of the methods above that can return a data connection. They have no effect on methods get, put, put_unique and those that do not require data connections. "These methods" is ambiguous - I assume it means the methods listed above. It seems that the second paragraph here is incorrect as "these methods" do affect the other methods. There arre a few posts on various forums about the line 54 error, as yet not answered. *Steps to reproduce* #!/usr/bin/perl -w use strict; use Net::FTP; my $host="hostname"; my $server="server"; my $uname ="user"; my $pword ="password"; my $rdir ="directory"; my $filename1 = "test1"; my $filename2 = "test2"; my $ftp = Net::FTP->new($server, Debug => 1) or die ("Could not connect to server $server"); $ftp->login($uname,$pword) or die ("$host cannot login to server $server: " . $ftp->message); $ftp->cwd("$rdir") or exitscript($ftp->code(),"$host cannot change remote working directory: " . $ftp->message); $ftp->ascii or die("$host cannot set transfer mode: " . $ftp->message); $ftp->put($filename1); $ftp->list($filename1); $ftp->put($filename2); $ftp->list($filename2); $ftp->quit(); exit 1; *Output* (using the debugger to get a good stack trace) # perl -d 1.pl Loading DB routines from perl5db.pl version 1.31 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(1.pl:7): my $host="hostname"; DB<1> c Net::FTP>>> Net::FTP(2.77) Net::FTP>>> Exporter(5.63) Net::FTP>>> Net::Cmd(2.29) Net::FTP>>> IO::Socket::INET(1.31) Net::FTP>>> IO::Socket(1.30) Net::FTP>>> IO::Handle(1.27) Net::FTP=GLOB(0x23d944)<<< 220 Microsoft FTP Service Net::FTP=GLOB(0x23d944)>>> USER username Net::FTP=GLOB(0x23d944)<<< 331 Password required for username. Net::FTP=GLOB(0x23d944)>>> PASS .... Net::FTP=GLOB(0x23d944)<<< 230 User username logged in. Net::FTP=GLOB(0x23d944)>>> CWD directory Net::FTP=GLOB(0x23d944)<<< 250 CWD command successful. Net::FTP=GLOB(0x23d944)>>> TYPE A Net::FTP=GLOB(0x23d944)<<< 200 Type set to A. Net::FTP=GLOB(0x23d944)>>> ALLO 6 Net::FTP=GLOB(0x23d944)<<< 200 ALLO command successful. Net::FTP=GLOB(0x23d944)>>> PASV Net::FTP=GLOB(0x23d944)<<< 227 Entering Passive Mode (10,210,188,202,14,196). Net::FTP=GLOB(0x23d944)>>> STOR test1 Net::FTP=GLOB(0x23d944)<<< 125 Data connection already open; Transfer starting. Net::FTP=GLOB(0x23d944)<<< 226 Transfer complete. Net::FTP=GLOB(0x23d944)>>> PASV Net::FTP=GLOB(0x23d944)<<< 227 Entering Passive Mode (10,210,188,202,14,197). Net::FTP=GLOB(0x23d944)>>> LIST test1 Net::FTP=GLOB(0x23d944)<<< 125 Data connection already open; Transfer starting. Net::FTP=GLOB(0x23d944)>>> ALLO 6 Net::FTP=GLOB(0x23d944)<<< 226 Transfer complete. Net::FTP=GLOB(0x23d944)>>> PASV Net::FTP=GLOB(0x23d944)<<< 200 ALLO command successful. Net::FTP=GLOB(0x23d944)>>> PASV Net::FTP=GLOB(0x23d944)<<< 227 Entering Passive Mode (10,210,188,202,14,198). Net::FTP=GLOB(0x23d944)>>> LIST test2 Can't use an undefined value as a symbol reference at /opt/WNGperl5/lib/5.8.9/Net/FTP/dataconn.pm line 54. at /opt/WNGperl5/lib/5.8.9/Net/FTP/dataconn.pm line 54 Net::FTP::dataconn::_close('Net::FTP::A=GLOB(0x5aeb8c)') called at /opt/WNGperl5/lib/5.8.9/Net/FTP/dataconn.pm line 70 Net::FTP::dataconn::close('Net::FTP::A=GLOB(0x5aeb8c)') called at /opt/WNGperl5/lib/5.8.9/sun4-solaris/IO/Socket/INET.pm line 118 IO::Socket::INET::_error('Net::FTP::A=GLOB(0x5aeb8c)', 'Illegal seek', '') called at /opt/WNGperl5/lib/5.8.9/sun4-solaris/IO/Socket/INET.pm line 237 IO::Socket::INET::configure('Net::FTP::A=GLOB(0x5aeb8c)', 'HASH(0x5ca910)') called at /opt/WNGperl5/lib/5.8.9/sun4-solaris/IO/Socket.pm line 48 IO::Socket::new('Net::FTP::A', 'PeerAddr', 10.210.188.202, 'PeerPort', 3782, 'LocalAddr', undef, 'Proto', 'tcp', ...) called at /opt/WNGperl5/lib/5.8.9/sun4-solaris/IO/Socket/INET.pm line 37 IO::Socket::INET::new('Net::FTP::A', 'PeerAddr', 10.210.188.202, 'PeerPort', 3782, 'LocalAddr', undef, 'Proto', 'tcp', ...) called at /opt/WNGperl5/lib/5.8.9/Net/FTP.pm line 932 Net::FTP::_dataconn('Net::FTP=GLOB(0x23d944)') called at /opt/WNGperl5/lib/5.8.9/Net/FTP.pm line 1014 Net::FTP::_data_cmd('Net::FTP=GLOB(0x23d944)', 'LIST', 'test2') called at /opt/WNGperl5/lib/5.8.9/Net/FTP.pm line 677 Net::FTP::list('Net::FTP=GLOB(0x23d944)', 'test2') called at 1.pl line 30 Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination, h q, h R or h o to get additional info. DB<1> Note: this dies at the second "list" command. The FTP status codes etc have become out-of-order. Alternatively, if I am conscientious at doing: $ftp->put($filename) or die ... then the script dies at "Unable to put test2". Regards Tom Shaw
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 7324
MIME-Version: 1.0
In-Reply-To: <5905aedd0907272032p67a21fb6w3eba0b1378950135 [...] mail.gmail.com>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <5905aedd0907272032p67a21fb6w3eba0b1378950135 [...] mail.gmail.com>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-2295-1253630493-1099.48260-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 142
Download (untitled) / with headers
text/plain 142b
This appears to be a duplicate of bug #37700, which had a patch attached to fix this problem over a year ago. Is anyone maintaining Net::FTP?
MIME-Version: 1.0 (Apple Message framework v1076)
X-Spam-Status: No, hits=0.0 required=8.0 tests=DK_SIGNED,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-2295-1253630493-1099.48260-5-0 [...] rt.cpan.org>
X-Mailer: Apple Mail (2.1076)
References: <RT-Ticket-48260 [...] rt.cpan.org> <5905aedd0907272032p67a21fb6w3eba0b1378950135 [...] mail.gmail.com> <rt-3.6.HEAD-2295-1253630493-1099.48260-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"; delsp="yes"; format="flowed"
Message-ID: <793B6D63-F099-404E-B24E-3FA0E926819A [...] pobox.com>
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id A0B6A19B81E0 for <bug-libnet [...] rt.cpan.org>; Tue, 22 Sep 2009 11:39:20 -0400 (EDT)
Received: (qmail 22928 invoked by uid 103); 22 Sep 2009 15:39:20 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 22 Sep 2009 15:39:20 -0000
Received: from a-pb-sasl-sd.pobox.com (HELO sasl.smtp.pobox.com) (64.74.157.62) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Tue, 22 Sep 2009 08:39:14 -0700
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id B2EF55AB53 for <bug-libnet [...] rt.cpan.org>; Tue, 22 Sep 2009 11:39:11 -0400 (EDT)
Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id AF1495AB51 for <bug-libnet [...] rt.cpan.org>; Tue, 22 Sep 2009 11:39:11 -0400 (EDT)
Received: from mail.goingon.net (unknown [70.85.157.106]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPA id 7D0BB5AB50 for <bug-libnet [...] rt.cpan.org>; Tue, 22 Sep 2009 11:39:10 -0400 (EDT)
Received: by mail.goingon.net (Postfix, from userid 99) id B9F95FB4367; Tue, 22 Sep 2009 10:39:09 -0500 (CDT)
Received: from [192.168.111.4] (client-63.249.42.207.dfwtx.partnershipbroadband.com [63.249.42.207]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.goingon.net (Postfix) with ESMTP id 8883EFB4362 for <bug-libnet [...] rt.cpan.org>; Tue, 22 Sep 2009 10:39:02 -0500 (CDT)
Delivered-To: cpan-bug+libnet [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #48260] Undefined value Net-FTP-2.77 dataconn.pm line 54
Domainkey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=content-type :mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; q=dns; s= sasl; b=cmLkAXXUxZxdwIHHIbl9m5FQmiMoa5V0M2lGc9ebu2LbAqNMyoU9b2Co GDsWGO3S6sbzDwYgnxE6b2iS0HVTdVTB0PO1gfSnAYLtvf2VuEe5VOOyBD63ijB7 6SZNwmCKdwgOuWrYir70gXh+5vQQNPnle3PVtWmz2RupbZD0Ci8=
Return-Path: <gbarr [...] pobox.com>
Dkim-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=content-type :mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; s=sasl; bh= xfKaAumPHHjDTvAhyegQEwOpIk8=; b=CHFtUPkzMo6VXFbhXHHKVvaBjEEAz0oK cdpVplwExJl8/7CG7P2sy+G4xCOuqw3hap4veczHVho6O3tHtvXZ8yct40xn8J7l EOIj5yAmNb7C/LLXNOpsQtgSVx9HVfXJjyU7n5GDv2qgmEQiJRbBn2Okz9w1xKsm ebXktDj+1zI=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-libnet [...] rt.cpan.org
X-Old-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RDNS_DYNAMIC autolearn=no version=3.2.4
Date: Tue, 22 Sep 2009 10:38:57 -0500
X-Old-Spam-Level:
X-Spam-Level: *
X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on p1.goingon.net
To: bug-libnet [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
X-Pobox-Relay-ID: 132E83A2-A78E-11DE-B948-8B19076EA04E-36227416!a-pb-sasl-sd.pobox.com
From: Graham Barr <gbarr [...] pobox.com>
RT-Message-ID: <rt-3.6.HEAD-2295-1253633970-1538.48260-0-0 [...] rt.cpan.org>
Content-Length: 514
Download (untitled) / with headers
text/plain 514b
On Sep 22, 2009, at 9:41 AM, Deven T. Corzine via RT wrote: Show quoted text
> Queue: libnet > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=48260 > > > This appears to be a duplicate of bug #37700, which had a patch > attached > to fix this problem over a year ago. Is anyone maintaining Net::FTP?
It is true that libnet has been neglected for a while, but I hope to dig through all the backlog soon. If you would like to help, the repository is on github @ http://github.com/gbarr/perl-libnet Graham.
MIME-Version: 1.0
In-Reply-To: <5905aedd0907272032p67a21fb6w3eba0b1378950135 [...] mail.gmail.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <5905aedd0907272032p67a21fb6w3eba0b1378950135 [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.16-16102-1375981407-1830.48260-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 190
Download (untitled) / with headers
text/plain 190b
The bug which this has been commented is a duplicate of (namely, #37700) should now be fixed in 1.22_02. Please can you try that release and report back whether it fixes this bug? Thank you.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-16102-1375981407-1830.48260-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <5905aedd0907272032p67a21fb6w3eba0b1378950135 [...] mail.gmail.com> <rt-4.0.16-16102-1375981407-1830.48260-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-13135-1391159741-1263.48260-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 2405
Download (untitled) / with headers
text/plain 2.3k
On Thu Aug 08 13:03:27 2013, SHAY wrote: Show quoted text
> The bug which this has been commented is a duplicate of (namely, > #37700) should now be fixed in 1.22_02. Please can you try that > release and report back whether it fixes this bug? Thank you.
I have now tried this myself, and #37700 does not fix this bug involving the use of list(). The test program no longer complains "Can't use an undefined value as a symbol reference" (which is what #37700 fixed), but the list() still fails, prematurely exiting the script without transferring the second file: C:\Dev\Temp>perl test.pl Net::FTP>>> Net::FTP(2.79) Net::FTP>>> Exporter(5.68) Net::FTP>>> Net::Cmd(2.29) Net::FTP>>> IO::Socket::INET(1.33) Net::FTP>>> IO::Socket(1.36) Net::FTP>>> IO::Handle(1.34) Net::FTP=GLOB(0x26dc1d8)<<< 220-FileZilla Server version 0.9.43 beta Net::FTP=GLOB(0x26dc1d8)<<< 220-written by Tim Kosse (tim.kosse@filezilla-projec t.org) Net::FTP=GLOB(0x26dc1d8)<<< 220 Please visit http://sourceforge.net/projects/fil ezilla/ Net::FTP=GLOB(0x26dc1d8)>>> USER anonymous Net::FTP=GLOB(0x26dc1d8)<<< 331 Password required for anonymous Net::FTP=GLOB(0x26dc1d8)>>> PASS .... Net::FTP=GLOB(0x26dc1d8)<<< 230 Logged on Net::FTP=GLOB(0x26dc1d8)>>> CWD foo Net::FTP=GLOB(0x26dc1d8)<<< 250 CWD successful. "/foo" is current directory. Net::FTP=GLOB(0x26dc1d8)>>> TYPE A Net::FTP=GLOB(0x26dc1d8)<<< 200 Type set to A Net::FTP=GLOB(0x26dc1d8)>>> PASV Net::FTP=GLOB(0x26dc1d8)<<< 227 Entering Passive Mode (127,0,0,1,243,220) Net::FTP=GLOB(0x26dc1d8)>>> STOR a.txt Net::FTP=GLOB(0x26dc1d8)<<< 150 Opening data channel for file upload to server o f "/foo/a.txt" Net::FTP=GLOB(0x26dc1d8)<<< 226 Successfully transferred "/foo/a.txt" Net::FTP=GLOB(0x26dc1d8)>>> PASV Net::FTP=GLOB(0x26dc1d8)<<< 227 Entering Passive Mode (127,0,0,1,243,222) Net::FTP=GLOB(0x26dc1d8)>>> LIST a.txt Net::FTP=GLOB(0x26dc1d8)<<< 150 Opening data channel for directory listing of "/ foo/a.txt" Net::FTP=GLOB(0x26dc1d8)>>> PASV Net::FTP=GLOB(0x26dc1d8)<<< 226 Successfully transferred "/foo/a.txt" Net::FTP=GLOB(0x26dc1d8)>>> PASV Net::FTP=GLOB(0x26dc1d8)<<< 227 Entering Passive Mode (127,0,0,1,243,224) Net::FTP=GLOB(0x26dc1d8)>>> QUIT Net::FTP=GLOB(0x26dc1d8)<<< 227 Entering Passive Mode (127,0,0,1,243,225) The script completes normally using ls() instead of list() so it is surely something amiss with list() here - an entirely separate bug to #37700.
MIME-Version: 1.0
In-Reply-To: <5905aedd0907272032p67a21fb6w3eba0b1378950135 [...] mail.gmail.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <5905aedd0907272032p67a21fb6w3eba0b1378950135 [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-19004-1391160100-396.48260-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 59
As with #50371, setting FTP_PASSIVE=0 fixes this problem...


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.