Some questions:
1) Can you deterministically reproduce the error or it just happens from time to time?
2) Does it happen for any gpg compressed file or just for some specific one?
3) If it is deterministic and happens for some specific file can you try repeating your tests with a newer perl as perl 5.8.9?
I have been running tests here trying to reproduce the problem without success and I am unable to see any problem in the module logic just looking at the code either.
My only guess at the moment is that it could be related to some unicode bug in your old perl version 5.8.3... though, that would not explain why it fails when resuming only.
Anyway, I am adding some more debugging to the resume feature and will send you a new version of the module soon that would allow me to find where the missing byte is dropped.
Cheers,
- Salva
----- Original Message ----
> From: Heather Fischer via RT <bug-Net-SFTP-Foreign@rt.cpan.org>
> Sent: Tue, May 18, 2010 5:52:14 PM
> Subject: RE: [rt.cpan.org #57386] Net-SFTP-Foreign Bug
>
> Queue: Net-SFTP-Foreign
Ticket <URL:
Good
> morning,
Attached is the debug information for the *.zip.gpg file listed
> below that was resumed after the initial transmission was killed part way thru
> the ftp.
The *.zip.gpg below is the file ftped with resume after the
> first transmission aborted partially thru the ftp process. Not that it is
> one byte smaller than the good file.
ndftp:/home/sftptest/incoming:# ls
> -ltr
total 696
-rw-rw-rw- 1 sftptest sftponly 356053 May 18 10:08
> ttbillsdoc1B01528_02_201005_201005_88888_02042_TST.zip.gpg.good
-rw-rw-rw- 1
> sftptest sftponly 356052 May 18 10:37
> ttbillsdoc1B01528_02_201005_201005_88888_02042_TST.zip.gpg
Decryption
> failed:
ndftp:/home/sftptest/incoming:# gpg --homedir /.gnupg -o
> ttbillsdoc1B01528_02_201005_201005_88888_02042_TST.zip --decrypt
> ttbillsdoc1B01528_02_201005_201005_88888_02042_TST.zip.gpg
gpg: WARNING:
> unsafe enclosing directory permissions on configuration file
> `/.gnupg/options'
gpg: encrypted with 1024-bit ELG-E key, ID 1EA8814A,
> created 2001-06-25
"NISC ND (NISC GnuPG Key) <
> ymailto="mailto:nisc@nisc.cc"
> href="mailto:nisc@nisc.cc">nisc@nisc.cc>"
gpg: fatal: zlib inflate
> problem: invalid code lengths set
secmem usage: 2112/2368 bytes in 4/7 blocks
> of pool 3456/32768
ndftp:/home/sftptest/incoming:# mv
> ttbillsdoc1B01528_02_201005_201005_88888_02042_TST.zip.gpg
> ttbillsdoc1B01528_02_201005_201005_88888_0204_TST.zip.gpg.bad
The
> ".zip.gpg.good" file was ftped normally with no interruption in transmission so
> resume was not used. The good file decrypts
> successfully.
ndftp:/home/sftptest/incoming:# gpg --homedir /.gnupg
> -o ttbillsdoc1B01528_02_201005_201005_88888_02042_TST.zip --decrypt
> ttbillsdoc1B01528_02_201005_201005_88888_02042_TST.zip.gpg.good
gpg: WARNING:
> unsafe enclosing directory permissions on configuration file
> `/.gnupg/options'
gpg: encrypted with 1024-bit ELG-E key, ID 1EA8814A,
> created 2001-06-25
"NISC ND (NISC GnuPG Key) <
> ymailto="mailto:nisc@nisc.cc"
> href="mailto:nisc@nisc.cc">nisc@nisc.cc>"
ndftp:/home/sftptest/incoming:#
> ls -ltr
total 1048
-rw-rw-rw- 1 sftptest sftponly 356053 May 18 10:08
> ttbillsdoc1B01528_02_201005_201005_88888_02042_TST.zip.gpg.good
-rw-rw-rw- 1
> sftptest sftponly 356052 May 18 10:37
> ttbillsdoc1B01528_02_201005_201005_88888_02042_TST.zip.gpg.bad
-rw-r--r-- 1
> root root 360136 May 18 10:39
> ttbillsdoc1B01528_02_201005_201005_88888_02042_TST.zip
ndftp:/home/sftptest/incoming:#
> unzip -l
> ttbillsdoc1B01528_02_201005_201005_88888_02042_TST.zip
Archive:
> ttbillsdoc1B01528_02_201005_201005_88888_02042_TST.zip
Length
> Date Time Name
-------- ----
> ---- ----
6219 05-17-10 20:49
> B01528023553.rpt
3649 05-17-10 20:49
> B0152802err.rpt
5424 05-17-10 20:49
> B0152802group.rpt
5355 05-17-10 20:49
> B0152802piece.rpt
204552 05-17-10 20:49
> B01528_02_201005_88888p.pdf
416 05-17-10
> 20:49 B01528_02_201005_88888p.sni
1490697 05-17-10
> 20:49 B01528_02.ps
--------
> -------
1716312
> 7 files
ndftp:/home/sftptest/incoming:#
>
Please let me know what you find. We would really like to use
> the resume option to ftp very large encrypted disaster management files to our
> sftp server.
Thank you.
Heather Fischer
Senior Systems
> Specialist
National Information Solutions Cooperative
3201 Nygren
> Drive
Mandan, ND 58554
**Email:
> ymailto="mailto:heather.fischer@nisc.coop"
> href="mailto:heather.fischer@nisc.coop">heather.fischer@nisc.coop
**Phone:
> 866.WWW.NISC (866.999.6472) ext 6776
**Direct: 701-667-6776
>
-----Original Message-----
From: Salvador
> \"Fandiño\" via RT [mailto:
> href="mailto:bug-Net-SFTP-Foreign@rt.cpan.org">bug-Net-SFTP-Foreign@rt.cpan.org]
>
Sent: Friday, May 14, 2010 3:49 PM
To: Heather Fischer
Subject: Re:
> [rt.cpan.org #57386]
> Net-SFTP-Foreign Bug
<URL:
> href="http://rt.cpan.org/Ticket/Display.html?id=57386" target=_blank
----- Original Message ----
> From: Heather
> Fischer via RT <
> href="mailto:bug-Net-SFTP-Foreign@rt.cpan.org">bug-Net-SFTP-Foreign@rt.cpan.org>
>
> Sent: Fri, May 14, 2010 9:43:14 PM
> Subject: RE: [rt.cpan.org #57386]
> Net-SFTP-Foreign Bug
>
> Queue:
> Net-SFTP-Foreign
Ticket <URL:
> href="
> href="https://rt.cpan.org/Ticket/Display.html?id=57386" target=_blank
>
Hi,
Has
>
> the resume option been tested with encrypted files? For the
> "gets", resume
> works well for .tar, .zip and encrypted files. However,
> for "put"s, the files
> encrypted with GPG are corrupt when resume is
> used to finish a partial
> download. The resume "put" option works
> good for the .tar and .zip
> files.
I guess the problem is more
> related to some other property of the file than to being encrypted as the module
> does not process the file contents in anyway, it just sees raw data.
>
> Should I open a different bug for this put, resume, encrypted file
>
> issue?
just try to reproduce the problem with
> $Net::SFTP::Foreign::debug = -1
And send me the output.
It seems
> that one byte has been lost in the "resumed" file transfer... I would
> investigate where the problem can be.
Cheers
- Salva