Skip to content

WARNING: Error updating metadata for %q at database commit: %v - After Update to v1.22.0 (Windows and Linux) #8583

Closed as not planned

Description

@Backi67

Hi,
Since Update to V1.22.0 I have the "updating metadata" error when Syncing a File.

History from log:
[WI6RE] 2022/10/04 11:12:29 INFO: Automatic upgrade (current "v1.21.0" < latest "v1.22.0")
..
[WI6RE] 2022/10/04 11:12:31 WARNING: Automatically upgraded to version "v1.22.0". Restarting in 1 minute.
[WI6RE] 2022/10/04 11:13:31 INFO: QUIC listener ([::]:22000) shutting down
..
[WI6RE] 2022/10/04 11:13:34 INFO: Exiting
[start] 2022/10/04 11:13:35 INFO: syncthing v1.22.0 "Fermium Flea" (go1.19.1 windows-amd64) [email protected] 2022-10-02 06:58:22 UTC
[start] 2022/10/04 11:13:35 INFO: Archiving a copy of old config file format at: C:\Users\xxxxx\AppData\Local\Syncthing\config.xml.v36
[start] 2022/10/04 11:13:35 INFO: Using large-database tuning
..
[WI6RE] 2022/10/04 11:13:37 INFO: Hashing performance is 439.99 MB/s
[WI6RE] 2022/10/04 11:13:37 INFO: Detected upgrade from v1.21.0 to v1.22.0
[WI6RE] 2022/10/04 11:13:37 INFO: Overall send rate is unlimited, receive rate is unlimited
..
[WI6RE] 2022/10/04 11:13:37 INFO: QUIC listener ([::]:22000) starting
[WI6RE] 2022/10/04 11:13:37 INFO: TCP listener ([::]:22000) starting
..
[WI6RE] 2022/10/04 11:15:43 WARNING: Error updating metadata for %q at database commit: %v

Do I have to change something.. or is it a Bug?

Yours
Stephan

Activity

  1. added
    bug
    needs-triage
    on Oct 5, 2022
  2. imsodin commented on Oct 5, 2022

    @imsodin
    Member

    It's definitely a logging error, that looks like a Warnln where it should be a Warnf: #8584

    As to what is happening - hard to say as there actual error isn't printed. What failes is an LStat on a finished file in the puller. I don't really understand how that owuld happen, given the puller just created that file. Unless something else happened at the same time.

    What system are you on?

  3. Backi67 commented on Oct 5, 2022

    @Backi67
    Author

    Hi,
    It is not syncing anymore... The file mention in the line, is not written to the destination directory.

    I have different machinetypes:
    Windows: 10 (Running inside Synctraycor)
    v1.22.0, Windows (64-bit Intel/AMD)
    Synology NAS:
    v1.22.0, Linux (64-bit Intel/AMD)
    (My Android Clients all Running V1.21.0)

  4. calmh commented on Oct 5, 2022

    @calmh
    Member

    What is the actual file and error? Should be printed after the error, even with the bad formatting

  5. Backi67 commented on Oct 5, 2022

    @Backi67
    Author

    [WI6RE] 2022/10/05 18:45:02 WARNING: Error updating metadata for %q at database commit: %v Radio_Sync\2419\Regionaljournal-Zentralschweiz_05-10-2022-1730.1664985707556.mp3 CreateFile \?\C:\CloudStation\RSSMobile\Radio_Sync\2419\Regionaljournal-Zentralschweiz_05-10-2022-1730.1664985707556.mp3: Das System kann die angegebene Datei nicht finden.
    [WI6RE] 2022/10/05 18:45:02 WARNING: Error updating metadata for %q at database commit: %v Radio_Sync\2419\Regionaljournal-Zuerich-Schaffhausen_05-10-2022-1730.1664985848086.mp3 CreateFile \?\C:\CloudStation\RSSMobile\Radio_Sync\2419\Regionaljournal-Zuerich-Schaffhausen_05-10-2022-1730.1664985848086.mp3: Das System kann die angegebene Datei nicht finden.
    [WI6RE] 2022/10/05 18:45:10 WARNING: Error updating metadata for %q at database commit: %v _Sync\1817\Regionaljournal-Zuerich-Schaffhausen_05-10-2022-1730.1664985848086.mp3 CreateFile \?\C:\CloudStation\RSSMobile\Radio_Sync\1817\Regionaljournal-Zuerich-Schaffhausen_05-10-2022-1730.1664985848086.mp3: Das System kann die angegebene Datei nicht finden.
    [WI6RE] 2022/10/05 18:45:13 WARNING: Error updating metadata for %q at database commit: %v _Sync\2419\Regionaljournal-Zentralschweiz_05-10-2022-1730.1664985707556.mp3 CreateFile \?\C:\CloudStation\RSSMobile\Radio_Sync\2419\Regionaljournal-Zentralschweiz_05-10-2022-1730.1664985707556.mp3: Das System kann die angegebene Datei nicht finden.
    [WI6RE] 2022/10/05 18:45:13 WARNING: Error updating metadata for %q at database commit: %v _Sync\2419\Regionaljournal-Zuerich-Schaffhausen_05-10-2022-1730.1664985848086.mp3 CreateFile \?\C:\CloudStation\RSSMobile\Radio_Sync\2419\Regionaljournal-Zuerich-Schaffhausen_05-10-2022-1730.1664985848086.mp3: Das System kann die angegebene Datei nicht finden.
    [WI6RE] 2022/10/05 18:45:16 INFO: Puller (folder "Share-RSSMobile3" (RSSMobile3), item "Radio\_Sync\2419\Regionaljournal-Zuerich-Schaffhausen_05-10-2022-1730.1664985848086.mp3"): syncing: delete file: file modified but not rescanned; will try again later

  6. calmh commented on Oct 5, 2022

    @calmh
    Member

    syncing: delete file: file modified but not rescanned

    I guess it tries to do the lookup for a deleted file. That's not great, and will of course fail...

  7. Backi67 commented on Oct 5, 2022

    @Backi67
    Author

    No that could not be:
    WI6RE] 2022/10/05 19:17:06 WARNING: Error updating metadata for %q at database commit: %v Radio\09_Auto\36_Persoen__2022-09-18_Persoenlich_18-09-2022-1003.1663492383952.mp3 CreateFile \?\C:\CloudStation\RSSMobile\Radio\09_Auto\36_Persoen__2022-09-18_Persoenlich_18-09-2022-1003.1663492383952.mp3: Das System kann die angegebene Datei nicht finden.

    image
    The FIle is there :-)

    I have this error also on Linux
    And again.. I did NOT had this Warning befor the Update to v1.21.

  8. calmh commented on Oct 5, 2022

    @calmh
    Member

    Yeah, it shouldn't run for deleted files anyway. Can you enable STTRACE=model (available in the log screen in the GUI too) and see what it does prior to this error?

  9. imsodin commented on Oct 5, 2022

    @imsodin
    Member

    Looking up that error gives a truck load of totally unrelated possible causes (basically variants of windows is broken), with the possible exception of anti virus. So if you have that, could you check if disabling helps.

    On a secondary note:
    I am not sure if warning on any lstat error is a good way of notifying users. Can become very noisy when e.g. something global failed and causes an entire batch to error. Maybe the ctime update should happen when we finish an item instead, and an error handled like any other pull error.

  10. calmh commented on Oct 5, 2022

    @calmh
    Member

    This is when we finish an item though, or I misunderstand you.

  11. imsodin commented on Oct 5, 2022

    @imsodin
    Member

    "Finish" was ambiguous indeed: I meant finishing as in performFinish, right after the we close and rename the temp file and do the metadata updates. Now it's done in the db updater routine, i.e. in delayed batches and where no other filesystem interactions except syncing directories occurs.

  12. Backi67 commented on Oct 5, 2022

    @Backi67
    Author

    I hope, this is what you asked for:

    [WI6RE] 2022/10/05 21:16:17.394448 model.go:925: DEBUG: model@0xc000152ea0 Completion(KIR4WSN, "RSSMobile3"): map[completion:70.75188078450381 globalBytes:175133670728 globalItems:2224 needBytes:51223304801 needDeletes:173 needItems:224 remoteState:unknown sequence:5451]
    [WI6RE] 2022/10/05 21:16:17.394448 model.go:925: DEBUG: model@0xc000152ea0 Completion(LLSRBK3, "RSSMobile3"): map[completion:100 globalBytes:175133670728 globalItems:2224 needBytes:0 needDeletes:0 needItems:0 remoteState:valid sequence:58974]
    [WI6RE] 2022/10/05 21:16:17.394448 model.go:925: DEBUG: model@0xc000152ea0 Completion(XKWI2XJ, "RSSMobile3"): map[completion:100 globalBytes:175133670728 globalItems:2224 needBytes:0 needDeletes:0 needItems:0 remoteState:valid sequence:58251]
    [WI6RE] 2022/10/05 21:16:17.394448 model.go:925: DEBUG: model@0xc000152ea0 Completion(ZGQCBS2, "RSSMobile3"): map[completion:100 globalBytes:175133670728 globalItems:2224 needBytes:0 needDeletes:0 needItems:0 remoteState:valid sequence:64571]
    [WI6RE] 2022/10/05 21:16:23.959995 model.go:1126: DEBUG: Index update (in): XKWI2XJ / "RSSMobile3": 4 files
    [WI6RE] 2022/10/05 21:16:23.961294 model.go:1126: DEBUG: Index update (in): ZGQCBS2 / "RSSMobile3": 4 files
    [WI6RE] 2022/10/05 21:16:23.961294 folder_sendrecv.go:161: DEBUG: sendreceive/RSSMobile3@0xc0042cb400 pulling
    [WI6RE] 2022/10/05 21:16:23.961812 folder_sendrecv.go:255: DEBUG: sendreceive/RSSMobile3@0xc0042cb400 copiers: 2 pullerPendingKiB: 32768
    [WI6RE] 2022/10/05 21:16:23.961849 folder_sendrecv.go:1209: DEBUG: sendreceive/RSSMobile3@0xc0042cb400 taking shortcut on Radio\09_Auto*36_Persoen__2022-09-18_Persoenlich_18-09-2022-1003.1663492383952.mp3*
    [WI6RE] 2022/10/05 21:16:23.962958 folder_sendrecv.go:1209: DEBUG: sendreceive/RSSMobile3@0xc0042cb400 taking shortcut on Radio\9999_Sync\2022_10_05-DESKTOP-19_15.txt
    [WI6RE] 2022/10/05 21:16:23.963473 folder_sendrecv.go:1795: WARNING: Error updating metadata for %q at database commit: %v Radio\9999_Sync\2022_10_05-DESKTOP-19_15.txt CreateFile \?\C:\CloudStation\RSSMobile\Radio\9999_Sync\2022_10_05-DESKTOP-19_15.txt: Das System kann die angegebene Datei nicht finden.
    [WI6RE] 2022/10/05 21:16:23.963473 folder_sendrecv.go:1209: DEBUG: sendreceive/RSSMobile3@0xc0042cb400 taking shortcut on Radio_Sync\0218\Echo-der-Zeit_05-10-2022-1800.1664988694633.mp3
    [WI6RE] 2022/10/05 21:16:23.964033 folder_sendrecv.go:1795: WARNING: Error updating metadata for %q at database commit: %v Radio_Sync\0218\Echo-der-Zeit_05-10-2022-1800.1664988694633.mp3 CreateFile \?\C:\CloudStation\RSSMobile\Radio_Sync\0218\Echo-der-Zeit_05-10-2022-1800.1664988694633.mp3: Das System kann die angegebene Datei nicht finden.
    [WI6RE] 2022/10/05 21:16:23.964033 folder_sendrecv.go:1209: DEBUG: sendreceive/RSSMobile3@0xc0042cb400 taking shortcut on TV\ZZ_Sync\2022_10_05-DESKTOP-20_15.txt
    [WI6RE] 2022/10/05 21:16:23.964587 folder_sendrecv.go:1795: WARNING: Error updating metadata for %q at database commit: %v TV\ZZ_Sync\2022_10_05-DESKTOP-20_15.txt CreateFile \?\C:\CloudStation\RSSMobile\TV\ZZ_Sync\2022_10_05-DESKTOP-20_15.txt: Das System kann die angegebene Datei nicht finden.
    [WI6RE] 2022/10/05 21:16:23.973240 folder_sendrecv.go:194: DEBUG: sendreceive/RSSMobile3@0xc0042cb400 changed 4 on try 1
    [WI6RE] 2022/10/05 21:16:23.973240 folder_sendrecv.go:255: DEBUG: sendreceive/RSSMobile3@0xc0042cb400 copiers: 2 pullerPendingKiB: 32768
    [WI6RE] 2022/10/05 21:16:23.974365 folder_sendrecv.go:194: DEBUG: sendreceive/RSSMobile3@0xc0042cb400 changed 0 on try 2

    36_Persoen__2022-09-18_Persoenlich_18-09-2022-1003.1663492383952.mp3: Was on my post 2 hours ago :-(

  13. calmh commented on Oct 5, 2022

    @calmh
    Member

    @imsodin Well, putting the job on the dbUpdateChan is the last thing that happens in performFinish, and then the metadata update happens in the db updater before the update is batched, so I think it's functionally equivalent. There's not much of a delay from one step to the other. I think not everything goes through performFinish (shortcuts etc) hence the current placement.

    @Backi67 yes, though it doesn't make it much clearer unfortunately. We have

    [WI6RE] 2022/10/05 21:16:23.962958 folder_sendrecv.go:1209: DEBUG: sendreceive/RSSMobile3@0xc0042cb400 taking shortcut on Radio\9999_Sync\2022_10_05-DESKTOP-19_15.txt
    [WI6RE] 2022/10/05 21:16:23.963473 folder_sendrecv.go:1795: WARNING: Error updating metadata for %q at database commit: %v Radio\9999_Sync\2022_10_05-DESKTOP-19_15.txt CreateFile \?\C:\CloudStation\RSSMobile\Radio\9999_Sync\2022_10_05-DESKTOP-19_15.txt: Das System kann die angegebene Datei nicht finden.
    

    where we first "take a shortcut" (just adjust some permissions or time on an existing file on disk without altering content) and then one millisecond later it apparently doesn't exist. I can't explain it.

    (It's especially ironic because in the end, on Windows, getting the inode change time is a no-op because it's a non-concept, but we don't discover that until after we've done the Lstat that fails here...)

  14. calmh commented on Oct 5, 2022

    @calmh
    Member

    I have this error also on Linux

    Can we get some logs from there?

  15. tomasz1986 commented on Oct 10, 2022

    @tomasz1986
    Member

    Is this the same error here just from today?

    2022-10-10 13:15:01: Error updating metadata for %q at database commit: %v xxx\locks\1_1_ace88ca3468c4ea39c8f455988117a7a.json CreateFile \\?\C:\xxx\locks\1_1_ace88ca3468c4ea39c8f455988117a7a.json: The system cannot find the file specified.
    

    The file doesn't exist anymore. I can only add that these json files in the locks directory belong to Joplin (a note-taking application) and seem to be created temporarily only while Joplin is synchronising its state with the filesystem, and then they are deleted automatically.

    Is there anything that I could provide to help with this? Unfortunately, I've got only the normal log from that time. Also, I'd never seen this error message before.

    Syncthing is also v1.22.0, but the OS is Windows 10 in my case.

  16. calmh commented on Oct 11, 2022

    @calmh
    Member

    @tomasz1986 happening once because the file actually doesn't exist because Joplin deleted the file while we were syncing or scanning it is fine. Happening all the time while the file actually does exist on disk is not fine. We should probably tone down the warning to info, once we've determined what's going on with the OP, if they are still here.

  17. calmh commented on Dec 6, 2022

    @calmh
    Member

    This looks not actionable any more to me. The error is improved, various metadata syncing things have been improved.

  18. tomasz1986 commented on Dec 15, 2022

    @tomasz1986
    Member

    I'm sorry for commenting on a closed issue, but I seem to still encounter the error/notification from time to time (about the quickly changing Joplin files). If this isn't a problem per se, is it really necessary to even notify the user about it?

  19. added
    frozen-due-to-age
    on Dec 6, 2023
  20. locked and limited conversation to collaborators on Dec 6, 2023
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

    bugfrozen-due-to-ageneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions