Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: device present in global list but missing as device/fileinfo entry when scanning folder #6855

Closed
HackaN opened this issue Jul 26, 2020 · 23 comments
Labels
bug A problem with current functionality, as opposed to missing functionality (enhancement) frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion needs-triage New issues needed to be validated

Comments

@HackaN
Copy link

HackaN commented Jul 26, 2020

I should begin with saying that this might be a duplicate of #6457, but that report didn't educate me much.

I am running syncthing on Ubuntu 20.04 and parallel to a system update (before actually performing the update) I got an error from Syncthing GTK saying that the "daemon exited too fast" and wanted me to provide a path for daemon binary.

I ran syncthing from terminal and I get several panic messages. First I got a panic about Config file version (31) that was newer than the supported version (28). I followed an existing error report from the Synthing forum and switched out the Ubuntu repo version for the syncthing's own repo, uninstalled/installed and rebooted (just to be sure changes would take effect) and am now faced with a new set of errors:

[start] 18:02:42 INFO: syncthing v1.7.1 "Fermium Flea" (go1.14.4 linux-amd64) deb@build.syncthing.net 2020-07-11 18:17:41 UTC
[CLMWS] 18:02:45 INFO: Completed initial scan of receiveonly folder "hackan Pixel Kamera" (pixel_3xdn foton)
panic: device present in global list but missing as device/fileinfo entry
[monitor] 18:02:45 WARNING: Panic detected, writing to "/home/hackan/.config/syncthing/panic-20200726-180245.log"
[monitor] 18:02:45 WARNING: Please check for existing issues with similar panic message at https://github.com/syncthing/syncthing/issues/
[monitor] 18:02:45 WARNING: If no issue with similar panic message exists, please create a new issue with the panic log attached
[monitor] 18:02:45 INFO: Reporting crash found in panic-20200726-180245.log (report ID bfe3c0d1) ...
[monitor] 18:02:45 INFO: Syncthing exited: exit status 2
[monitor] 18:02:46 WARNING: 4 restarts in 16.671957674s; not retrying further

I have seen suggestions about removing the index-folder and sort of starting over from scratch, but I have a large library and want to try to figure this out before attempting that as a solution... if that even would be a solution.

Let me know what other information I can provide.

@HackaN HackaN added bug A problem with current functionality, as opposed to missing functionality (enhancement) needs-triage New issues needed to be validated labels Jul 26, 2020
@calmh
Copy link
Member

calmh commented Jul 26, 2020

The actual panic information is in the mentioned file. It's apparently been auto reported so in theory we're already aware, but to get an answer to what's going on please attach or paste at least the first 100 lines or so from that panic log here.

@HackaN
Copy link
Author

HackaN commented Jul 26, 2020

panic-20200726-180245.reported.log
Password: CpY#77zq-=;

@HackaN
Copy link
Author

HackaN commented Jul 26, 2020

Shared the wrong log, should be the right one now :-D

@imsodin imsodin changed the title several panic messages panic: device present in global list but missing as device/fileinfo entry when scanning folder Jul 26, 2020
@imsodin imsodin changed the title panic: device present in global list but missing as device/fileinfo entry when scanning folder panic: device present in global list but missing as device/fileinfo entry when scanning folder Jul 26, 2020
@imsodin
Copy link
Member

imsodin commented Jul 26, 2020

Related to #6501, maybe even a duplicate. They happen under different circumstances, but the source of the problem might be the same.

Something related I noticed: This panic can occur when a file info is present, but the block list missing. The db check/repair mechanism triggered on upgrade and periodically does not catch that, as it only loads truncated file infos. I think it would only be consequent if we went all the way loading full file infos there (it's already a heavy and ugly process, likely not getting much heavier like this).

@calmh
Copy link
Member

calmh commented Jul 26, 2020

A panic loop for a broken fileinfo isn't great regardless of the root cause, really. I'm thinking we could legitimately just return these things as "nope, nothing in the database" and let the scanner pick it up as a new file. Worst case we might miss a delete and incorrectly resurrect a file, or otherwise cause a conflict copy. Still, a spurious conflict copy seems better than getting stuck like this.

@HackaN
Copy link
Author

HackaN commented Jul 26, 2020

I am not 100% following everything, but I have noticed a large amount of conflict copies in my database, which might be related to this "bug" as well then. Is there anything I should do now to fix the issue on my machine, or should I wait for an update which might resolve the panic loop (and the sync conflicts)?

@L4R5
Copy link

L4R5 commented Jul 27, 2020

Happened to me just now when I removed some devices from a receive only folder.
I was also struggling with files out of sync, that the send-only device has deleted weeks ago. For whatever reasons the receive-only devices did not want to let go of those files.

@Catfriend1
Copy link
Contributor

@Catfriend1
Copy link
Contributor

Catfriend1 commented Jul 28, 2020

Ok, my second node in the cluster totally stopped after upgrading to v1.8.0-rc.3, it worked fine before on rc2. I don't know why it worked fine because only the versioning had been fixed between the releases... 😮

There are tons of panic logs containing the "same" content.

image

Maybe the problem the node was heavily scanning one folder with ~226 MByte/Sec?!

@Catfriend1
Copy link
Contributor

Reading the comments above, very interesting. To sum up my guess what's causing the trouble:

  • I've removed a device from the cluster "long ago". It was a receiveOnly.
  • The database didn't clear out the device on the receiveOnly node (devC that's affected by the crash now). FileInfo still showed the no longer existing deviceId. ( see https://forum.syncthing.net/t/v1-6-1-local-and-global-state-swapped-between-two-nodes/15209/13 )
  • I've upgraded: v1.6.1 > v1.7.0 > v1.7.1 > v1.8.0-rc.1, rc2 hoping to get a fix. The problem of wrong states and stuck out-of-sync stayed.
  • Today I've cleared the database of the node devC with "24 out of sync items" (mentioned on the swapped state forum topic) - I didn't know if the device was the root cause of the problem, but chose that to clear anyway. (Audrius suggested another device probably had the wrong state?)
  • devC rescanned to rebuild the database from scratch
  • During the scan of 1 TByte of data, the v1.8.0-rc.3 update was applied.
  • The panic logs of devC started exactly AT THIS POINT.
  • The scan completed, at least, it looks alike from the Web UI, but the node constantly crashes now until some minutes after the service start attempt the Syncthing monitor chooses to exit completely.

I'll backup the database of the affected node which constantly crashes now and try deleting the index-db.folder. It's looking very weird to me, because I just started off fresh from a working rc2 instance.

@rcarmo
Copy link

rcarmo commented Jul 31, 2020

Getting this on 1.7.1 on a new install. Extremely frustrating.

@Catfriend1
Copy link
Contributor

@rcarmo Just reset your db and start afresh again. Don't reconfigure or restart Syncthing during heavy load e.g. initial scanning. This has worked for me a few days ago. First time, it scanned and I configured and restarted multiple times - panic. Second time, just let the Syncthing do its thing - up2date and fine after initial scan.

@imsodin
Copy link
Member

imsodin commented Jul 31, 2020

Please do not advice to just (or otherwise) reset the db. That might be a solution of last resort, but the key is "last". For one we want to discover what's actually going on, so any info on setups, what you did or anything else that might be relevant would be great, for another there's other steps to take to try and remedy the problem which are less invasive than deleting the entire db (and might even provide some insight).

@HackaN
Copy link
Author

HackaN commented Aug 1, 2020

Well, I have to admit that I have been eyeing on that reset db button (both on the desktop and on the phones), but I have been wanting to see where this leads so I am 100% with you on that it should be a last resort.

The setup I have is:

  • One desktop (Ubuntu 20.04, the one you got the panic log from) which is setup as receive only and to ignore delete (in case phone gets full and items needs to be removed to clear space).
  • Two Android phones (one running Syncthing from f-droid, the other Syncthing from Play) setup as send only.

I have not removed any devices, which the error "device present in global list but missing as device/fileinfo entry" sounds like to me...
scratching head

@HackaN
Copy link
Author

HackaN commented Aug 1, 2020

When I run syncthing from command line now it does sometimes completely scan local recieve-only-folders, except one, and some new items get synced over, but then it panics again. Not sure if something happens locally on the receive-machine or if it happens when it tries to sync from either one of the send-only devices...

@HackaN
Copy link
Author

HackaN commented Aug 1, 2020

It looks like the messages changes a bit, thought I'd share it:

[start] 01:40:18 INFO: syncthing v1.7.1 "Fermium Flea" (go1.14.4 linux-amd64) deb@build.syncthing.net 2020-07-11 18:17:41 UTC
[CLMWS] 01:40:18 INFO: My ID: CLMWS7O-X7P36FH-TRRHZF3-DOVVSQE-QLVFGMX-EFVPIBO-PJ4AE72-JMFWPQ2
[CLMWS] 01:40:19 INFO: Single thread SHA256 performance is 173 MB/s using minio/sha256-simd (130 MB/s using crypto/sha256).
[CLMWS] 01:40:19 INFO: Hashing performance is 153.61 MB/s
[CLMWS] 01:40:19 INFO: Overall send rate is unlimited, receive rate is unlimited
[CLMWS] 01:40:19 INFO: Using discovery server https://discovery.syncthing.net/v2/?noannounce&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[CLMWS] 01:40:19 INFO: Using discovery server https://discovery-v4.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[CLMWS] 01:40:19 INFO: Using discovery server https://discovery-v6.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[CLMWS] 01:40:19 INFO: Ready to synchronize "hackan Instagram" (u9qd6-us5z8) (receiveonly)
[CLMWS] 01:40:19 INFO: QUIC listener ([::]:22000) starting
[CLMWS] 01:40:19 INFO: TCP listener ([::]:22000) starting
[CLMWS] 01:40:19 INFO: Ready to synchronize "hackan Layouts" (6l3gn-3linn) (receiveonly)
[CLMWS] 01:40:19 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[CLMWS] 01:40:19 INFO: Ready to synchronize "Mumzki Pixel XL Kamera" (c85fs-un7gf) (receiveonly)
[CLMWS] 01:40:19 INFO: Ready to synchronize "Fnuffie SyncthingShare" (j4t5w-x1o4p) (receiveonly)
[CLMWS] 01:40:19 INFO: Ready to synchronize "hackan Telegram" (jgpkj-bidf9) (receiveonly)
[CLMWS] 01:40:19 INFO: Ready to synchronize "Fnuffie Instagram" (l9wfb-d2vss) (receiveonly)
[CLMWS] 01:40:19 INFO: Ready to synchronize "hackan Pixel Kamera" (pixel_3xdn foton) (receiveonly)
[CLMWS] 01:40:19 INFO: Completed initial scan of receiveonly folder "hackan Layouts" (6l3gn-3linn)
[CLMWS] 01:40:19 INFO: Completed initial scan of receiveonly folder "hackan Telegram" (jgpkj-bidf9)
[CLMWS] 01:40:19 INFO: Completed initial scan of receiveonly folder "hackan Instagram" (u9qd6-us5z8)
[CLMWS] 01:40:19 INFO: Completed initial scan of receiveonly folder "Fnuffie SyncthingShare" (j4t5w-x1o4p)
[CLMWS] 01:40:19 INFO: quic://0.0.0.0:22000 detected NAT type: Full cone NAT
[CLMWS] 01:40:19 INFO: quic://0.0.0.0:22000 resolved external address quic://178.174.176.14:22000 (via stun.syncthing.net:3478)
[CLMWS] 01:40:19 INFO: Completed initial scan of receiveonly folder "Fnuffie Instagram" (l9wfb-d2vss)
[CLMWS] 01:40:20 INFO: GUI and API listening on 127.0.0.1:8080
[CLMWS] 01:40:20 INFO: Access the GUI via the following URL: http://127.0.0.1:8080/
[CLMWS] 01:40:20 INFO: My name is "hackan-Macmini"
[CLMWS] 01:40:20 INFO: Device LU2H6VD-4NXMN3C-A6XSVR4-6ESLEFV-EV5GTDP-XFSJ7TM-I5HZPHL-D5SD4AX is "Mumzki Pixel XL" at [dynamic]
[CLMWS] 01:40:20 INFO: Device BRYVLST-NVC4YGQ-SAE7LGX-2BTIJQW-6D6LZRE-73J5XXZ-JPDSKEP-YRAMJQA is "hackan Pixel" at [dynamic]
[CLMWS] 01:40:20 INFO: Completed initial scan of receiveonly folder "hackan Pixel Kamera" (pixel_3xdn foton)
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_144207.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_232126.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_131841.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_173031.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_131844.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_193956.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_225139.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_225205.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_195643.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_225154.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_203701.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_232120.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_203710.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200730_191738.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_232432.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_232116.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_155500.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_225146.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_225212.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_191736.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_191725.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_203658.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_212100.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/PANO_20200731_154337.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_131835.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_225242.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_191742.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_131848.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_232449.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_225231.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_225223.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200730_191413.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_191721.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200801_203705.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_232455.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:20 INFO: Puller (folder "hackan Pixel Kamera" (pixel_3xdn foton), item "Camera/IMG_20200731_212102.jpg"): no connected device has the required version of this file
[CLMWS] 01:40:21 INFO: "hackan Pixel Kamera" (pixel_3xdn foton): Failed to sync 36 items
[CLMWS] 01:40:21 INFO: Folder "hackan Pixel Kamera" (pixel_3xdn foton) isn't making sync progress - retrying in 1m0s.
panic: device present in global list but missing as device/fileinfo entry
[monitor] 01:40:21 WARNING: Panic detected, writing to "/home/hackan/.config/syncthing/panic-20200802-014021.log"
[monitor] 01:40:21 WARNING: Please check for existing issues with similar panic message at https://github.com/syncthing/syncthing/issues/
[monitor] 01:40:21 WARNING: If no issue with similar panic message exists, please create a new issue with the panic log attached
[monitor] 01:40:21 INFO: Reporting crash found in panic-20200802-014021.log (report ID 038115fa) ...
[monitor] 01:40:21 INFO: Syncthing exited: exit status 2
[start] 01:40:22 INFO: syncthing v1.7.1 "Fermium Flea" (go1.14.4 linux-amd64) deb@build.syncthing.net 2020-07-11 18:17:41 UTC
[CLMWS] 01:40:22 INFO: My ID: CLMWS7O-X7P36FH-TRRHZF3-DOVVSQE-QLVFGMX-EFVPIBO-PJ4AE72-JMFWPQ2
[CLMWS] 01:40:23 INFO: Single thread SHA256 performance is 169 MB/s using minio/sha256-simd (125 MB/s using crypto/sha256).
[CLMWS] 01:40:24 INFO: Hashing performance is 153.88 MB/s
[CLMWS] 01:40:24 INFO: Overall send rate is unlimited, receive rate is unlimited
[CLMWS] 01:40:24 INFO: Using discovery server https://discovery.syncthing.net/v2/?noannounce&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[CLMWS] 01:40:24 INFO: Using discovery server https://discovery-v4.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[CLMWS] 01:40:24 INFO: Using discovery server https://discovery-v6.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
[CLMWS] 01:40:24 INFO: Ready to synchronize "hackan Instagram" (u9qd6-us5z8) (receiveonly)
[CLMWS] 01:40:24 INFO: Ready to synchronize "hackan Layouts" (6l3gn-3linn) (receiveonly)
[CLMWS] 01:40:24 INFO: Ready to synchronize "Mumzki Pixel XL Kamera" (c85fs-un7gf) (receiveonly)
[CLMWS] 01:40:24 INFO: Ready to synchronize "Fnuffie SyncthingShare" (j4t5w-x1o4p) (receiveonly)
[CLMWS] 01:40:24 INFO: Ready to synchronize "hackan Telegram" (jgpkj-bidf9) (receiveonly)
[CLMWS] 01:40:24 INFO: QUIC listener ([::]:22000) starting
[CLMWS] 01:40:24 INFO: Ready to synchronize "Fnuffie Instagram" (l9wfb-d2vss) (receiveonly)
[CLMWS] 01:40:24 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[CLMWS] 01:40:24 INFO: Ready to synchronize "hackan Pixel Kamera" (pixel_3xdn foton) (receiveonly)
[CLMWS] 01:40:24 INFO: TCP listener ([::]:22000) starting
[CLMWS] 01:40:24 INFO: Completed initial scan of receiveonly folder "hackan Instagram" (u9qd6-us5z8)
[CLMWS] 01:40:24 INFO: Completed initial scan of receiveonly folder "hackan Telegram" (jgpkj-bidf9)
[CLMWS] 01:40:24 INFO: Completed initial scan of receiveonly folder "hackan Layouts" (6l3gn-3linn)
[CLMWS] 01:40:24 INFO: GUI and API listening on 127.0.0.1:8080
[CLMWS] 01:40:24 INFO: Access the GUI via the following URL: http://127.0.0.1:8080/
[CLMWS] 01:40:24 INFO: My name is "hackan-Macmini"
[CLMWS] 01:40:24 INFO: Device BRYVLST-NVC4YGQ-SAE7LGX-2BTIJQW-6D6LZRE-73J5XXZ-JPDSKEP-YRAMJQA is "hackan Pixel" at [dynamic]
[CLMWS] 01:40:24 INFO: Device LU2H6VD-4NXMN3C-A6XSVR4-6ESLEFV-EV5GTDP-XFSJ7TM-I5HZPHL-D5SD4AX is "Mumzki Pixel XL" at [dynamic]
[CLMWS] 01:40:24 INFO: Completed initial scan of receiveonly folder "Fnuffie SyncthingShare" (j4t5w-x1o4p)
[CLMWS] 01:40:24 INFO: Completed initial scan of receiveonly folder "Fnuffie Instagram" (l9wfb-d2vss)
[CLMWS] 01:40:24 INFO: quic://0.0.0.0:22000 detected NAT type: Full cone NAT
[CLMWS] 01:40:24 INFO: quic://0.0.0.0:22000 resolved external address quic://178.174.176.14:22000 (via stun.syncthing.net:3478)
[CLMWS] 01:40:25 INFO: Established secure connection to BRYVLST-NVC4YGQ-SAE7LGX-2BTIJQW-6D6LZRE-73J5XXZ-JPDSKEP-YRAMJQA at 192.168.1.87:53176-192.168.1.203:22000/tcp-client/TLS1.3-TLS_AES_128_GCM_SHA256
[CLMWS] 01:40:25 INFO: Device BRYVLST-NVC4YGQ-SAE7LGX-2BTIJQW-6D6LZRE-73J5XXZ-JPDSKEP-YRAMJQA client is "syncthing v1.7.1" named "Pixel" at 192.168.1.87:53176-192.168.1.203:22000/tcp-client/TLS1.3-TLS_AES_128_GCM_SHA256
[CLMWS] 01:40:25 INFO: Completed initial scan of receiveonly folder "hackan Pixel Kamera" (pixel_3xdn foton)
panic: device present in global list but missing as device/fileinfo entry
[monitor] 01:40:26 WARNING: Panic detected, writing to "/home/hackan/.config/syncthing/panic-20200802-014026.log"
[monitor] 01:40:26 WARNING: Please check for existing issues with similar panic message at https://github.com/syncthing/syncthing/issues/
[monitor] 01:40:26 WARNING: If no issue with similar panic message exists, please create a new issue with the panic log attached
[monitor] 01:40:26 INFO: Reporting crash found in panic-20200802-014026.log (report ID 74809c01) ...
[monitor] 01:40:26 INFO: Syncthing exited: exit status 2
[monitor] 01:40:27 WARNING: 4 restarts in 19.788638985s; not retrying further

I looked up a couple of the items which Syncthing says "no connected device has the required version of this file" just to actually see if they exist on the send-only device, and they are there. I don't know what the "required version" is, but the originals exist.

@gyver
Copy link

gyver commented Aug 2, 2020

For reference, I had the exact same panic with 1.7.1 and a huge receive-only folder (~3.5TB, 12+ million files). Upgrading to a recent git version (after the commit referenced above : 1b9e5c0) made it possible to progress.

The configuration is quite simple : 2 syncthing servers with a single folder shared as send only on one end and receive only on the other. The two sides were previously synced by other means, so each Syncthing had a full and mostly synced folder to begin with (the receiving side lacked recent modifications). Their history is a little more complicated and I didn't take notes.
They were initially using Syncthing 1.4.2 and moved later to 1.7.1 in hope of fixing a bug on the receiving side (maybe related but I don't have the panics anymore to check, they were automatically removed by Syncthing). There were numerous reconfigurations, mostly on the sending side (activating inotify or not which seemed to trigger full re-scans of the folder on each reconfiguration). The receiving side was completely reset (folder removed and recreated) when upgrading to 1.7.1 (hoping to remove any DB inconsistencies).

The panic with 1.7.1 on the receiving side occurred in a loop (approximately every 7 minutes) just after the initial first scan. I found this thread and built Syncthing from the git repository. The panic disappeared and the receiving side seems to be catching up now. The only odd thing is that the numbers of out of sync items reported in the interface don't match at all between the folder and the remote device.
There are currently ~200k out of sync items in the folder (and the number is gradually falling down), but the remote device (the sending side) report ~6.7M out of sync items, its status is "Syncing (40%, 2,076TiB)" although its own interface reports the foder to be Up to Date and the number doesn't move at all.
The sending side interface reports a more consistent situation for the receiving side (~200k : approximately the same number of out of sync items for the device as the number the receiving side reports for the folder).

@HackaN
Copy link
Author

HackaN commented Aug 6, 2020

Yeah, I'm probably gonna wait until it gets incorporated into the stable channel. Should be an update coming soon, right?

@imsodin
Copy link
Member

imsodin commented Aug 11, 2020

I found a/the problem (I hope the latter), and who would have thought: Truncation comes back to haunt us again (more precisely: it was never gone).

Calling .putFile with truncate == true and a file with less blocks than blocksIndirectionCutoff puts a fileinfo without blocks. truncate == true is only the case when repairing sequence indexes, so this "shoudn't happen"™. However it does, so it's a real practical issue.

PR incoming.

@HackaN
Copy link
Author

HackaN commented Aug 11, 2020

My syncthing got updated to syncthing v1.8.0 "Fermium Flea", but nothing changed for me there. Let me know if I indeed should build the git version to test if this is the problem.

@imsodin
Copy link
Member

imsodin commented Aug 12, 2020

@HackaN The relevant new changes are at #6888. If, and only if, you have backups and feel comfortable testing not even fully reviewed yet code (i.e. don't mind much if you need to roll back to your backup), you are very welcome to try it out and let me know if it helped. A bit lower level of risk would be to wait until that is merged, though backups are obviously still necessary. This should also make it into next weeks RC.

@HackaN
Copy link
Author

HackaN commented Aug 12, 2020

Alright, thank you for the infromative reply. I'll await until it's merged into the next update :-)

calmh added a commit to calmh/syncthing that referenced this issue Aug 19, 2020
* main: (368 commits)
  build: We now target Go 1.14
  lib/fs: Disable ioctl on ppc (fixes syncthing#6898) (syncthing#6901)
  gui, man, authors: Update docs, translations, and contributors
  lib/dialer: Try dialing without reuse in parallel (fixes syncthing#6892) (syncthing#6893)
  cmd/stcrashreceiver: Don't crash on nil err
  all: Remove need to restart syncthing (syncthing#6883)
  lib/db: Don't put truncated files (ref syncthing#6855, ref syncthing#6501) (syncthing#6888)
  lib/osutil: Check returned error instead of info (ref syncthing#6885) (syncthing#6887)
  gui, man, authors: Update docs, translations, and contributors
  lib/osutil: Preserve perms in AtomicWriter (fixes #tbd) (syncthing#6885)
  lib/fs: Fix WatchRename test for FreeBSD (fixes syncthing#6613)
  lib/fs: Unwrap mtimeFile, get fd the "correct" way (ref syncthing#6875) (syncthing#6877)
  lib/model: Don't close file early (fixes syncthing#6875) (syncthing#6876)
  lib/fs: Unwrap mtimeFile, get fd the "correct" way (ref syncthing#6875) (syncthing#6877)
  gui, man, authors: Update docs, translations, and contributors
  lib/fs: Fix WatchRename test for FreeBSD (fixes syncthing#6613)
  lib/model: Don't close file early (fixes syncthing#6875) (syncthing#6876)
  lib/db: Log context on panic (syncthing#6872)
  gui: Don't show pull order on SO folders (ref syncthing#6807) (syncthing#6871)
  lib/model: Check folder error before sync-waiting (fixes syncthing#6793) (syncthing#6847)
  ...
@HackaN
Copy link
Author

HackaN commented Sep 12, 2020

Good news - I can now confirm that with version 1.9.0 all files, as far as I can tell, are being correctly synchronized :-)

@HackaN HackaN closed this as completed Sep 15, 2020
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Sep 16, 2021
@syncthing syncthing locked and limited conversation to collaborators Sep 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A problem with current functionality, as opposed to missing functionality (enhancement) frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion needs-triage New issues needed to be validated
Projects
None yet
Development

No branches or pull requests

8 participants