Skip to content

Panic loop after upgrade to 1.4.1-rc3 #6457

Closed

Description

@eiszfuchs

I have tried to find a solution to this problem, but I couldn't find anything that matched my situation, within these issues nor with a Google search.
I noticed that my folders went out of sync a few days back. I thought something crashed again, as it did from time to time. I upgraded to 1.4.0 when the latest stable came out, but that's when the panics started. I pulled the latest Release Candidate instead, as it supposedly fixed the issue with rebuilding the database, so Syncthing started again just fine.

I then noticed another round of panics, just as the re-scans kicked in. One of the folders made it panic, so I paused all folders and unpaused them until I got to the folder that caused the panics.

This is what Syncthing does, over and over, piling up log files:

[P4WYR] 13:14:35 INFO: Connection to XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX at xxx.xxx.xxx.xxx:59442-xxx.xxx.xxx.xxx:22000/tcp-client/TLS1.3-TLS_AES_128_GCM_SHA256 closed: unpausing folder "FOLDER_NAME" (xvicV-6grJj)
[P4WYR] 13:15:54 INFO: Device XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX folder "FOLDER_NAME" (xvicV-6grJj) has a new index ID (0xAC706B84FF20D287)
Panic at 2020-03-26T13:15:57+01:00
panic: device present in global list but missing as device/fileinfo entry

I couldn't find anything that could explain the error. The folder ID is the same on both devices. Folders haven't changed and are still correct on both ends.

Version Information

Syncthing Version: v1.4.1-rc3
OS Version: Arch Linux on Raspberry Pi

Activity

  1. imsodin commented on Mar 26, 2020

    @imsodin
    Member

    In principle it's possible that the db repair on upgrade never happened for you if it failed the first time around (will file a PR fixing that). Can you please create a copy of your database (by default ~/.config/syncthing/index-v0.14.0.db), then run Syncthing again with STTRACE=db STRECHECKDBEVERY=1s collecting the (possibly massive) log.

    Background info: The panics on sentry happen on dropDeviceFolder after a mismatching sequence entry, i.e. likely directly after upgrade. That really shouldn't be possible given the db repairing should have happened right before, and that should catch exactly the case that is causing this panic.

  2. eiszfuchs commented on Mar 26, 2020

    @eiszfuchs
    Author

    Okay, I'm assuming this does a database check. I performed these commands:

    cp -R index-v0.14.0.db index-v0.14.0.db-copy
    STTRACE=db STRECHECKDBEVERY=1s syncthing > issue-6457.log
    

    I'll check if this panics. Given it might re-scan all folders (the whole lot of about 750 GB), this may be going to take a while. Some major upgrades made me re-build the whole index, which took up to a few days.

  3. eiszfuchs commented on Mar 27, 2020

    @eiszfuchs
    Author

    Alright, I gathered the logs from the debug log and the panic stack trace: https://gist.github.com/eiszfuchs/567bd0c8ca0e07bf4fd0d8b44de0b41d

    I noticed that some of the FILENAME were familiar. I recognize them because I had trouble getting those in sync for months now. They would always show when an instance had "Synching (99%)" or something like that. I tried restarting and upgrading every instance, but I couldn't get rid of those. A few hundred files in some folders.

    Do you think my index on the local master server might be broken? Can I rebuild the index (even if it takes some days) without losing data?

  4. imsodin commented on Mar 27, 2020

    @imsodin
    Member

    The log shows that the db check happens, then (almost) nothing else happens until the panic. "Almost" because I can't be sure due to the log obfuscation - if you could provide the unaltered version per PN on https://forum.syncthing.net/ or to [email protected] that would be appreciated. Something is indeed broken, and in a bad way: Either the index can break in a way I can't imagine or the code does not do what I think it does - either way I am at a loss right now and don't expect staring at the code more to bring any results xD

    Fur further investigations there's two routes: You can (again privately) provide me your database for debugging. Or I create a PR with more debug logging and you would run the resulting binary from our build server and get me the log.

  5. eiszfuchs commented on Mar 27, 2020

    @eiszfuchs
    Author

    I will e-mail you the raw files then. My database is 1 GiB, though. I assume I shouldn't be e-mailing you that?

  6. imsodin commented on Mar 27, 2020

    @imsodin
    Member

    :D I recently as part of a pre-corona VPN failure emailed a 80MB zip and already felt really bad about that, but surprisingly it worked.

    You can upload it to a provide of your choosing and send me the link, you can send me your Syncthing device ID or just send me an email and I will provide you a link to a nextcloud provider I am using :)

  7. eiszfuchs commented on Mar 27, 2020

    @eiszfuchs
    Author

    Okay, just for my understanding; we're talking about extremely sensitive data; at least for me, and hundreds of gigabytes of it. Sharing any kind of detail is already problematic for me, how is the device ID alone helping instead of the index database? I'm trying to understand how Syncthing works.

  8. imsodin commented on Mar 27, 2020

    @imsodin
    Member

    I asked for your device ID such that we can connect our Syncthing instances. If you do trust me enough, but not any cloud provider, that's definitely the best option then. Anyway send me an email please ([email protected]), such that we can discuss the details of any db sharing (or not) outside of the issue tracker (to prevent noise for other subscribers).

  9. modified the milestone: v1.4.2 on Apr 7, 2020
  10. added a commit that references this issue on Apr 8, 2020
  11. added
    frozen-due-to-age
    on May 13, 2021
  12. locked and limited conversation to collaborators on May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    frozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions