[SOLVED] corruption on data-block with checksum mismatch

First of all, the logs that I have come from Syncthing-Fork on Android, which is not the official application, so please forgive me if this forum is not the right place to report the issue. The problem, however, occured when using the official application too, but I just do not have the logs from it right now.

What happens is that Syncthing suddenly crashes after 10-15 minutes of operation. The crash is reproducible in my configuration. Resetting (deleting) the database or even reinstalling Syncthing completely does not help. Also, after the database has become corrupted, Syncthing refuses to start any longer unless I clear the database manually. The corruption comes back very quickly after the reset though.

One perhaps important thing may be that this seems to have started to happen only after formatting the SD card as internal storage (using the method described here: https://fossbytes.com/android-sd-card-internal-storage-adoptable-storage/). I understand that this could be a hardware issue, but this is a remotely administered device, so I cannot swap the card to check it, and I have doubts, as the card itself is high quality, has barely been used, and has not displayed any problems before.

I am attaching the log file below (with personal information removed).

syncthing.log (125.3 KB)

Please let me know if there is anything suspicious there. If necessary, I may try to narrow down the problem to a specific file, as there are only a few dozens files being synced with that device anyway.

The hardware in question is Samsung Galaxy S4 Active LTE-A (SHV-E470S) with Android 7.1 (LineageOS 14.1) installed. Also, I believe that the file system used on the data partition is F2FS, although I would need to re-check this one to be sure.

1 Like

Hi,

Does this also occur when using Syncthing(native) v1.3.2-release instead of the rc version mentioned in the log? E.g. https://f-droid.org/repo/com.nutomic.syncthingandroid_4204.apk

Your filesystem/storage is dodgy. Even if you one-off fix it, it will keep happening. You need to fix your storage first.

1 Like

@Catfriend1 I will check it, but the reason why I tried to use Syncthing-Fork in the first place was that the official application kept crashing, likely for the very same reason, although I do not have the relevant logs anymore. By the way, the “rc version mentioned in the log” comes from the newest version of Syncthing-Fork available on F-Droid.

@AudriusButkevicius It seems so, as I do not have the problem on any other devices syncing the same files. I am just curious what the cuplrit is, as I believe that the SD card itself is fine. I am leaning towards something related to using the card as internal storage, but cannot do any tests in person (e.g. swapping the card) unforunately.

1 Like

Just a quick update - the issue is not related to SD card at all. I reformatted the card as external, and recreated all the folders in internal storage. Then I cleared the database and started Syncthing again. After a while it crashed again with the same checksum mismatch error.

panic: leveldb/table: corruption on data-block (pos=485232): checksum mismatch, want=0x0 got=0xb2e9eff3 [file=000589.ldb]

syncthing.log (113.5 KB)

Now I am going to test the official Syncthing application and see what happens there.

1 Like

Every app and platform uses the same binary, so no matter what you are planning to try, you are essentially trying the same code.

Again, this is a bad filesystem implementation/bad storage/corruption due to abrupt shutdown problem, you can point at software all you want, but we’ve seen 100’s of these over the years.

There is a slight possibility the binary is corrupt, but that usually manifests as crashes, not as database corruption.

1 Like

I just wanted to give a final update to this issue. I switched to using the internal storage only, and there have been no crashes so far.

It could be a faulty SD card, although I have a feeling that something funky may be going on with the filesystem, as this is a 3rd party LineageOS ROM.

I have no physical access to the device anyway, so I have just given up on this for now. Thank you for all the help!

3 Likes

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