RE: [Ssh-sftp-perl-users] Urgent, Problems with the Net::SSH::Perl package
Brought to you by:
dbrobins
|
From: David R. <dr...@at...> - 2004-12-22 14:12:47
|
> -----Original Message-----
> From: ssh...@li...
> [mailto:ssh...@li...]On Behalf Of
> Rishi Kaundinya M
> Sent: Wednesday, December 22, 2004 6:53 AM
> To: ssh...@li...
> Subject: [Ssh-sftp-perl-users] Urgent, Problems with the =
Net::SSH::Perl package
>=20
> I am using the above package and using the perl2exe to generate the
> final binary. I am getting a segmentation fault (SIGSEGV) in=20
> my program at the following method.
>=20
> eval
> {
> $ssh->login ($config{$login}, $config{pw});
> }
>=20
> Is there any known problem with the $ssh->login. Or could it be
> a problem with the perl2exe. I am seeing the program terminating
> consistently at the above point.
Does it terminate there _without_ perl2exe? If not, then you can =
probably chalk it up to a perl2exe problem.
You may want to try running it under your platform's debugger (gdb, dbx, =
whatever) or debugging the core file, if there is one; that will tell =
you exactly where the fault occurred and may give more insight (of =
course if it's in perl itself then it won't tell you what module it died =
in, but odds are it's either perl2exe or an XS module).
> Also, I did not see any method exported to free the $ssh=20
> object created in the following statement.
>=20
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> While(1)
> {
> $ssh =3D Net::SSH::Perl->new($config{$name}, protocol=3D>2, =
debug=3D>0, po
> rt=3D>22);
> Do some thing.
After the first loop, when you reassign $ssh the first object's refcount =
should drop to 0 and it will be destroyed automatically, including =
closing sockets etc.
Note that if you are using perl version < 5.6 then you WILL have leaks =
since there are circular references; the fix is in Net::SSH::Perl 1.24 I =
believe, which takes advantage of 5.6's weak references.
--=20
Dave
Isa. 40:31
|