You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
File will be deleted when renamed after moving into newly created folder #7032
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussionneeds-triageNew issues needed to be validated
Moves are represented as a create followed by a deleted, which is then optimised to a rename on the receiving side.
I guess if you have some luck reproducing this, I'd be interesting to run with STTRACE=model env var on both sides and compare the output when this happens and when it doesn't.
I have no doubt it might be a race condition, but I can't clearly see it, because things in syncthing happens in cycles, so it's either trying to pull (download all of the files outstanding), or scanning (and sending changes it detects).
In your scenario scanning and pulling happens at the same time, which I think is impossible.
If anything, I'd atleast expect to see some errors in the log about file modified but not rescanned, etc.
I guess it might be hard to reproduce this synthetically, as probably your setup hits some lucky timings to exercise the race condition.
While trying to reproduce the error I came across some other weird behaviour.
I created a Folder (initial name Untitled Folder) and renamed it to Test.
But the rename was not synced.
When I renamed the folder Test to Test2 the remove command for Untitled Folder was logged
(see the last 3 lines of the log)
Directories are never renamed, and they are deleted and recreated, only files are renamed.
So if you rename a large directory tree, we'd pre-create the new directories, rename all the files, and remove old directories.
I guess if you are trying to repro this through the prism of the filesystem, you'll probably have an indication of this happening, but it won't help answer why it happened, as the race condition most likely lives in the model.
I think the issue is caused by using Nemo (the default file browser on Linux Mint).
The issue occured a few more times. Only when I created a new folder with Nemo and never when I created a folder from VS code or the command line.
I think it is caused by the behaviour that Nemo creates the actual folder on the disk with the placeholder name Untitled Folder and after you enter your desired folder name, it renames the folder.
The other programs create the folder initially with the desired name, so there is no rename happening.
I am not sure if this is helpful, but it's something I noticed...
This doesn't really help understanding the problem. I suggest you look at the debugging facilities I suggested as you try and make a reproducer for this.
Sadly if there is no way for us to reproduce this, or no logs explaining the issue, I'll have to close this as we can't fix something we can't see.
Unless there's a definite way to reproduce this or logs with the debugging facilities requested above enabled while it happens, there's nothing that can be done about this issue. Please open a topic on the forum for more help on how to debug this or if you do have a reproducer or the required logs, feel free to post them and re-open this issue.
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussionneeds-triageNew issues needed to be validated
Activity
AudriusButkevicius commentedon Oct 12, 2020
Are you able to reproduce this with 2 devices?
Do all actions happen on the same device?
BeayemX commentedon Oct 12, 2020
All actions happen on the same device.
The actions happend in a matter of seconds one after another.
Sadly I can't reproduce the error.
AudriusButkevicius commentedon Oct 12, 2020
If it's not something that can be reproduced, I am not sure if its something we can fix.
BeayemX commentedon Oct 13, 2020
Could it be that there is some kind of race condition?
I have not the slightest idea if Syncthing works this way, but that would be the only way that would kind of explain the issue.
AudriusButkevicius commentedon Oct 13, 2020
Moves are represented as a create followed by a deleted, which is then optimised to a rename on the receiving side.
I guess if you have some luck reproducing this, I'd be interesting to run with STTRACE=model env var on both sides and compare the output when this happens and when it doesn't.
I have no doubt it might be a race condition, but I can't clearly see it, because things in syncthing happens in cycles, so it's either trying to pull (download all of the files outstanding), or scanning (and sending changes it detects).
In your scenario scanning and pulling happens at the same time, which I think is impossible.
If anything, I'd atleast expect to see some errors in the log about
file modified but not rescanned, etc.I guess it might be hard to reproduce this synthetically, as probably your setup hits some lucky timings to exercise the race condition.
BeayemX commentedon Oct 13, 2020
While trying to reproduce the error I came across some other weird behaviour.
I created a Folder (initial name
Untitled Folder) and renamed it toTest.But the rename was not synced.
When I renamed the folder
TesttoTest2theremovecommand forUntitled Folderwas logged(see the last 3 lines of the log)
AudriusButkevicius commentedon Oct 13, 2020
Directories are never renamed, and they are deleted and recreated, only files are renamed.
So if you rename a large directory tree, we'd pre-create the new directories, rename all the files, and remove old directories.
I guess if you are trying to repro this through the prism of the filesystem, you'll probably have an indication of this happening, but it won't help answer why it happened, as the race condition most likely lives in the model.
BeayemX commentedon Oct 29, 2020
I think the issue is caused by using Nemo (the default file browser on Linux Mint).
The issue occured a few more times. Only when I created a new folder with Nemo and never when I created a folder from VS code or the command line.
I think it is caused by the behaviour that Nemo creates the actual folder on the disk with the placeholder name
Untitled Folderand after you enter your desired folder name, it renames the folder.The other programs create the folder initially with the desired name, so there is no rename happening.
I am not sure if this is helpful, but it's something I noticed...
AudriusButkevicius commentedon Oct 30, 2020
This doesn't really help understanding the problem. I suggest you look at the debugging facilities I suggested as you try and make a reproducer for this.
Sadly if there is no way for us to reproduce this, or no logs explaining the issue, I'll have to close this as we can't fix something we can't see.
BeayemX commentedon Oct 31, 2020
Maybe a related issue #6293
imsodin commentedon Nov 24, 2020
Unless there's a definite way to reproduce this or logs with the debugging facilities requested above enabled while it happens, there's nothing that can be done about this issue. Please open a topic on the forum for more help on how to debug this or if you do have a reproducer or the required logs, feel free to post them and re-open this issue.