Re: Debian Sparc Perl problem

2003-01-17 Thread Ian Cass
Apologies, client code was a bit wrong.

use strict;
use IO::Socket;

my $ITER = 10;

my $forward_socket = IO::Socket::INET-new(
Proto = 'tcp',
PeerAddr = localhost,
PeerPort = 12345,
#   Timeout = 10,
) or die $!;

for (my $i = 0; $i  $ITER; $i++) {
print Sending test $i\n;
$forward_socket-print(\n);
my $resp = $forward_socket-getline
or print ERROR $!\n;
print Received $resp\n;
}



Debian Sparc Perl problem

2003-01-17 Thread Ian Cass
Hi,

I've got a problem here with some Perl  I don't know if it's Debian or not.
I can only replicate it on Debian Sparc, but I have no other Linux/Sparc to
test it on. The code works perfectly on Debian i386  OpenBSD i386.

I've got an app that passes messages to another app on the same machine
using tcp sockets. Using IO::Socket::INET, Blocking reads do not work if I
set a Timeout. Any reads (either $socket or $socket-getline) will return
a 'Resource temporarily unavailable' like you'd get if you had no data to
read when you're using non blocking IO (EAGAIN). If I remove the Timeout
parameter, it works as expected.

Code is included below with which I can repeat this on the following
setups...

1) Sparc Ultra5 2 x 250Mhz running testing/unstable with perl v5.8.0
2) Sparc E450 4 x 400Mhz running stable with perl v5.6.1
3) Sparc 10 1 x 50Mhz running stable with perl v5.6.1

Suggestions of whats wrong or where I can report this welcome.

Server Code...

use strict;
use POSIX;
use IO::Socket;

my $server = new IO::Socket::INET(
LocalPort = 12345,
Listen= 10,
Proto = tcp,
Reuse = 1
) or die Unable to Bind Socket to Port;

while (my $client = $server-accept()) {
print Accepted a new client\n;
while ($client) {
print Read $_\n;
sleep 10;
$client-print($_);
}
close($client);
}


Client Code...

use strict;
use IO::Socket;

my $ITER = 10;

my $forward_socket = IO::Socket::INET-new(
 Proto = 'tcp',
 PeerAddr = localhost,
 PeerPort = 12345,
 Timeout = 10,
) or die $!;

for (my $i = 0; $i  $ITER; $i++) {
 print Sending test $i\n;
 $forward_socket-print(yyy);
 my $resp = $forward_socket-getline
or print ERROR $!\n;
 print Received $resp\n;
}






Network Install bogs

2003-01-17 Thread Naresh Reddy
I am trying to do a network install of Debian (Woody) on an Ultra Sparc10. I
already set up tftp and it boots the image fine, however when I set up the
network and try to get rescue.bin from the debian mirror it stops downloaded it
at about 50%. 

When I open up another console (Alt+F2) I can ping out fine (ip masq), and even
ping the debian server(s). So I don't think there is anything wrong with my
network.

Any suggestions/solutions?

Thanks,
Naresh




Re: Debian Sparc Perl problem

2003-01-17 Thread Tom 'spot' Callaway
On Fri, 2003-01-17 at 08:57, Ian Cass wrote:
 Hi,
 
 I've got a problem here with some Perl  I don't know if it's Debian or not.
 I can only replicate it on Debian Sparc, but I have no other Linux/Sparc to
 test it on. The code works perfectly on Debian i386  OpenBSD i386.
 
 I've got an app that passes messages to another app on the same machine
 using tcp sockets. Using IO::Socket::INET, Blocking reads do not work if I
 set a Timeout. Any reads (either $socket or $socket-getline) will return
 a 'Resource temporarily unavailable' like you'd get if you had no data to
 read when you're using non blocking IO (EAGAIN). If I remove the Timeout
 parameter, it works as expected.

This problem is specific to Debian. Aurora SPARC Linux gives the
expected output:
[EMAIL PROTECTED] root]# perl server.pl
Accepted a new client
Read 
 
Read 
 
Read 
 
Read 
 
Read 
 
Read 
 
Read 

[EMAIL PROTECTED] root]# perl -v
 
This is perl, v5.6.1 built for sparc-linux
 
Copyright 1987-2001, Larry Wall
 
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.
 
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to
the
Internet, point your browser at http://www.perl.com/, the Perl Home
Page.

[EMAIL PROTECTED] root]# uname -a
Linux fry.rdu.redhat.com 2.4.18-0.96sparc #1 Fri Jun 7 04:07:21 EDT 2002
sparc64 unknown

~spot
---
Tom spot Callaway tcallawa(a)redhat*com (SAIR LCA, RHCE)
GPG: D786 8B22 D9DB 1F8B 4AB7  448E 3C5E 99AD 9305 4260
Red Hat Sales Engineer :: http://www.redhat.com
Aurora SPARC Linux Project Leader :: http://www.auroralinux.org

The words and opinions reflected in this message do not necessarily
reflect those of my employer, Red Hat, or my project, Aurora 
SPARC Linux and belong solely to me.

Save Firefly! :: http://www.fireflysupport.com/ :: Keep Flying!



Re: Debian Sparc Perl problem

2003-01-17 Thread Ian Cass
 This problem is specific to Debian. Aurora SPARC Linux gives the
 expected output:
 [EMAIL PROTECTED] root]# perl server.pl

It's the client that generates the errors, but only when Timeout is
specified

oasis:~# perl tests.pl
Sending test 0
ERROR Resource temporarily unavailable
Received
Sending test 1
ERROR Resource temporarily unavailable
Received
Sending test 2
ERROR Resource temporarily unavailable
Received
Sending test 3
ERROR Resource temporarily unavailable
Received
Sending test 4
ERROR Resource temporarily unavailable
Received
Sending test 5
ERROR Resource temporarily unavailable
Received
Sending test 6
ERROR Resource temporarily unavailable
Received
Sending test 7
ERROR Resource temporarily unavailable
Received
Sending test 8
ERROR Resource temporarily unavailable
Received
Sending test 9
ERROR Resource temporarily unavailable
Received

--
Ian Cass



Re: Debian Sparc Perl problem

2003-01-17 Thread Tom 'spot' Callaway
On Fri, 2003-01-17 at 11:37, Ian Cass wrote:
  This problem is specific to Debian. Aurora SPARC Linux gives the
  expected output:
  [EMAIL PROTECTED] root]# perl server.pl
 
 It's the client that generates the errors, but only when Timeout is
 specified

This works properly as well:

[EMAIL PROTECTED] root]# perl client.pl
Sending test 0
Received 
 
Sending test 1
Received 
 
Sending test 2
Received 
 
Sending test 3
Received 
 
Sending test 4
Received 
 
Sending test 5
Received 
 
Sending test 6
Received 

~spot
---
Tom spot Callaway tcallawa(a)redhat*com (SAIR LCA, RHCE)
GPG: D786 8B22 D9DB 1F8B 4AB7  448E 3C5E 99AD 9305 4260
Red Hat Sales Engineer :: http://www.redhat.com
Aurora SPARC Linux Project Leader :: http://www.auroralinux.org

The words and opinions reflected in this message do not necessarily
reflect those of my employer, Red Hat, or my project, Aurora 
SPARC Linux and belong solely to me.

Save Firefly! :: http://www.fireflysupport.com/ :: Keep Flying!



Re: Debian Sparc Perl problem

2003-01-17 Thread Tom 'spot' Callaway
On Fri, 2003-01-17 at 11:37, Ian Cass wrote:
  This problem is specific to Debian. Aurora SPARC Linux gives the
  expected output:
  [EMAIL PROTECTED] root]# perl server.pl
 
 It's the client that generates the errors, but only when Timeout is
 specified

Ahh. Good point. I forgot to uncomment the Timeout setting. Problem
reproduced.

~spot
---
Tom spot Callaway tcallawa(a)redhat*com (SAIR LCA, RHCE)
GPG: D786 8B22 D9DB 1F8B 4AB7  448E 3C5E 99AD 9305 4260
Red Hat Sales Engineer :: http://www.redhat.com
Aurora SPARC Linux Project Leader :: http://www.auroralinux.org

The words and opinions reflected in this message do not necessarily
reflect those of my employer, Red Hat, or my project, Aurora 
SPARC Linux and belong solely to me.

Save Firefly! :: http://www.fireflysupport.com/ :: Keep Flying!



Re: Debian Sparc Perl problem

2003-01-17 Thread Ian Cass
 Ahh. Good point. I forgot to uncomment the Timeout setting. Problem
 reproduced.

Seems it's not a Debian problem then. I'll take this somewhere else. Thanks
for testing for me.

--
Ian Cass