Seadrive stops sync with libcurl error

Seadrive keeps giving me hard time. The main problems are its verbosity level and recoverability.

Recently I have this problem. It stops syncing with the error “Operation was aborted by an application callback.” or “Failed to get file 4019dee3a00bbac4c7a867e66ed43f03dbee0d50 in repo 3747c53d.”. So what is it telling? I checked the logs on the server. No errors. I have to remove seadrives meta directory to sort this out.

[10/17/18 12:14:55] sync-mgr.c(1413): All repo fs trees are loaded.
[10/17/18 12:14:55] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'synchronized' to 'uploading'.
[10/17/18 12:14:55] http-tx-mgr.c(3919): Upload with HTTP sync protocol version 2.
[10/17/18 12:14:55] http-tx-mgr.c(1186): Transfer repo '3747c53d': ('normal', 'init') --> ('normal', 'check')
[10/17/18 12:14:55] http-tx-mgr.c(1186): Transfer repo '3747c53d': ('normal', 'check') --> ('normal', 'commit')
[10/17/18 12:14:55] http-tx-mgr.c(1186): Transfer repo '3747c53d': ('normal', 'commit') --> ('normal', 'fs')
[10/17/18 12:14:56] http-tx-mgr.c(1186): Transfer repo '3747c53d': ('normal', 'fs') --> ('normal', 'data')
[10/17/18 12:14:56] fs-mgr.c(591): [fs mgr] Failed to read file 4019dee3a00bbac4c7a867e66ed43f03dbee0d50.
[10/17/18 12:14:56] http-tx-mgr.c(3655): Failed to get file 4019dee3a00bbac4c7a867e66ed43f03dbee0d50 in repo 3747c53d.
[10/17/18 12:14:56] http-tx-mgr.c(911): libcurl failed to PUT https://hostname/seafhttp/repo/3747c53d-9548-43bc-9b6c-1c6173a56720/block/dc7bef76aa0533d1c7f9992a1398eb97daf83540: Operation was aborted by an application callback.
[10/17/18 12:14:56] http-tx-mgr.c(1186): Transfer repo '3747c53d': ('normal', 'data') --> ('error', 'finished')
[10/17/18 12:14:56] sync-mgr.c(604): Repo 'pdfs' sync state transition from uploading to 'error': 'Error occured in upload.'.
[10/17/18 12:15:26] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'synchronized' to 'uploading'.
[10/17/18 12:15:26] http-tx-mgr.c(3919): Upload with HTTP sync protocol version 2.
[10/17/18 12:15:26] http-tx-mgr.c(1186): Transfer repo '3747c53d': ('normal', 'init') --> ('normal', 'check')
[10/17/18 12:15:26] http-tx-mgr.c(1186): Transfer repo '3747c53d': ('normal', 'check') --> ('normal', 'commit')
[10/17/18 12:15:26] http-tx-mgr.c(1186): Transfer repo '3747c53d': ('normal', 'commit') --> ('normal', 'fs')
[10/17/18 12:15:27] http-tx-mgr.c(1186): Transfer repo '3747c53d': ('normal', 'fs') --> ('normal', 'data')
[10/17/18 12:15:27] fs-mgr.c(591): [fs mgr] Failed to read file 4019dee3a00bbac4c7a867e66ed43f03dbee0d50.
[10/17/18 12:15:27] http-tx-mgr.c(3655): Failed to get file 4019dee3a00bbac4c7a867e66ed43f03dbee0d50 in repo 3747c53d.
[10/17/18 12:15:27] http-tx-mgr.c(911): libcurl failed to PUT https://hostname/seafhttp/repo/3747c53d-9548-43bc-9b6c-1c6173a56720/block/dc7bef76aa0533d1c7f9992a1398eb97daf83540: Operation was aborted by an application callback.
[10/17/18 12:15:27] http-tx-mgr.c(911): libcurl failed to PUT https://hostname/seafhttp/repo/3747c53d-9548-43bc-9b6c-1c6173a56720/block/a9d6a22388e4aa963c579786ee66ad5e74cd41b8: Operation was aborted by an application callback.
[10/17/18 12:15:27] http-tx-mgr.c(1186): Transfer repo '3747c53d': ('normal', 'data') --> ('error', 'finished')
[10/17/18 12:15:27] sync-mgr.c(604): Repo 'pdfs' sync state transition from uploading to 'error': 'Error occured in upload.'.

Second problem which occurs since the time I installed seadrive

[10/11/18 11:27:41] http-tx-mgr.c(3878): Upload with HTTP sync protocol version 2.
[10/11/18 11:27:41] http-tx-mgr.c(1145): Transfer repo '3747c53d': ('normal', 'init') --> ('normal', 'check')
[10/11/18 11:27:41] http-tx-mgr.c(1145): Transfer repo '3747c53d': ('normal', 'check') --> ('normal', 'commit')
[10/11/18 11:27:41] http-tx-mgr.c(1145): Transfer repo '3747c53d': ('normal', 'commit') --> ('normal', 'fs')
[10/11/18 11:27:42] http-tx-mgr.c(1145): Transfer repo '3747c53d': ('normal', 'fs') --> ('normal', 'data')
[10/11/18 11:27:46] http-tx-mgr.c(1145): Transfer repo '3747c53d': ('normal', 'data') --> ('normal', 'update-branch')
[10/11/18 11:27:46] http-tx-mgr.c(1145): Transfer repo '3747c53d': ('normal', 'update-branch') --> ('finished', 'finished')
[10/11/18 11:27:46] sync-mgr.c(2326): removing blocks for repo 3747c53d-9548-43bc-9b6c-1c6173a56720
[10/11/18 11:27:46] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'uploading' to 'get sync info'.
[10/11/18 11:27:46] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'get sync info' to 'synchronized'.
[10/11/18 11:27:46] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'synchronized' to 'committing'.
[10/11/18 11:27:47] sync-mgr.c(2616): Creating partial commit after adding pdfs/6210.pdf in repo pdfs(3747c53d).
[10/11/18 11:27:47] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'committing' to 'synchronized'.
[10/11/18 11:27:47] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'synchronized' to 'committing'.
[10/11/18 11:27:48] sync-mgr.c(2616): Creating partial commit after adding pdfs/6387.pdf in repo pdfs(3747c53d).
[10/11/18 11:27:48] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'committing' to 'synchronized'.
[10/11/18 11:27:48] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'synchronized' to 'committing'.
[10/11/18 11:27:49] sync-mgr.c(2616): Creating partial commit after adding pdfs/6210.pdf in repo pdfs(3747c53d).
[10/11/18 11:27:49] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'committing' to 'synchronized'.
[10/11/18 11:27:49] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'synchronized' to 'committing'.
[10/11/18 11:27:50] sync-mgr.c(2616): Creating partial commit after adding pdfs/6387.pdf in repo pdfs(3747c53d).
[10/11/18 11:27:50] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'committing' to 'synchronized'.
[10/11/18 11:27:50] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'synchronized' to 'committing'.
[10/11/18 11:27:51] sync-mgr.c(2616): Creating partial commit after adding pdfs/6210.pdf in repo pdfs(3747c53d).
[10/11/18 11:27:51] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'committing' to 'synchronized'.
[10/11/18 11:27:51] sync-mgr.c(570): Repo 'pdfs' sync state transition from 'synchronized' to 'committing'.
[10/11/18 11:27:52] sync-mgr.c(2616): Creating partial commit after adding pdfs/6387.pdf in repo pdfs(3747c53d).
............. never ending "partial commit" loop continues ..............

I’m on Ubuntu 18 using cli only

Looks like this is the main cause indicating that there is corruption in the local metadata. Due to that the clients aborts uploading (which leads to the libcurl “error”).

@daniel.pan the client and seadrive should be able to recover from such a situation instead of being stuck and failing forever.

As we can see from the library ID this is exactly the library from above.

Yeah, but look at the date. They are not related.

Search for the first “Failed to get file 4019dee3a00bbac4c7a867e66ed43f03dbee0d50 in repo 3747c53d.”

If it would be related, both errors would appear at the same time, right? They don’t. Recovering from “partial commit” is possible by moving the file out of the the directory, waiting for seadrive to get the change, and puting it up again. But recovering from the curl error is only possible by reinstalling seadrive.

It’s not a curl but disk / Seafile issue as explained above. Some indexed block that should be there is missing.

Do you run an anti virus product?

No AV installed. You mean the seadrive client is missing a block? Or is it the server? The strange part is that after reinit, it appears again after a while

Yes. Seafile indexes the data and stores it temporarily on your disk. The message indicates that a block is missing. Unfortunately we don’t know the exact reason for which it is missing.

Yeah, the point is that its always missing different blocks after I reinitiate seadrive and its always the pdfs lib. Other libs work fine. The interesting part is that it happens after the the other error. When I move the affected file out and than back in to fix it. Boom, lib corrupted. But this curl error is new. The other problem is there already for months. Thats also basically the reason why I’ll remove seadrive from my system. It can’t recover from such situations. I had it in a production environment and it was real pain in the ass.