CC: | "Wagner, David --- Sr Programmer Analyst --- CFS" <David.Wagner [...] freight.fedex.com> |
Subject: | problem in Destroy of SSH2 ( never occurs until exit of script) |
Date: | Thu, 19 Apr 2012 11:51:25 -0500 |
To: | <bug-Net-SSH2 [...] rt.cpan.org> |
From: | "Wagner, David --- Sr Programmer Analyst --- CFS" <david.wagner [...] fedex.com> |
I have been using Net::SFTP::Foreign in conjunction with
Net::SSH2. But also tried this just using the Net::SSH2.
With the help of Salvador, we believe that Net::SSH2 has a bug
and I am unable to get SSSH2 Destroyed UNTIL I exit the script. We
worked through Foreign and then just tried SSH2 and the same behavior
occurs using just SSH2.
I am running on XP SP3 using Active State 5.12.4 build 1205 (
Jun 20, 2011 ).
Using Net::SSH2 version .40
libssh2 version 1.4.1
I have attached the script used, but added .txt to the file
name.
Salvador provided me with a list to provide to you. The only
thing I could not find or know how to find is libssl otherwise I beelive
I have given you all that I have...
Here is the last email that I received from Salvador ( Author of
Net::SSF::Foreign ), who has been assisting in determining where the
problem may lie:
Show quoted text
----- Original Message -----
> From: "Wagner, David --- Sr Programmer Analyst --- CFS"
<david.wagner@fedex.com>
> To: Salvador Fandino <sfandino@yahoo.com>; "Wagner, David --- Sr
Programmer Analyst --- CFS" <david.wagner@fedex.com>
> Cc:
> Sent: Thursday, April 19, 2012 5:38 PM
> Subject: RE: Script and output of simple script which does NOT clear
the IBM UNTIL exit from the script
>
> Output:
> G:\Data\CurrWrka\00CommonPerl>aapl508gv
> libssh2_channel_open_ex(ss->session, pv_channel_type,
len_channel_type,
> window_size, packet_size, ((void *)0)
> , 0 ) -> 0x2de6d54
> main=HASH(0x3a1b4)->DESTROY called
> SV = IV(0x1a1b3e8) at 0x1a1b3ec
> REFCNT = 1
> FLAGS = (PADMY,ROK)
> RV = 0x3a1b4
> SV = PVHV(0x187031c) at 0x3a1b4
> REFCNT = 2
> FLAGS = (OBJECT,SHAREKEYS)
> STASH = 0x3a0a4 "main"
> ARRAY = 0x187dbdc (0:6, 1:2)
> hash quality = 125.0%
> KEYS = 2
> FILL = 2
> MAX = 7
> RITER = -1
> EITER = 0x0
> Elt "channel" HASH = 0xa1b4d5a5
> SV = IV(0x1b68790) at 0x1b68794
> REFCNT = 1
> FLAGS = (ROK)
> RV = 0x19b2c14
> SV = PVGV(0x2df109c) at 0x19b2c14
> REFCNT = 1
> FLAGS = (OBJECT,RMG,MULTI)
> MAGIC = 0x1aba2b4
> MG_VIRTUAL = &PL_vtbl_backref
> MG_TYPE = PERL_MAGIC_backref(<)
> MG_FLAGS = 0x02
> REFCOUNTED
> MG_OBJ = 0x2bf9aac
> SV = PVAV(0x1a9bb74) at 0x2bf9aac
> REFCNT = 2
> FLAGS = ()
> ARRAY = 0x2de973c
> FILL = 0
> MAX = 3
> ARYLEN = 0x0
> FLAGS = ()
> STASH = 0x19eb4bc "Net::SSH2::Channel"
> NAME = "_GEN_0"
> NAMELEN = 6
> GvSTASH = 0x19eb4bc "Net::SSH2::Channel"
> GP = 0x2d3999c
> SV = 0x1ab6364
> REFCNT = 1
> IO = 0x2d00af4
> FORM = 0x0
> AV = 0x0
> HV = 0x0
> CV = 0x2bf9abc
> CVGEN = 0x0
> LINE = 20
> FILE =
> "G:\Data\CurrWrka\00CommonPerl\03aaplxxx\aapl508gv.pl"
> FLAGS = 0x2
> EGV = 0x19b2c14 "_GEN_0"
> Elt "ssh2" HASH = 0x259adce
> SV = IV(0x187be60) at 0x187be64
> REFCNT = 1
> FLAGS = (ROK)
> RV = 0x187be54
> SV = PVMG(0x18cf7a4) at 0x187be54
> REFCNT = 4
Whoa! This reference count should not be 4 but 2.
> FLAGS = (OBJECT,IOK,pIOK)
> IV = 25707468
> NV = 0
> PV = 0
> STASH = 0x189014c "Net::SSH2"
> Net::SSH2::Channel::DESTROY
> SV = IV(0x1a1b3e8) at 0x1a1b3ec
> REFCNT = 1
> FLAGS = (PADMY,ROK)
> RV = 0x3a1b4
> SV = PVHV(0x187031c) at 0x3a1b4
> REFCNT = 2
> FLAGS = (OBJECT,OOK,SHAREKEYS)
> STASH = 0x3a0a4 "main"
> ARRAY = 0x2d8d06c (0:6, 1:2)
> hash quality = 125.0%
> KEYS = 2
> FILL = 2
> MAX = 7
> RITER = -1
> EITER = 0x0
> Elt "channel" HASH = 0xa1b4d5a5
> SV = IV(0x1b68790) at 0x1b68794
> REFCNT = 1
> FLAGS = ()
> IV = 0
> Elt "ssh2" HASH = 0x259adce
> SV = IV(0x187be60) at 0x187be64
> REFCNT = 1
> FLAGS = (ROK)
> RV = 0x187be54
> SV = PVMG(0x18cf7a4) at 0x187be54
> REFCNT = 3
And here it should not be 3 but 1. That's why the Net::SSH2 object is
not being released until the script ends.
This is a bug on Net::SSH2. I have been looking over its source code and
I see no obvious error so you should report the bug to the module
author.
<<aapl508gt.pl.txt>>
If you have any questions and/or problems, please let me know.
Thanks.
Wags ;)
David R. Wagner
Senior Programmer Analyst
FedEx Services
1.719.484.2097 Tel
1.719.484.2419 Fax
1.408.623.5963 Cell
http://Fedex.com/us
Message body is not shown because sender requested not to inline it.