Topic "Occasional hang"

Author Message
hadrien
[View user's profile]

Joined: 2017-06-26
Posts: 4
I have a scheduled task (every 2 minutes) which calls via a Perl script WinSCP to upload files using scripting, not the GUI.

Sometime WINSCP get stuck and doesn't exit (approximately one session every day). It is random and not related to a time of the day or another factor. I am also unable to reproduce it.

I am using WinSCP Version 5.5.5.4605 - Windows Server 2012.

The Perl part is like this one:

Code:

my $pobj;
my $cmdline="\"$winscppath\" /console /script=$script /log=$log";
Win32::Process::Create($pobj,
                        $winscppath,
                        $cmdline,
                        ,0,
                        DETACHED_PROCESS,
                        ".") || die "Create: $!";
do {
   $pobj>Wait(500)
   $pobj>GetExitCode($exitcode);
        if ($exitcode eq STILL_ACTIVE) {
      ...
        }
}while ($exitcode eq STILL_ACTIVE && timeout);


The winscp script ($script file above) looks like:
Code:

option batch abort
option confirm off
open SFTP://XXXX:YYY@server -hostkey="ssh-rsa XXXXXXX" -rawsettings compression=1
option transfer binary
cd FOLDER
Put file1.ftp file1.ftp
Put file2.ftp file2.ftp
exit



See Winscp.ini and log in attachment.

I hope that it can point to root cause, even though reproducing the issue is not clear. Is there something wrong in my configuration? Is there a work around? Many thanks.
winscp.log (8.12 KB) Private file

Description: logs

winscp_ini.txt (10.97 KB) Private file

Description: winscp.ini

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26572
Location: Prague, Czechia
Please start by upgrading WinSCP to the latest version.
_________________
Martin Prikryl
hadrien
[View user's profile]

Joined: 2017-06-26
Posts: 4
Thank, I will. Notice that the issue occurs also with the old version 4.2.9.
hadrien
[View user's profile]

Joined: 2017-06-26
Posts: 4
I update to the lastest version 5.9.6. Unfortunately, I still get the same issue.

The Perl part and the config haven't been changes.

Please see an example of winscp new log in attachment.

Many thanks for looking at this.
winscp.log (8.34 KB) Private file

Description: Winscp log v 5.9.6

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26572
Location: Prague, Czechia
I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.
hadrien
[View user's profile]

Joined: 2017-06-26
Posts: 4
Thank you for your quick answer, I'll see how I can integrate it in our env to replicate the issue and keep you posted.
Thomas_C

Guest


Hi I'm Thomas, working with hadrien. We have been able to reproduce the issue with your debug version, you'll find log and trace there :
ftp://winscp_tests:winscp1234@www.mybreuil.com

Just to remind you the issue, we launched winscp through the win32::Process at 8:05, then last log in standard log happened at 08:07:01, and 08:11 in trace, but process remains STILL_ACTIVE until 08:35 when we manually killed after TIMEOUT.

The global context is a Scheduled Task.

Many thanks,
Thomas.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26572
Location: Prague, Czechia
Thanks. I'm sending you a new build of the debug version.
Advertisements

You can post new topics in this forum






Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License