Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-SSH2 CPAN distribution.

Report information
The Basics
Id:
25345
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
r_ovidius [...] eml.cc
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Infinite loop, pegs cpu and does not exit when using sftp.
Date: Thu, 8 Mar 2007 14:07:43 -0800
To: bug-Net-SSH2@rt.cpan.org
From: Rutger Ovidius <r_ovidius@eml.cc>
Perl 5.8.8, Linux libssh2-0.13 Net-SSH2-0.08 to 0.10 has this problem. Net-SSH2-0.07 does not have this problem. Snippet: --- my $ssh2 = Net::SSH2->new(); # Login stuff... my $sftp = $ssh2->sftp(); my $infile = $sftp->open("some file that exists"); $ssh2->disconnect(); --- Does not exit, but pegs the CPU at 100%. "strace -p <pid>" shows an endless loop of: recv(3, "", 16, 0x4000) = 0 Adding debug output to SSH2.c shows that it locks up in the close_handle call. -- line 1556 "SSH2.xs" debug("%s::DESTROY\n", class); clear_error(fi->sf->ss); libssh2_sftp_close_handle(fi->handle); <- here. --- Reverting this 1 line in the "typemap" file in the O_FILE section: - sv_magic((SV*)io, newRV((SV*)gv), PERL_MAGIC_tiedscalar, Nullch, 0); + sv_magic((SV*)io, $arg, PERL_MAGIC_tiedscalar, Nullch, 0); allows it to exit properly.
I can't repro this in my current version (libssh2 0.18.0-20071110, Net::SSH2 0.18 candidate); if it still happens for you with libssh2 and Net::SSH2 0.18, please reactivate this bug.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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