Search via circular links

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

ghisler(Author)
Unfortunately, on my notebook with Vista the problem is still present when searching the structure mentioned in my post (Documents\Incoming\Documents\…), but I still cannot duplicate it. :( Everything I tried worked fine, without looping. The only thing I could not try yet is complete duplication of list of allowed users in permissions, because it contains one non-existent user UID (from network or something, don't remember exactly), so I could not duplicate it (I thought about removing it from permissions for testing, but if it would solve the problem I would have no more live testcases left).

BTW, even the example given by MVV earlier (TEMP\0\1\2) does not cause cycling on my computer even in 8.0β14…
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50549
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2Flint
You must really be having the problem that the user isn't allowed to read the link targets - TC can only prevent the infinite loop if the target of the link can be read.

Did you check with "dir" command both in Documents and Incoming directories whether the link targets are displayed or not?
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

ghisler(Author)
I wrote earlier that all permissions are enough, all the targets can be read either by the "dir" command from console, or using NL_Info. (Permissions are set to full access, actually, both all directories I'm working with and for links themselves.)
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Flint
Maybe you can post the source code for reading junction targets that you use in NL_Info?
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

Lefteous
It's open-source already, since 1.20.
http://www.totalcmd.net/plugring/nl_info.html
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50549
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, can't help you, it works fine with all junctions here.
Author of Total Commander
https://www.ghisler.com
mkobylan
Junior Member
Junior Member
Posts: 12
Joined: 2012-01-01, 22:31 UTC

Post by *mkobylan »

After upgrading to NL_Info 1.20 I can see now all targets in Total commander, even for c:\Users\All Users\.
Unfortunately neither ALT+SHIFT+Enter nor ALT+F7 can recognize passing the same folders multiple times in TotalCommander8.0beta15.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50549
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I really can't help you if I can't reproduce the problem here.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

ghisler(Author)
Anything we could do? Maybe, a test build that would log all the intermediate data that TC relies upon when it detects circular links?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50549
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have had a look at the source of NL_INFO, and noticed a difference to my own code: In TC, I'm handling only links of type IO_REPARSE_TAG_MOUNT_POINT. NL_INFO also handles links of type IO_REPARSE_TAG_SYMLINK. Maybe this is causing your problems? According to my tests, there is just one link of this new type on Windows 7 and Vista:
c:\users\All users -> c:\ProgramData

However, this link isn't leading to any infinite loops here. I have now added handling of this link type to beta 16. Maybe it helps.

It's also possible that you have relative links (with relative paths) - TC doesn't handle them so far.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
Maybe this is causing your problems?
I don't think so. Flints creenshot clearly shows that a classic junction is involved.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50549
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Any other ideas?
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I can't confirm my past test now even with older versions, it is funny. :D
But I can confirm it with Flint's test:
1. Create junction %USERPROFILE%\Documents\Incoming\Documents pointing to %USERPROFILE%\Documents.
2. Start search in %USERPROFILE%\Documents.

Of course use full paths since junctions doesn't support relative ones. Or simply use NTFSLinks tool.

Tested with TC8x32b15 and TC8x32b16.
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

I have performed some more experiments, and got some results that may be of value.

First, I found out that I actually can reproduce the problem easily, I just did not notice it sometimes earlier because TC reached the limit of path length too fast.

Second, I have now created on my WinXP system the structure described earlier by MVV, and TC went quite deeply into it. However, the limit seems to be set not by the maximum path length but by the nesting level of 32 (starting from the first reparse point TC met). When I start searching, TC reaches this limit very fast, so I was sure there was no cycling, but then I managed to catch a glimpse of repeated directory names in the Find Files dialog's status bar. So I started File Monitor and discovered that indeed TC reads the contents of the deeply nested paths, see screenshot:

http://flint-inc.ru/Temp/tcbeta80/search_cycling_links_filemon.png

And third (and, I think, most important of all), this can be reproduced only when I'm searching for something non-existent! That is, if I leave the "Search for" field empty, TC does not cycle through the junctions and stops immediately as cycle is detected. But if I specify something like "xxxx" and start searching, TC goes deeper and deeper, resulting in the screenshot above.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
Post Reply