[v1.8.0] Local and global state swapped between two nodes

If there’s nothing in the db log, it means those files are somehow sent unchanged as updates to the db. I did changes to how existing items in the db are checked for deleted and ignored ones, so that’s a suspect. Unfortunately debug logging is (too) sparse there. I opened a PR with more debug logging, it would be great if you could run that and report back if something about those files turns up in there (scanner debug facility isn’t actually needed): https://github.com/syncthing/syncthing/pull/6918

Deleted items don’t get removed from db, that’s not a problem.

Ok, I’ve manually updated to ( https://build.syncthing.net/repository/download/Syncthing_BuildLinux/78082:id/syncthing-linux-amd64-v1.9.0-rc.3.dev.1.g5d493ebe.tar.gz ) on devC.

Using:

export STTRACE=model,db

I’ve identified one file shown on the recent changes last X list:

[folder “install”]/Utilities/TestDisk_6.13/testdisk_win.exe

Filtering the log for that filename gives me:

[VPYAM] 2020/08/20 18:25:55.608727 folder.go:644: DEBUG: changing localflags on deleted item File{Name:"Utilities/TestDisk_6.13/testdisk_win.exe", Sequence:2721, Permissions:0555, ModTime:2020-08-17 15:44:39 +0200 CEST, Version:{[{LRORKSI 2} {VBHJ3YR 1597671879} {VPYAMUE 1595941224} {ZTMOUGV 1} {7E4EKDA 1}]}, Length:0, Deleted:true, Invalid:false, LocalFlags:0x8, NoPermissions:false, BlockSize:131072}
[VPYAM] 2020/08/20 18:25:55.608734 set.go:243: DEBUG: n4q4z-ohpfz GetGlobal(Utilities/TestDisk_6.13/testdisk_win.exe)
[VPYAM] 2020/08/20 18:25:55.623695 lowlevel.go:200: DEBUG: not inserting unchanged (local); folder="n4q4z-ohpfz" File{Name:"Utilities/TestDisk_6.13/testdisk_win.exe", Sequence:2721, Permissions:0555, ModTime:2020-08-17 15:44:39 +0200 CEST, Version:{[{LRORKSI 2} {VBHJ3YR 1597671879} {VPYAMUE 1595941224} {ZTMOUGV 1} {7E4EKDA 1}]}, Length:0, Deleted:true, Invalid:false, LocalFlags:0x0, NoPermissions:false, BlockSize:131072, Blocks:[], BlocksHash:}

This file isn’t present on disk. When I started Syncthing after the upgrade, I made sure the node had no connection to other Syncthing nodes and kept it offline.

Ok, found it - thanks. It’s RC material so no need for an issue: https://github.com/syncthing/syncthing/pull/6919

1 Like

@imsodin: I’ve tried the build ( https://build.syncthing.net/viewLog.html?buildId=78119&buildTypeId=Syncthing_BuildLinux&tab=artifacts#%2Fsyncthing-linux-amd64-v1.9.0-rc.3.dev.2.g6a7418eb.tar.gz ) from PR 6919 on devC and the problem is solved.

The STTRACE log doesn’t show any errors as far as I can tell.

After that, I updated devB as well and put devB+devC online. They show recent changes that are expected and contain my files I’ve changed yesterday. All good so far.

Downloaded build ( https://build.syncthing.net/repository/download/Syncthing_BuildWindows/78120:id/syncthing-windows-amd64-v1.9.0-rc.3.dev.2.g6a7418eb.zip ) and applied it to devA.

The cluster is running fine now and fully up2date. No more strange things observed. Good work :-)! Thanks.

1 Like

Thank you for noticing, reporting and debugging!

Just curious: will this get into 1.9.0-rc.4? Oh it came out actually, cool :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.