Topic "Find Files gets stuck in endless loop (Bug 1093 not fixed?)"

Author Message
HaroldFinch
[View user's profile]

Joined: 2014-10-24
Posts: 7
Location: The Library
I tried using the Find Dialog today, and it got stuck in an endless loop.

The WinSCP_find_bug.png file that I attached to this post shows what the Find Dialog looks like when it gets stuck.

In particular, look at how the path on the bottom seems to be repeating. Looks to me like it has gotten stuck in an infinite loop that involves /sys/devices/platform/pcspkr/subsystem.

On my file system, /sys/devices/platform/pcspkr/subsystem is a link that points to ../../../bus/platform.

So, my guess is that this infinite loop is due to following a link. In other words, bug 1093 appears to still be present in current stable builds of WinSCP.

~~~~~~~~~~

I was using WinSCP 5.5.1, but tried upgrading to the latest stable release, 5.5.6 as of today, and I still see this bug.

I am running on Win 7 Pro 64 bit (tho this likely makes no difference).

The connection protocol is SFTP.

I am using the GUI.

No error dialog ever appears--the GUI spins endlessly in the Find Dialog.

~~~~~~~~~~

Personal note to the WinSCP devs: thanks so much for this program--it has made my life much easier!
WinSCP_find_bug.png (43.26 KB) [Download]

Description: (none)

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
_________________
Martin Prikryl
HaroldFinch
[View user's profile]

Joined: 2014-10-24
Posts: 7
Location: The Library
Martin,

As per your suggestion, I first temporarily enabled session logging to the file WinSCP.log, which is attached here.

I then did the same search as before (looking for a file of type *22559* in my /sys directory).

Once again, from the paths shown on the bottom of the Find dialog, it seemed to be stuck in a loop.

So, after several seconds, I manually stopped the Find.

I hope that the log helps you track down the problem. Looking over it, the logs seem to repeat, which seems to confirm my guess that that the code got stuck in a loop.
WinSCP.log (6.27 MB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Thanks for the log.

I have sent you an email with a debug version of WinSCP to address you have used to register on this forum.
HaroldFinch
[View user's profile]

Joined: 2014-10-24
Posts: 7
Location: The Library
prikryl wrote:
Thanks for the log.

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


Martin, here is what I did:

Code:
--I downloaded the debug build from the link that you emailed me
--I extracted everything from its zip file
--I noticed that the extraction produced a WinSCP.exe direct executable file (i.e. the full program, NOT an installer)
--so, I double clicked on that WinSCP.exe file; all subsequent operations below were done with it
   --NOTE: I did NOT uninstall my normal WinSCP install (5.5.6)
      --I had already rebooted my machine last night, after the last time I used the 5.5.6 GUI
      --I did not start up th 5.5.6 GUI so far today
      --I opened Task Manager and looked under processes, and verified that no instance of 5.5.6 was running
--that debug WinSCP.exe instance was agonizingly slow!
   --maybe 1000X slower than the normal build
   --operations that should be < 1 sec can take > 1 minute...
--fortunately, the debug WinSCP.exe instance did pick up old settings, so login to my server was easy
--I redid the same exact Find File operation as described in my original post
--after several minutes, I clicked on the stop button to kill the search, and then I shut down the program
--NOTE: this time, when the search was going on, I did not see the path endlessly repeat at the bottom of the Find File dialog


(Above formatted as code because that is the only way I can see to preserve line indents--any way that you can change this forum web software to support, say, the html pre tag?)

I am attaching the resulting WinSCP16A8trace.log file as a private file for you.[/code]
WinSCP16A8trace.log (5.14 MB) Private file

Description: (none)

smitty123
[View user's profile]

Joined: 2014-10-26
Posts: 36
Location: Canada
i noticed that too in relation to symbolic (?) links on my nas. it just keeps appending the link to the searched path and round it goes in a loop.

Also i'd like it if we could do things with the files found in the results. there's not much we can do but it would be more usefull if we could right-click them individually or as a lot and do file commands like delete, move, open folder etc.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
HaroldFinch wrote:
I am attaching the resulting WinSCP16A8trace.log file as a private file for you.

I have sent you new debug version. Let it run longer. It didn't even get to the symlink before you stopped it.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
smitty123 wrote:
i noticed that too in relation to symbolic (?) links on my nas. it just keeps appending the link to the searched path and round it goes in a loop.

I have sent you an email with a debug version of WinSCP to address you have used to register on this forum.
HaroldFinch
[View user's profile]

Joined: 2014-10-24
Posts: 7
Location: The Library
prikryl wrote:
HaroldFinch wrote:
I am attaching the resulting WinSCP16A8trace.log file as a private file for you.

I have sent you new debug version. Let it run longer. It didn't even get to the symlink before you stopped it.


Martin: I ran the same search with your new debug build last night for much longer, and am sure that it hit the symlink this time.

I am attaching the resulting WinSCP16A8trace.log file as a private file for you.


Note: I tried to do this last night before leaving work, but this website kept giving me errors saying "No post mode specified". So, today I tried again, but still got that error. So, I tried first zipping the log file. This worked, which means that file size was apparently the issue. I am aware of your webpage that says that the max file size limit is 10 MB. But that should not be a problem, as my original file size was 9031 KB. Furthermore, even if my file was too large, the error message should explicitly say that, and not give that misleading message about "No post mode specified".
WinSCP1434trace.zip (750.38 KB) Private file

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Thanks for the log. The problem is that there's symlink pointing to a symlink. With limitation of SFTP protocol version 3 (as implemented by OpenSSH), WinSCP won't find out that the second symlink is a symlink, so it won't detect the loop. It can definitely be worked around, but it's quite a change. So I'll see what the demand is.

I'll check for the issue with attachments you had.
HaroldFinch
[View user's profile]

Joined: 2014-10-24
Posts: 7
Location: The Library
prikryl wrote:
Thanks for the log. The problem is that there's symlink pointing to a symlink. With limitation of SFTP protocol version 3 (as implemented by OpenSSH), WinSCP won't find out that the second symlink is a symlink, so it won't detect the loop. It can definitely be worked around, but it's quite a change. So I'll see what the demand is.

I'll check for the issue with attachments you had.


Martin: thanks for figuring this out.

Does SFTP protocol version 4+ fix this issue?

My server which has this problem is running CentOS 6.4, which is not exactly bleeding edge anymore. Perhaps if it was updated, or somehow just the SFTP portion was, then this could be cured?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
HaroldFinch wrote:
Does SFTP protocol version 4+ fix this issue?

My server which has this problem is running CentOS 6.4, which is not exactly bleeding edge anymore. Perhaps if it was updated, or somehow just the SFTP portion was, then this could be cured?

Yes, SFTP version 4 fixes this.
Problem is that OpenSSH server supports only version 3.
HaroldFinch
[View user's profile]

Joined: 2014-10-24
Posts: 7
Location: The Library
prikryl wrote:
HaroldFinch wrote:
Does SFTP protocol version 4+ fix this issue?

My server which has this problem is running CentOS 6.4, which is not exactly bleeding edge anymore. Perhaps if it was updated, or somehow just the SFTP portion was, then this could be cured?

Yes, SFTP version 4 fixes this.
Problem is that OpenSSH server supports only version 3.


While waiting for OpenSSH to get their act together and support more modern protocols, would a temp hack fix for WinSCP be to add an option to not follow sym links in the Find Files dialog box?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
HaroldFinch wrote:
While waiting for OpenSSH to get their act together and support more modern protocols, would a temp hack fix for WinSCP be to add an option to not follow sym links in the Find Files dialog box?

Sure.
Meanwhile, you can disable symlink-resolution site-wide:
https://winscp.net/eng/docs/ui_login_directories
_________________
Martin Prikryl
HaroldFinch
[View user's profile]

Joined: 2014-10-24
Posts: 7
Location: The Library
prikryl wrote:
HaroldFinch wrote:
While waiting for OpenSSH to get their act together and support more modern protocols, would a temp hack fix for WinSCP be to add an option to not follow sym links in the Find Files dialog box?

Sure.
Meanwhile, you can disable symlink-resolution site-wide:
https://winscp.net/eng/docs/ui_login_directories


That would be too severe of medicine; I would only like to fall back on that in desperation.
Advertisements

You can post new topics in this forum






Search Site

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