Re: [twsocket] FTP and Memo - LogText?

2013-06-02 Thread Arno Garrels
On Thursday, May 30, 2013 7:24 PM [GMT+1=CET],
Angus Robertson - Magenta Systems Ltd schrob:

>> *Subject:* Re: [twsocket] FTP and Memo - LogText?
>>> The server bug is something to do with the thread that is used
>>> for the> directory listing and compressing the result
> 
>> I guess that code added after V1.46 to the worker thread is not
>> thread save. Or that calls from the events that trigger in worker
>> thread context are not safe etc..
> 
> I suspect the bug is related to listing parameters, I download and
> upload stuff to my public server dozens of times a day, always using
> the XDMLSD command, the bug only seems to happen when listing the
> root directory, but does have some randomness to it, otherwise I've
> have seen it ages ago. It just got pushed back in my job queue
> because no-one else reported it, until today.

There was at least one call to TriggerDisplay that was obviously not
thread-safe that I removed from TClientProcessingThread.Execute.
The workaround would be to not include ftpsThreadRecurDirs in the 
TFtpServer.Options.

I checked in this fix for both V7 and V8, it will be available in 
the next nightly ZIP download as well. 

-- 
Arno
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FTP and Memo - LogText?

2013-05-30 Thread Angus Robertson - Magenta Systems Ltd
> *Subject:* Re: [twsocket] FTP and Memo - LogText?
> > The server bug is something to do with the thread that is used 
> > for the> directory listing and compressing the result

> I guess that code added after V1.46 to the worker thread is not 
> thread save. Or that calls from the events that trigger in worker
> thread context are not safe etc..

I suspect the bug is related to listing parameters, I download and upload
stuff to my public server dozens of times a day, always using the XDMLSD
command, the bug only seems to happen when listing the root directory,
but does have some randomness to it, otherwise I've have seen it ages ago.
It just got pushed back in my job queue because no-one else reported it,
until today.  

Angus


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FTP and Memo - LogText?

2013-05-30 Thread Arno Garrels
On Thursday, May 30, 2013 11:32 AM [GMT+1=CET],
Angus Robertson - Magenta Systems Ltd schrob:

> The server bug is something to do with the thread that is used for the
> directory listing and compressing the result, I've seen different
> errors, and sometimes it works once and then fails.  Not been able to
> reproduce it under the debugger yet, will try again next week, busy
> this week. 

I guess that code added after V1.46 to the worker thread is not thread
save. Or that calls from the events that trigger in worker thread context
are not safe etc..

-- 
Arno  
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FTP and Memo - LogText?

2013-05-30 Thread Angus Robertson - Magenta Systems Ltd
> Noticed odd bug in the FTP Transfer program. 
> I used OverbyteIcsSslFtpServ.exe on another machine 

The bug is in the ICS FTP server, with the new XDMLSD directory listing
command, that is only likely to be used by the ICS FTP client.

> < 192.168.0.33 XDMLSD -R
> > 192.168.0.33 226 File sent ok
> > 192.168.0.33 451 Failed: Access violation at address 004B9E39 in 
> > module 'OverbyteIcsSslFtpServ.exe'. Read of address .

I saw the bug myself last week when testing the latest version of the ICS
Xfer components, that now support improved progress information with
duration estimates and ignore sub-directories.  So far I've only updated
the v3W components for Delphi 2007 (which I used for all my own
applications), not the normal v3 components for D2009 and later, will do
that next week. 

> XDMLSD -R
> Failed to compress file - Access violation at address 005315ED in
> module 'magfserver.exe'. Read of address 

and

> XDMLSD -R
> Using thread to list directory
> Directory 0bytes sent in 0 milliseconds
> Unhandled Server BgException: Thread Error: The handle is invalid (6)

The server bug is something to do with the thread that is used for the
directory listing and compressing the result, I've seen different errors,
and sometimes it works once and then fails.  Not been able to reproduce
it under the debugger yet, will try again next week, busy this week.  

In the client, you can set magftpNoFeat in MagFtpOpts to stop the
advanced commands being used. 

Angus

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] FTP and Memo - LogText?

2013-05-30 Thread Allan Fernandes
Hi,

Noticed odd bug in the FTP Transfer program. Just informing you so you
can check similar situation at your side.
Simply remark the line as shown below and the FTP transfer function misbehaves.
I used OverbyteIcsSslFtpServ.exe on another machine whose logs I have
given below.

Situation : Server and Client had same single file and ideally no copy
should happen.

In demomain3.pas
___
procedure TForm1.AddLogText (S: string) ;
begin
if Application.Terminated then exit ;
//LogText.Lines.Add (S) ;   // general unformatted comments about xfers
end ;

Misbehavior, with the remark. Took long so stopped transfer.
___
! 192.168.0.33 connected
< 192.168.0.33 HOST allan-1
! Could not find Accounts File: c:\documents and
settings\allan\desktop\ftp\ftpaccounts-allan-1.ini
> 192.168.0.33 504 HOST unknown or not allowed.
< 192.168.0.33 USER ics
! Opening Accounts File: c:\documents and
settings\allan\desktop\ftp\ftpaccounts-default.ini
> 192.168.0.33 331 Password required for ics.
< 192.168.0.33 PASS ics
! 192.168.0.33=ics is authenticated
! 192.168.0.33=ics Home Directory: c:\temp\
> 192.168.0.33 230 User ics logged in.
< 192.168.0.33 PWD
> 192.168.0.33 257 "/" is current directory.
< 192.168.0.33 FEAT
> 192.168.0.33 211-Extensions supported:
 HOST
 SIZE
 REST STREAM
 MDTM
 MDTM MMDDHHMMSS[+-TZ] filename
 MLST size*;type*;perm*;create*;modify*;
 MFMT
 MD5
 XCRC "filename" start end
 XMD5 "filename" start end
 CLNT
 SITE INDEX;ZONE;CMLSD;DMLSD
 MODE Z
 XCMLSD
 XDMLSD
 UTF8
 LANG EN*
 OPTS MODE;UTF8;
 AUTH TLS;SSL;
 CCC
 PROT C;P;
 PBSZ
211 END
< 192.168.0.33 CLNT ICS FTP Client V7.28
> 192.168.0.33 200 Noted OK.
< 192.168.0.33 OPTS UTF8 ON
> 192.168.0.33 200 UTF8 ON Ok.
< 192.168.0.33 TYPE I
> 192.168.0.33 200 Type set to I.
< 192.168.0.33 SYST
> 192.168.0.33 215 UNIX Type: L8 Internet Component Suite
< 192.168.0.33 CWD /dsafebackftp/
> 192.168.0.33 250 CWD command successful. "/dsafebackftp" is current directory.
< 192.168.0.33 PWD
> 192.168.0.33 257 "/dsafebackftp" is current directory.
< 192.168.0.33 PASV
> 192.168.0.33 227 Entering Passive Mode (192,168,0,50,64,2).
< 192.168.0.33 XDMLSD -R
> 192.168.0.33 226 File sent ok
< 192.168.0.33 CWD /dsafebackftp/[af]/
> 192.168.0.33 250 CWD command successful. "/dsafebackftp/[af]" is current 
> directory.
> 192.168.0.33 451 Failed: Access violation at address 004B9E39 in module 
> 'OverbyteIcsSslFtpServ.exe'. Read of address .
< 192.168.0.33 PWD
> 192.168.0.33 257 "/dsafebackftp/[af]" is current directory.
< 192.168.0.33 CWD /
> 192.168.0.33 250 CWD command successful. "/" is current directory.
< 192.168.0.33 PWD
> 192.168.0.33 257 "/" is current directory.
< 192.168.0.33 CWD dsafebackftp
> 192.168.0.33 250 CWD command successful. "/dsafebackftp" is current directory.
< 192.168.0.33 CWD /dsafebackftp/[af]/
> 192.168.0.33 250 CWD command successful. "/dsafebackftp/[af]" is current 
> directory.
< 192.168.0.33 PWD
> 192.168.0.33 257 "/dsafebackftp/[af]" is current directory.
< 192.168.0.33 ALLO 67115045
> 192.168.0.33 200 ALLO OK, 41588469760 bytes available.
< 192.168.0.33 PASV
> 192.168.0.33 227 Entering Passive Mode (192,168,0,50,64,4).
< 192.168.0.33 STOR af_d1_ftp_0002f_zip.tmp
> 192.168.0.33 150 Opening data connection for af_d1_ftp_0002f_zip.tmp.
> 192.168.0.33 226 File received ok
! 192.168.0.33 disconnected


Log with the remark worked fine.
___
! 192.168.0.33 connected
< 192.168.0.33 HOST allan-1
! Could not find Accounts File: c:\documents and
settings\allan\desktop\ftp\ftpaccounts-allan-1.ini
> 192.168.0.33 504 HOST unknown or not allowed.
< 192.168.0.33 USER ics
! Opening Accounts File: c:\documents and
settings\allan\desktop\ftp\ftpaccounts-default.ini
> 192.168.0.33 331 Password required for ics.
< 192.168.0.33 PASS ics
! 192.168.0.33=ics is authenticated
! 192.168.0.33=ics Home Directory: c:\temp\
> 192.168.0.33 230 User ics logged in.
< 192.168.0.33 PWD
> 192.168.0.33 257 "/" is current directory.
< 192.168.0.33 FEAT
> 192.168.0.33 211-Extensions supported:
 HOST
 SIZE
 REST STREAM
 MDTM
 MDTM MMDDHHMMSS[+-TZ] filename
 MLST size*;type*;perm*;create*;modify*;
 MFMT
 MD5
 XCRC "filename" start end
 XMD5 "filename" start end
 CLNT
 SITE INDEX;ZONE;CMLSD;DMLSD
 MODE Z
 XCMLSD
 XDMLSD
 UTF8
 LANG EN*
 OPTS MODE;UTF8;
 AUTH TLS;SSL;
 CCC
 PROT C;P;
 PBSZ
211 END
< 192.168.0.33 CLNT ICS FTP Client V7.28
> 192.168.0.33 200 Noted OK.
< 192.168.0.33 OPTS UTF8 ON
> 192.168.0.33 200 UTF8 ON Ok.
< 192.168.0.33 TYPE I
> 192.168.0.33 200 Type set to I.
< 192.168.0.33 SYST
> 192.168.0.33 215 UNIX Type: L8 Internet Component Suite
< 192.168.0.33 CWD /dsafebackftp/
> 192.168.0.33 250 CWD command successful. "/dsafebackftp" is current directory.
< 192.168.0.33 PWD
> 192.168.0.33 257 "/dsafebackftp" is current directory.
< 192.168.0.33 PASV
> 192.168.0.33 227 Entering Passive Mode (192,168,0,50,64,1).
< 192.168.0.33 XDMLSD -R
> 192.168.0.33 150 Opening data connectio