Repository navigation
Description
What happened?
Hi,
Syncthing crashes with "panic: string field contains invalid UTF-8 [recovered]" since a few days. I'm running Syncthing on Debian 12 and Linux Mint 22 64 bit PCs and one Rapspberry Pi OS (32 bit), that is used for encrypted storing and broadcasting the synced directories.The crash happens on all machines but the Pi.
The setup worked for about 3 years without problem. I used ISO-8859-15 for filename encoding before the crash happened and converted the filenames to UTF-8 now in case that it could cause the problem. But the crash still happened.
I tried syncthing -reset-database and syncthing --verbose and enabling debugging in the config.xml, but it didn't help or didn't give me hints how to resolv the issue by myselv.
By changing the contents of a synced directory it seems that Syncthing crashes when scanning a subdirectory name that contains an "ü".
Would be great, if it can be fixed or if you could give a hint what changes I should do locally (eg. configuration).
Thank you,
Hauke
Syncthing version
v1.29.1
Platform & operating system
Debian 12 AMD64, Linux Mint 22 AMD64
Browser version
No response
Relevant log output
[EEZTP] 2025/01/10 15:03:54 WARNING: Aborted scan due to an unexpected error: context canceled
panic: string field contains invalid UTF-8 [recovered]
[monitor] 2025/01/10 15:03:54 WARNING: Panic detected, writing to "/home/test/.local/state/syncthing/panic-20250110-150354.log"
[monitor] 2025/01/10 15:03:54 WARNING: Please check for existing issues with similar panic message at https://github.com/syncthing/syncthing/issues/
[monitor] 2025/01/10 15:03:54 WARNING: If no issue with similar panic message exists, please create a new issue with the panic log attached
[monitor] 2025/01/10 15:03:54 INFO: Syncthing exited: exit status 2
[monitor] 2025/01/10 15:03:55 WARNING: 4 restarts in 7.119028171s; not retrying further
Activity
calmh commentedon Jan 10, 2025
Can you paste the full first "paragraph" of the panic trace please?
m23project commentedon Jan 10, 2025
I anonymised the output a bit, but it shouldn't change the tenor of it:
[start] 2025/01/10 17:30:05 INFO: syncthing v1.29.1 "Gold Grasshopper" (go1.23.4 linux-amd64) [email protected] 2025-01-09 20:47:10 UTC [noupgrade]
[EEZTP] 2025/01/10 17:30:05 INFO: My ID: EEZTPIA-...
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Starting up (/home/test/.config/syncthing)
[EEZTP] 2025/01/10 17:30:05 INFO: Hashing performance is 1159.06 MB/s
[EEZTP] 2025/01/10 17:30:05 INFO: Overall send rate is unlimited, receive rate is unlimited
[EEZTP] 2025/01/10 17:30:05 INFO: Using discovery mechanism: IPv4 local broadcast discovery on port 21027
[EEZTP] 2025/01/10 17:30:05 INFO: Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027
[EEZTP] 2025/01/10 17:30:05 INFO: Ready to synchronize "matrix23-sync" (cpaem-...) (sendreceive)
[EEZTP] 2025/01/10 17:30:05 INFO: TCP listener ([::]:2233) starting
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Listen address tcp://0.0.0.0:2233 resolution has changed: lan addresses: [tcp://0.0.0.0:2233 tcp://192.168.178.177:2233] wan addresses: [tcp://0.0.0.0:0 tcp://0.0.0.0:2233]
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "cpaem-..." is now scan-waiting
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "cpaem-..." is now scanning
[EEZTP] 2025/01/10 17:30:05 INFO: Ready to synchronize "Weisheit-Video" (epbpc-...) (sendreceive)
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "epbpc-..." is now scan-waiting
[EEZTP] 2025/01/10 17:30:05 INFO: Ready to synchronize "keepass" (gnkcd-...) (sendreceive)
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "epbpc-..." is now scanning
[EEZTP] 2025/01/10 17:30:05 INFO: GUI and API listening on 127.0.0.1:8384
[EEZTP] 2025/01/10 17:30:05 INFO: Access the GUI via the following URL: hclient6://localhost:8384/
[EEZTP] 2025/01/10 17:30:05 INFO: My name is "tux09"
[EEZTP] 2025/01/10 17:30:05 INFO: Device YU3UVTG-... is "client2" at [dynamic]
[EEZTP] 2025/01/10 17:30:05 INFO: Device DI3HEJ6-... is "client5" at [tcp://client5]
[EEZTP] 2025/01/10 17:30:05 INFO: Device LFDAIR5-... is "client3" at [dynamic]
[EEZTP] 2025/01/10 17:30:05 INFO: Device MZ5UBGZ-... is "client4" at [dynamic]
[EEZTP] 2025/01/10 17:30:05 INFO: Device PODUW3J-... is "client1" at [dynamic]
[EEZTP] 2025/01/10 17:30:05 INFO: Device S7P7Z4V-... is "client6" at [dynamic]
[EEZTP] 2025/01/10 17:30:05 INFO: Device U5F76TX-... is "pi" at [tcp4://192.168.178.5:2233]
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Startup complete
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "gnkcd-..." is now scan-waiting
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "gnkcd-..." is now scanning
[EEZTP] 2025/01/10 17:30:05 INFO: Ready to synchronize "Austausch" (qtiws-...) (sendreceive)
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "qtiws-..." is now scan-waiting
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "qtiws-..." is now scanning
[EEZTP] 2025/01/10 17:30:05 INFO: Ready to synchronize "camset-Konfiguration" (ytfk2-...) (sendreceive)
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "ytfk2-..." is now scan-waiting
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "ytfk2-..." is now scanning
[EEZTP] 2025/01/10 17:30:05 INFO: Completed initial scan of sendreceive folder "Sync1" (qtiws-...)
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "qtiws-..." is now idle
[EEZTP] 2025/01/10 17:30:05 INFO: Completed initial scan of sendreceive folder "Sync2" (gnkcd-...)
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "gnkcd-..." is now idle
[EEZTP] 2025/01/10 17:30:05 INFO: Completed initial scan of sendreceive folder "Sync3" (ytfk2-...)
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "ytfk2-..." is now idle
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Discovered device U5F76TX-... at [tcp4://192.168.178.5:2233]
[EEZTP] 2025/01/10 17:30:05 INFO: Completed initial scan of sendreceive folder "Sync4" (epbpc-...)
[EEZTP] 2025/01/10 17:30:05 VERBOSE: Folder "epbpc-..." is now idle
panic: string field contains invalid UTF-8 [recovered]
[monitor] 2025/01/10 17:30:05 WARNING: Panic detected, writing to "/home/test/.local/state/syncthing/panic-20250110-173005.log"
[monitor] 2025/01/10 17:30:05 WARNING: Please check for existing issues with similar panic message at hclient6s://github.com/syncthing/syncthing/issues/
[monitor] 2025/01/10 17:30:05 WARNING: If no issue with similar panic message exists, please create a new issue with the panic log attached
[monitor] 2025/01/10 17:30:05 INFO: Syncthing exited: exit status 2
m23project commentedon Jan 10, 2025
In case it could be helpful:
panic-20250110-173005.log
calmh commentedon Jan 10, 2025
Yes that's that one, thank you.
calmh commentedon Jan 10, 2025
Could you enable
scannerdebugging on the log tab and run a scan, or set it from the outside before starting Syncthing withexport STTRACE=scannerand post the last 20 or so lines before the panic? I'm trying to figure out how a non-UTF8 filename gets to the point where it apparently is...calmh commentedon Jan 10, 2025
Also if I may ask, do you have any symlinks to such files (i.e. where the target of the symlink may contain non-utf8 characters)?
m23project commentedon Jan 11, 2025
m23project commentedon Jan 11, 2025
I can set the environment variable, but cannot reach any tab in the web ui, because it crashes too early.
One of the problems is the directory that contains an "ü". The files and directories are in UTF-8 now and symlinks are present.
PS Syncthing doesn't crash, when I use the binary from the v1.28.1 archive release.
calmh commentedon Jan 11, 2025
Could you try this build and see if it makes a difference?
https://cdn.kastelo.net/rfi/n5divm.zip
m23project commentedon Jan 11, 2025
This build works for me :-)
m23project commentedon Jan 11, 2025
Would it be possible to keep some versions in the Debian repository? So it would be possible to install an older version of the package if needed.
thessy commentedon Jan 11, 2025
With upgrade to 1.29.0 via https://apt.syncthing.net I encountered also panic errors.
Build above does also works for me again.
chore(proto): change symlinktarget to be byte sequence (fixes syncthi…
Merge branch 'main' into infrastructure