Skip to content

Folder isn't making progress #889

Closed
Closed

Description

@alex2108

All nodes are on v0.10.2
GUI says

9:35:58: Folder "default" isn't making progress - check logs for possible root cause. Pausing puller for 1m0s.
9:36:41: Folder "PIA" isn't making progress - check logs for possible root cause. Pausing puller for 1m0s.

In the log I see the "hash mismatch" info but the file is not changed during pull. It was probably the whole night in that state but i don't have more logs, I should probably increase the size...
logs from the pulling node: http://alex-graf.de/public/st/no-progress.tar.gz

Restarting also does not fix it

Activity

  1. AudriusButkevicius commented on Oct 21, 2014

    @AudriusButkevicius
    Member

    :( that will be my fault I guess.

  2. AudriusButkevicius commented on Oct 21, 2014

    @AudriusButkevicius
    Member

    What's the file size? It seems all files are below 128kb?
    Can I make a debug build for you which would do some more logging?

    I thought I caught all the bugs, but that doesn't seem to be the case.

  3. alex2108 commented on Oct 21, 2014

    @alex2108
    ContributorAuthor

    Sizes in byte:
    1993 LOT_MSH-300_SN17969_mod.xml
    11589 plot_day_3.pdf
    11522 plot_day_5.pdf
    11491 plot_day_9.pdf

    Sure, i can test a debug build.

  4. AudriusButkevicius commented on Oct 21, 2014

    @AudriusButkevicius
    Member

    Also, can you try and copy the files and see if it happens again?

  5. alex2108 commented on Oct 22, 2014

    @alex2108
    ContributorAuthor

    copying the file fixes it, let's see for how long...

  6. alex2108 commented on Oct 22, 2014

    @alex2108
    ContributorAuthor

    ok changed one file and it's in this state again...
    On the pulling node .syncthing.LOT_MSH-300_SN17969_mod.xml and LOT_MSH-300_SN17969_mod.xml are the same and it's the old file, not the changed one.

    This time also another node that shares the repo got in the same bugged state.

  7. AudriusButkevicius commented on Oct 22, 2014

    @AudriusButkevicius
    Member

    Can you download a build from:
    http://build.syncthing.net/job/syncthing-branch/lastSuccessfulBuild/

    You don't need to set any debug flags, but make sure you redirect the output as it might produce a lot of it.

  8. AudriusButkevicius commented on Oct 22, 2014

    @AudriusButkevicius
    Member

    Deleting your index should fix this.
    I am not sure how this happened though.

    @calmh it seems that files.Update was called with an incorrect block, making me believe there is race condition?
    Should I add verification to the copier? But that means hashing as we copy :(

  9. alex2108 commented on Oct 22, 2014

    @alex2108
    ContributorAuthor

    deleting the index on pulling node only fixed it for a really short time...
    I changed the file again and it's broken again, log: http://alex-graf.de/public/st/2014-10-22_2.txt

  10. AudriusButkevicius commented on Oct 22, 2014

    @AudriusButkevicius
    Member

    Can you remove the index again, and try again, but this time produce the whole log?
    Because this seems to be only part of it, because I cannot see the file in question being indexed.
    You're supposed to have something like:

    Updating "Dokumente/notizen.txt" first block Block{0/2369/759e223351e9e6e127302bc63726d1691ec15a96132c7c1b428a7c6eff1b71ba}
    
  11. alex2108 commented on Oct 22, 2014

    @alex2108
    ContributorAuthor

    this should be the whole log, did not delete anything... or should i set some STTRACE also?
    'Dokumente/notizen.txt' was successfully pulled, the not working file is 'LOT_...'

    forget this, i restarted syncthing after indexing which was overwriting my log, so the indexing is not part of this log

  12. AudriusButkevicius commented on Oct 22, 2014

    @AudriusButkevicius
    Member

    Yeah, I see the successfully pulled file.
    Switch syncthing off, delete the index and start again, let's see what it produces this time.
    It should say "Pulling first block" for every existing file that has changed.

    There could be a race between the initial scan and the first pull...

  13. AudriusButkevicius commented on Oct 22, 2014

    @AudriusButkevicius
    Member

    Is it happening on one specific node, or is this spreading?

  14. alex2108 commented on Oct 22, 2014

    @alex2108
    ContributorAuthor

    saw it on at least 3 nodes.
    Log with everything since the index scan until the shutdown after the error was there again: http://alex-graf.de/public/st/2014-10-22_3.txt

  15. 81 remaining items

  16. generalmanager commented on Nov 11, 2014

    @generalmanager

    It's the slave showing the files as not synchronized, not the master. There are no deamons or scripts running on the slave which even access those files. And it also happens right after using rsync with the -avz options.

  17. AudriusButkevicius commented on Nov 11, 2014

    @AudriusButkevicius
    Member

    Perhaps @calmh has more insight of how it should work.

  18. Joeflash commented on Nov 11, 2014

    @Joeflash

    So what we're really talking about here is not simply not syncing the "shared memory transaction index file", it is that some files can be updated by windows without an mtime update. So it's not constrained to *.sqlite-wal files: if you look at my logs, some *.sqlite files are not being synced either. This is not an sqlite limitation, this is a windows limitation.

    What you need is a workaround. When the host application is closed, those files are unlocked and not being written to. That is the time to sync. But how do you know when the host process has been terminated? Well unless there's a utility which will tell you that, what you could do, as a suggestion, is: (keeping in mind that I'm not a windows or linux programmer)

    1. Hashes match. Record matching hashes. Or, hashes don't match, but neither do the mtimes, in which case, syncthing knows what to do without a workaround
    2. Hash mismatch occurs (with same mtimes). Record hash difference: if the mismatched hash is not one of the hashes recorded in 1), then that is the file which has been updated.
    3. Keep recording hash mismatch. If mismatched hash in 2) is different than in 3), then you know the file is still in play; wait for next scan.
    4. If the mismatched hash consistently remains the same, then there's a good bet that the host application is no longer making changes, and it's safe to sync the file anyways.
  19. AudriusButkevicius commented on Nov 11, 2014

    @AudriusButkevicius
    Member

    I don't think we should burden general synchronization application code to with workarounds for stupid behaviours of other software/filesystems/operating systems.
    Bare in mind this is my personal opinion, but we do have to draw a line on what is required for syncthing to work, and sadly I think that mtime is one of those things.
    Syncthing works using hashing, and constantly rehashing files just because firefox is a bitch will make your CPU give up.

    I've checked permissions.sqlite file and I can see that it was rescanned:

    [5ZURC] 2014/11/07 16:17:56.449633 walk.go:192: DEBUG: to hash: C:\Users\[User]\AppData\Roaming\Mozilla\Firefox\Profiles\firefox3.default\permissions.sqlite File{Name:"permissions.sqlite", Flags:0666, Modified:1415314667, Version:54282, Size:0, Blocks:[]}
    

    Then the hash/mtime were this:

    [5ZURC] 2014/11/07 16:18:55.485010 model.go:724: DEBUG: model@0xc0820fec00 RESP(in): [ID (redacted)]: "Firefox_32.0_Profile" / "permissions.sqlite" o=0 s=131072 ch=373d8bf7eec032f29a70e43f6897374ff7d3bcfbdf89adfe671119b09246b92a ct=1415314667 cf=438 ih=61497cf450583bcb9324d707394dba871c70210ed1e0ac30c497f3ece108cd91 it=1415314667 if=438
    

    and then the content has changed without updating mtime twice:

    [5ZURC] 2014/11/07 16:19:00.470295 model.go:724: DEBUG: model@0xc0820fec00 RESP(in): [ID (redacted)]: "Firefox_32.0_Profile" / "permissions.sqlite" o=0 s=131072 ch=6bb32df6aae4f88f6be80dfe04c1875fb9b0b12a02caa76fbb5f10c20fbc583e ct=1415314667 cf=438 ih=61497cf450583bcb9324d707394dba871c70210ed1e0ac30c497f3ece108cd91 it=1415314667 if=438
    [5ZURC] 2014/11/07 16:20:02.401837 model.go:724: DEBUG: model@0xc0820fec00 RESP(in): [ID (redacted)]: "Firefox_32.0_Profile" / "permissions.sqlite" o=0 s=131072 ch=a519d6a6371472147851428c66d9ecca8c962b2a522426d919d7df882e718c86 ct=1415314667 cf=438 ih=61497cf450583bcb9324d707394dba871c70210ed1e0ac30c497f3ece108cd91 it=1415314667 if=438
    

    But eventually the mtime got updated and the file got synced.

    Perhaps there is some special behaviour with windows where mtime gets updated only after fsync, but reads go through to the kernel cache which has the new content but the old mtime?

  20. Joeflash commented on Nov 11, 2014

    @Joeflash

    I don't think we should burden general synchronization application code to with workarounds for stupid behaviours of other software/filesystems/operating systems.

    You do if you want it to work on those systems. Every operating system does something this is stupid to some developers. If you're not implementing a workaround to something stupid that another programmer did, you're implementing the stupid thing others are going to be frustrated about later. Welcome to programming.

    And, P.S., as @generalmanager mentioned, this is not unique to Firefox files.

  21. AudriusButkevicius commented on Nov 11, 2014

    @AudriusButkevicius
    Member

    I think @generalmanager should open a separate issue, as it's related to master mode which I don't use and haven't yet fully understood how it works.

    As for your issue, I see 3 possible solutions:

    1. Always rescan list (just like ignores)
    2. A special flag on the folder to always rescan all files and ignore mtimes. Given the folder is small enough that might not blow up.
    3. A protocol level change with a feedback mechanism which then can lead to more clever decisions.

    I and @calmh welcome a pull request for any of the above.
    Personally I don't feel the pain of this issue and I'd rather focus on something more useful for the wider public.
    Furthermore, what you are asking is an enhancement and not related to this bug, therefore this one stays closed.

    If you do decide to open a separate issue, make sure you reference this issue as it has the relevant information here.

  22. Joeflash commented on Nov 12, 2014

    @Joeflash

    I would love to implement one of mine and your suggestions, but I am not a Go programmer.

    1. Always rescan list (just like ignores)
    2. A special flag on the folder to always rescan all files and ignore mtimes. Given the folder is small enough that might not blow up.

    Seems to me that one of these would be a simple enough workaround for this issue? It just seems like this issue is getting closed because no one can be bothered to implement a simple workaround. There are other files and other situations where mtimes won't be updated.

    I suppose every application has edge cases. I'm just disappointed that my main use case for Syncthing is considered to be one of your edge cases, because it's a pretty basic feature IMO: every unlocked file should be synchronizable, and if it can't, the user should be alerted that there is a problem for that file and an option offered to override and sync anyways. Hopefully this "feature" (which I call a bug) will be included by the time it gets to v.1.0. Until then, Syncthing is broken for me.

  23. AudriusButkevicius commented on Nov 12, 2014

    @AudriusButkevicius
    Member

    This issue is closed because this issue is solved.
    Your issue is not this issue, as you said it yourself, your issue is an edge case.

    I am not a Go programmer is a poor excuse. All languages are more or less the same.
    Nobody is obliged to spend their free spare time on something that you need, but you could just spend that time yourself to get what you need...
    It requires exactly zero knowledge of how Go works to add a flag to the config, and read the flag in the right place. Or just copy pretty much the same stuff that already exists (aka ignores)...
    I've never touched go until I actually needed something from syncthing, and now though most of my needs are satisfied, I am still working on it because I like writing Go, and syncthing is an interesting distributed problem.

    If it's such a tragedy for you, you can always open up a bug bounty for this same like the encrypted storage issue has, though that doesn't mean it will get solved.

  24. Joeflash commented on Nov 12, 2014

    @Joeflash

    You're right, this isn't commercial software, and I have no right to be upset that open source software doesn't operate the way that commercial software does. I could learn what is needed and add the solution myself, if I wanted to be a committer to the project. And who knows, maybe I will in the future.

    But I am not coming at this from the perspective of a potential committer, I am coming at this from the perspective of a user. If Pulse/Syncthing wants to "replaces proprietary sync and cloud services with something open, trustworthy and distributed" it's going to have to work under most user cases.

    Deferring this bug to implement at a later date is fine, I would have been perfectly content with that. Closing it because one doesn't like windows, or Firefox, or that it is judged that the edge case is irrelevant, doesn't cut it with me, that's just bad software management. Other cloud services sync my Firefox folders and my Thunderbird and other profile folders just fine. I double check with a diff app later, and it's verified to be synced.

    In fact, that's what I am using now: manually syncing windows workspace folders with a diff app Beyond Compare. Works better than Syncthing, even if I do have to do it manually.

  25. AudriusButkevicius commented on Nov 12, 2014

    @AudriusButkevicius
    Member

    It works under most user cases. It doesn't work in your case, which as you've said yourself is an edge case.

    I use Windows myself and Firefox myself, so no need to make any accusations, as that will take you nowhere.
    This issue is irrelevant to your issue because it has nothing to do with the problems being solved here. This issue fixes a VERY specific bug (not enhancement) which was introduced by me in one of the earlier versions.

    I am not saying your issue is irrelevant, what I am saying is that your issue is not THIS bug, it's an enhancement, and as I said before, feel free to open a separate issue linking to this issue (as this has the problem described in more technical detail).
    I am sure if you don't do that, it will most likely never get looked at, as it will be lost forever.

  26. generalmanager commented on Nov 12, 2014

    @generalmanager

    It seems to work for now after I killed pulse on both machines and deleted both index folders. After some digging in old logs I think it was caused by #936.

  27. Joeflash commented on Nov 19, 2014

    @Joeflash

    My point is, I was merely reporting a bug, in the hopes that it would be solved. I don't mind that it wasn't solved. I understand, as an open source project, that there's only so much person-hours one can put into various issues. What I do mind very much, @calmh & @AudriusButkevicius , is that I spent hours over the course of several weeks gathering data to help pin down the source of this issue. Only to be told that the bug will not be solved. Not deferred, not "planned for v.X", but sorry, too bad: your edge case doesn't matter. And if I want to do anything about it, I can open another bug. Well, sorry to say, that is YOUR job as a developer on this project, not mine. Evidently my time isn't valuable unless I'm contributing code. Nice attitude. Maybe Pulse will do a better job listening to user feedback now that the code has been forked.

  28. bherila commented on Nov 19, 2014

    @bherila

    Does the archive bit get reset even if the mtime is unchanged? That may be a viable workaround to rehashing.

  29. calmh commented on Nov 19, 2014

    @calmh
    Member

    @bherila Worth looking into, perhaps it can be used as a workaround in some other situations where mtime is unreliable (Android comes to mind). In this specific case I doubt it, since the memory mapped file in question is essentially a view into a slice of RAM, and the reason the mtime is not updated is because Windows wants to avoid doing too many metadata updates. I suspect that goes for the archive bit as well, but I'm not sure. I'll add a ticket for it so it's not forgotten about!

    @Joeflash I hear your frustration. There's no judgement here on the value of anyones time, it's all voluntary and unpaid. Your issue is real, but somewhat minor and edgy, and not the original problem this ticket refers to, although it has an unfortunately generic subject. Maybe it can be resolved by the technique above, maybe it will remain an unsolvable edge case. We'll see.

  30. locked and limited conversation to collaborators on Nov 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions