Occasional hang

Advertisement

hadrien
Joined:
Posts:
7

Occasional hang

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:

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:
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

Reply with quote

Advertisement

hadrien
Joined:
Posts:
7

Re: Occasional hang

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

Reply with quote

martin
Site Admin
martin avatar

Re: Occasional hang

I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.

Reply with quote

Advertisement

Thomas_C
Guest

Hanging logs

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.

Reply with quote

hadrien
Joined:
Posts:
7

Hi Martin,

we finally reproduce the issue with the new build. Seems to be related to a MessageDlg that popup even in command line... In attachment the logs. Thanks for your investigation.
  • winscp-20170830211006.log (202.46 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

hadrien wrote:

Hi Martin,

we finally reproduce the issue with the new build. Seems to be related to a MessageDlg that popup even in command line... In attachment the logs. Thanks for your investigation.
It seems that some runs of the task overlap and they fight over an INI file.

Few possible solutions:
- Do not rely on an external configuration at all: https://winscp.net/eng/docs/scripting#configuration
- Set INI file read only: https://winscp.net/eng/docs/config#ini_readonly
- Use registry instead of an INI file

Reply with quote

Pyre909
Donor
Joined:
Posts:
21
Location:
Utah

Application Hang on Windows 10 Version 1803

Hi Martin,

Lately I have experience random hangs in Winscp. I never had any on prior to 1803.Currently trying to recreate the issue and see if I can get it captured on the log.

Regards

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Application Hang on Windows 10 Version 1803

Pyre909 wrote:

Lately I have experience random hangs in Winscp. I never had any on prior to 1803.Currently trying to recreate the issue and see if I can get it captured on the log.
What version of WinSCP are you using? Do you have any idea/suspicion what operation/event causes the hang?

Reply with quote

Pyre909
Donor
Joined:
Posts:
21
Location:
Utah

Application Hang on Windows 10 Version 1803

Hi Martin,

Most of the time it deals with moving files from the remote server to local. There is a slight pause when dragging and dropping then it allows the operation.

Version: 5.13.3
Windows 10 version 1803 x64

Reply with quote

martin
Site Admin
martin avatar

Re: Application Hang on Windows 10 Version 1803

Pyre909 wrote:

Most of the time it deals with moving files from the remote server to local. There is a slight pause when dragging and dropping then it allows the operation.
I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Was this issue fixed?

nkarkacheva wrote:

If yes - in which version?
Which issue? This topic includes multiple unrelated problems already. The best would be, if you start a new thread and describe the specific problem you are facing.

Reply with quote

Advertisement

You can post new topics in this forum