Seadrive: Failed to stat block

I’m getting the following error from Seadrive 0.8.5 headless on Ubuntu Server 16.04. No AV or other software is checking the seadrive repos, so nothing could delete the block.

[03/02/18 10:58:32] block-backend-fs.c(231): [block bend] Failed to stat block xxxxx-xxxxx-xxxxx-xxxxx-xxxxx:f467e08a7f5f400f82a7841bc8649f2e779b47cf at /home/user/seadrive/seadrive-data/storage/blocks/xxxxx-xxxxx-xxxxx-xxxxx-xxxxx/f4/67e08a7f5f400f82a7841bc8649f2e779b47cf: No such file or directory.
[03/02/18 10:58:32] http-tx-mgr.c(3529): Failed to stat block f467e08a7f5f400f82a7841bc8649f2e779b47cf for file pic_40100/pic_40100_report.pdf in repo xxxxx-xxxxx-xxxxx-xxxxx-xxxxx.
[03/02/18 10:58:32] http-tx-mgr.c(1145): Transfer repo 'xxxxx': ('normal', 'data') --> ('error', 'finished')
[03/02/18 10:58:32] sync-mgr.c(604): Repo 'pics' sync state transition from uploading to 'error': 'Error occured in upload.'.

This is not the first time happening. Seadrive is not syncing after this.

Any idea whats wrong or how to fix it?

Related: Seadrive Failed to stat block

Suggestion in the other topic is to logout and login again.
How to do this on headless?
And will it delete the uncommited files?

Last time I had this problem, I had to run seaf-fsck on the offending library to fix it.

in this case, it’s a seadrive issue. I guess it happens when a foreign program earases the file in the exact same time when seadrive is doing some work on it.

The problem is the file name. SeaDrive can’t understand a / in a file name.

1 Like

Good catch, @bionade24. I missed that.

@aley Can you send me the complete seadrive.log file? (Via PM)

@Jonathan The log is to huge, but I can give you an excerpt. I hope it’s sufficient.

It started like this

[03/26/18 05:38:29] sync-mgr.c(570): Repo 'files-live' sync state transition from 'uploading' to 'get sync info'.
[03/26/18 05:38:29] sync-mgr.c(570): Repo 'files-live' sync state transition from 'get sync info' to 'synchronized'.
[03/26/18 05:38:30] sync-mgr.c(570): Repo 'files-live' sync state transition from 'synchronized' to 'committing'.
[03/26/18 05:38:30] sync-mgr.c(2585): Creating partial commit after adding file_4000/fl_4000_trim.pdf in repo files-live(3847c54d).
[03/26/18 05:38:30] sync-mgr.c(570): Repo 'files-live' sync state transition from 'committing' to 'synchronized'.
[03/26/18 05:38:31] sync-mgr.c(570): Repo 'files-live' sync state transition from 'synchronized' to 'committing'.
[03/26/18 05:38:31] sync-mgr.c(2585): Creating partial commit after adding file_4000/fl_4000_trim.pdf in repo files-live(3847c54d).
[03/26/18 05:38:31] sync-mgr.c(570): Repo 'files-live' sync state transition from 'committing' to 'synchronized'.
[03/26/18 05:38:32] sync-mgr.c(570): Repo 'files-live' sync state transition from 'synchronized' to 'committing'.
[03/26/18 05:38:32] sync-mgr.c(2585): Creating partial commit after adding file_4000/fl_4000_trim.pdf in repo files-live(3847c54d).
[03/26/18 05:38:32] sync-mgr.c(570): Repo 'files-live' sync state transition from 'committing' to 'synchronized'.
[03/26/18 05:38:33] sync-mgr.c(570): Repo 'files-live' sync state transition from 'synchronized' to 'committing'.
[03/26/18 05:38:33] sync-mgr.c(2585): Creating partial commit after adding file_4000/fl_4000_trim.pdf in repo files-live(3847c54d).
[03/26/18 05:38:33] sync-mgr.c(570): Repo 'files-live' sync state transition from 'committing' to 'synchronized'.
[03/26/18 05:38:34] sync-mgr.c(570): Repo 'files-live' sync state transition from 'synchronized' to 'committing'.
...

Than I moved the problematic file, it started saying this

[03/26/18 05:37:34] file-cache-mgr.c(2174): Failed to stat /opt/seadrive/seadrive-data/file-cache/3847c54d-9548-43bc-9b6c-1c6173a56720/file_4000/fl_4000_trim.pdf: No such file or directory.
[03/26/18 05:37:34] sync-mgr.c(2346): Failed to index file file_4000/fl_4000_trim.pdf in repo 3847c54d-9548-43bc-9b6c-1c6173a56720, skip.
[03/26/18 05:37:34] sync-mgr.c(2585): Creating partial commit after adding file_4001/fl_4001_trim.pdf in repo files-live(3847c54d).
[03/26/18 05:37:34] sync-mgr.c(570): Repo 'files-live' sync state transition from 'committing' to 'synchronized'.
[03/26/18 05:37:35] sync-mgr.c(570): Repo 'files-live' sync state transition from 'synchronized' to 'committing'.
[03/26/18 05:37:35] file-cache-mgr.c(2174): Failed to stat /opt/seadrive/seadrive-data/file-cache/3847c54d-9548-43bc-9b6c-1c6173a56720/file_4000/fl_4000_trim.pdf: No such file or directory.
[03/26/18 05:37:35] sync-mgr.c(2346): Failed to index file file_4000/fl_4000_trim.pdf in repo 3847c54d-9548-43bc-9b6c-1c6173a56720, skip.
[03/26/18 05:37:35] sync-mgr.c(2585): Creating partial commit after adding file_4001/fl_4001_trim.pdf in repo files-live(3847c54d).
[03/26/18 05:37:35] sync-mgr.c(570): Repo 'files-live' sync state transition from 'committing' to 'synchronized'.
[03/26/18 05:37:36] sync-mgr.c(570): Repo 'files-live' sync state transition from 'synchronized' to 'committing'.
...

Then after some minutes, it started working again

[03/26/18 05:37:36] sync-mgr.c(2585): Creating partial commit after adding file_4001/fl_4001_trim.pdf in repo files-live(3847c54d).
[03/26/18 05:37:36] sync-mgr.c(570): Repo 'files-live' sync state transition from 'committing' to 'uploading'.
[03/26/18 05:37:36] http-tx-mgr.c(3878): Upload with HTTP sync protocol version 2.
[03/26/18 05:37:36] http-tx-mgr.c(1145): Transfer repo '3847c54d': ('normal', 'init') --> ('normal', 'check')
[03/26/18 05:37:37] http-tx-mgr.c(1145): Transfer repo '3847c54d': ('normal', 'check') --> ('normal', 'commit')
[03/26/18 05:37:37] http-tx-mgr.c(1145): Transfer repo '3847c54d': ('normal', 'commit') --> ('normal', 'fs')
[03/26/18 05:37:37] http-tx-mgr.c(1145): Transfer repo '3847c54d': ('normal', 'fs') --> ('normal', 'data')
[03/26/18 05:37:37] http-tx-mgr.c(1145): Transfer repo '3847c54d': ('normal', 'data') --> ('normal', 'update-branch')
[03/26/18 05:37:37] http-tx-mgr.c(1145): Transfer repo '3847c54d': ('normal', 'update-branch') --> ('finished', 'finished')
[03/26/18 05:37:37] sync-mgr.c(2290): removing blocks for repo 3847c54d-9548-43bc-9b6c-1c6173a56720
[03/26/18 05:37:37] sync-mgr.c(570): Repo 'files-live' sync state transition from 'uploading' to 'get sync info'.
[03/26/18 05:37:37] sync-mgr.c(570): Repo 'files-live' sync state transition from 'get sync info' to 'synchronized'.
[03/26/18 05:37:37] sync-mgr.c(570): Repo 'files-live' sync state transition from 'synchronized' to 'committing'.
[03/26/18 05:37:37] sync-mgr.c(2585): Creating partial commit after adding file_4001/fl_4001_trim.pdf in repo files-live(3847c54d).
[03/26/18 05:37:37] sync-mgr.c(570): Repo 'files-live' sync state transition from 'committing' to 'uploading'.

Seems like seadrive sometime stucks on that “partial commit”. Maybe it happens, when seadrive is commiting this file and some other program is modifying or moving it during that time.

Hi @aley

Sorry for the late reply and thanks for the log. But the log doesn’t seem to be related to the initial problem you mentioned (missing block). Can you provide more hint?

Hey @Jonathan
Sorry for the late reply. Basically the problem from the last log is reappearing constantly, like every week once, time and day random. I guess when a file is in a syncing proccess and it gets modified, seadrive goes into this infinite loop of partial commit.