Debugging SFTP question

Graeme Wallace graeme.wallace at farecompare.com
Sat May 4 08:58:59 EST 2013


I'm using the openssh that comes with Ubuntu 12.04 so thats 5.9p1

I'm trying to debug why i'm getting corrupt bzip2 files when they are
transferred using sftp. The corruption doesnt happen on every file. I'm
running debug mode on sftp-server, but when doing that i see output like
the following for both valid and corrupt files,


May  3 18:50:55 ftp-new sftp-server[16955]: debug3: request 1470: sent
status 0
May  3 18:50:55 ftp-new sftp-server[16955]: sent status Success
May  3 18:50:55 ftp-new sftp-server[16955]: debug1: request 1471: write
"/home/travelport2/OTH_ALL_20130503_2247_V3.part" (handle 0) off 48103424
len 32768
May  3 18:50:55 ftp-new sftp-server[16955]: debug3: request 1471: sent
status 0
May  3 18:50:55 ftp-new sftp-server[16955]: sent status Success
May  3 18:50:55 ftp-new sftp-server[16955]: debug1: request 1472: write
"/home/travelport2/OTH_ALL_20130503_2247_V3.part" (handle 0) off 48136192
len 32768
May  3 18:50:55 ftp-new sftp-server[16955]: debug3: request 1472: sent
status 0
May  3 18:51:01 ftp-new sftp-server[16955]: debug1: request 3383: write
"/home/travelport2/OTH_ALL_20130503_2247_V3.part" (handle 0) off 110755840
len 32768
May  3 18:51:01 ftp-new sftp-server[16955]: debug3: request 3383: sent
status 0
May  3 18:51:01 ftp-new sftp-server[16955]: sent status Success
May  3 18:51:01 ftp-new sftp-server[16955]: debug1: request 3384: write
"/home/travelport2/OTH_ALL_20130503_2247_V3.part" (handle 0) off 110788608
len 32768
May  3 18:51:01 ftp-new sftp-server[16955]: debug3: request 3384: sent
status 0
May  3 18:51:01 ftp-new sftp-server[16955]: sent status Success
May  3 18:51:01 ftp-new sftp-server[16955]: debug1: request 3385: write
"/home/travelport2/OTH_ALL_20130503_2247_V3.part" (handle 0) off 110821376
len 32768


Is it normal for request numbers and offsets to suddenly jump massively ?
>From looking at the code, it would seem the server is merely responding to
the request from the client, but I dont understand what would make the
client 'skip' from offset 48136192 to offset 110755840 and from request
1472 to 3383 - as the client code looks like its just it plods through the
file.

Is this just a red herring ?

-- 
Graeme Wallace
CTO
FareCompare.com
O: 972 588 1414
M: 214 681 9018


More information about the openssh-unix-dev mailing list