SeaDrive notifications when uploading fails

I was working on a document during the whole day on 8 January. The next day I noticed that the version on the SeaDrive was at time date 10:27 (I was working on the document until 18:00).
I did not notice it until the next day.

When I tried to open the file word gives the following error: could not be opened because there is a problem with the content. The file is damaged and cannot be opened.

Fortunately I could recover the file via Word-recovery.

SeaDrive did not give any notification that it could not safe the file any longer.

Today I checked the logs of SeaDrive:
[01/08/17 11:09:07] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘commit’) --> (‘normal’, ‘fs’)
[01/08/17 11:09:07] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘fs’) --> (‘normal’, ‘data’)
[01/08/17 11:09:07] fs-mgr.c(594): [fs mgr] Failed to read file c5a98b9f36d15b9059e5cabdddd49288a4659c90.
[01/08/17 11:09:07] http-tx-mgr.c(2872): Failed to get seafile object 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af:c5a98b9f36d15b9059e5cabdddd49288a4659c90. Path is KEEPASS/DARKLITE.kdbx.
[01/08/17 11:09:07] http-tx-mgr.c(3561): Failed to calculate block list for repo 0f11aa97.
[01/08/17 11:09:07] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘data’) --> (‘error’, ‘finished’)
[01/08/17 11:09:07] sync-mgr.c(392): Repo ‘DATA’ sync state transition from uploading to ‘error’: ‘Error occured in upload.’.
[01/08/17 11:09:37] sync-mgr.c(362): Repo ‘DATA’ sync state transition from ‘synchronized’ to ‘uploading’.
[01/08/17 11:09:37] http-tx-mgr.c(3473): Upload with HTTP sync protocol version 1.
[01/08/17 11:09:37] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘init’) --> (‘normal’, ‘check’)
[01/08/17 11:09:37] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘check’) --> (‘normal’, ‘commit’)
[01/08/17 11:09:38] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘commit’) --> (‘normal’, ‘fs’)
[01/08/17 11:09:38] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘fs’) --> (‘normal’, ‘data’)
[01/08/17 11:09:38] fs-mgr.c(594): [fs mgr] Failed to read file c5a98b9f36d15b9059e5cabdddd49288a4659c90.
[01/08/17 11:09:38] http-tx-mgr.c(2872): Failed to get seafile object 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af:c5a98b9f36d15b9059e5cabdddd49288a4659c90. Path is KEEPASS/DARKLITE.kdbx.
[01/08/17 11:09:38] http-tx-mgr.c(3561): Failed to calculate block list for repo 0f11aa97.
[01/08/17 11:09:38] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘data’) --> (‘error’, ‘finished’)
[01/08/17 11:09:38] sync-mgr.c(392): Repo ‘DATA’ sync state transition from uploading to ‘error’: ‘Error occured in upload.’.
[01/08/17 11:10:08] sync-mgr.c(362): Repo ‘DATA’ sync state transition from ‘synchronized’ to ‘uploading’.
[01/08/17 11:10:08] http-tx-mgr.c(3473): Upload with HTTP sync protocol version 1.
[01/08/17 11:10:08] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘init’) --> (‘normal’, ‘check’)
[01/08/17 11:10:09] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘check’) --> (‘normal’, ‘commit’)
[01/08/17 11:10:09] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘commit’) --> (‘normal’, ‘fs’)
[01/08/17 11:10:09] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘fs’) --> (‘normal’, ‘data’)
[01/08/17 11:10:09] fs-mgr.c(594): [fs mgr] Failed to read file c5a98b9f36d15b9059e5cabdddd49288a4659c90.
[01/08/17 11:10:09] http-tx-mgr.c(2872): Failed to get seafile object 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af:c5a98b9f36d15b9059e5cabdddd49288a4659c90. Path is KEEPASS/DARKLITE.kdbx.
[01/08/17 11:10:09] http-tx-mgr.c(3561): Failed to calculate block list for repo 0f11aa97.
[01/08/17 11:10:09] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘data’) --> (‘error’, ‘finished’)
[01/08/17 11:10:09] sync-mgr.c(392): Repo ‘DATA’ sync state transition from uploading to ‘error’: ‘Error occured in upload.’.
[01/08/17 11:10:39] sync-mgr.c(362): Repo ‘DATA’ sync state transition from ‘synchronized’ to ‘uploading’.
[01/08/17 11:10:39] http-tx-mgr.c(3473): Upload with HTTP sync protocol version 1.
[01/08/17 11:10:39] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘init’) --> (‘normal’, ‘check’)
[01/08/17 11:10:40] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘check’) --> (‘normal’, ‘commit’)
[01/08/17 11:10:40] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘commit’) --> (‘normal’, ‘fs’)
[01/08/17 11:10:40] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘fs’) --> (‘normal’, ‘data’)
[01/08/17 11:10:40] fs-mgr.c(594): [fs mgr] Failed to read file c5a98b9f36d15b9059e5cabdddd49288a4659c90.
[01/08/17 11:10:40] http-tx-mgr.c(2872): Failed to get seafile object 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af:c5a98b9f36d15b9059e5cabdddd49288a4659c90. Path is KEEPASS/DARKLITE.kdbx.
[01/08/17 11:10:40] http-tx-mgr.c(3561): Failed to calculate block list for repo 0f11aa97.
[01/08/17 11:10:40] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘data’) --> (‘error’, ‘finished’)
[01/08/17 11:10:40] sync-mgr.c(392): Repo ‘DATA’ sync state transition from uploading to ‘error’: ‘Error occured in upload.’.

The next day the log started with an error about my word file:
[01/09/17 05:53:17] repo-mgr.c(643): Failed to apply op to repo tree of 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af: No such file or directory.
Op details: 1 DIRECTORY/~$17 01 08 filename.docx (NULL) 0 0 0

The log continues:
[01/09/17 06:00:57] http-tx-mgr.c(2082): Bad response code for GET http:///api2/repos/: 500.
[01/09/17 06:01:02] http-tx-mgr.c(1578): Bad response code for GET http://
/seafhttp/repo/folder-perm: 502.
[01/09/17 06:01:27] http-tx-mgr.c(2082): Bad response code for GET http:///api2/repos/: 502.
[01/09/17 06:01:32] http-tx-mgr.c(4681): Bad response code for GET http://
/api2/account/info/: 502.

After that every other file was unavailable and the log shows “[01/09/17 05:57:59] file-cache-mgr.c(1507): Failed to stat repo tree path filename.pdf in repo 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af.”.

I logged out and login again and after that the problem was fixed. However my initial word file is still corrupt.

Thanks for reporting.

This could be a bug for handling some file update sequence. (For this case it’s the keepass database,) We’ll try to reproduce this. But could you first check your AV software didn’t delete ‘seadrive/storage/fs/0f11aa97-9fe3-44c4-a9c5-bdf14c5477af/c5/a98b9f36d15b9059e5cabdddd49288a4659c90’?

This is a bug that we’ll fix in the next version.

About your word file, I think it’s not corrupted inside seadrive’s file cache. But the current version doesn’t handle this case very well. The virtual file system returns incorrect file size. It’ll be improved in the next version.

The AV did not delete this file.

Is this what is causing the problem with the word-file?

SeaDrive is doing funky again on the keepass db.
[01/16/17 22:43:08] fs-mgr.c(594): [fs mgr] Failed to read file c5a98b9f36d15b9059e5cabdddd49288a4659c90.
[01/16/17 22:43:08] http-tx-mgr.c(2872): Failed to get seafile object 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af:c5a98b9f36d15b9059e5cabdddd49288a4659c90. Path is KEEPASS/DARKLITE.kdbx.
[01/16/17 22:43:08] http-tx-mgr.c(3561): Failed to calculate block list for repo 0f11aa97.
[01/16/17 22:43:08] http-tx-mgr.c(980): Transfer repo ‘0f11aa97’: (‘normal’, ‘data’) --> (‘error’, ‘finished’)
[01/16/17 22:43:08] sync-mgr.c(392): Repo ‘DATA’ sync state transition from uploading to ‘error’: ‘Error occured in upload.’.

I did some testing with Keepass, but didn’t manage to reproduce the problem. What operations did you do to the Keepass database file?

The problem seems to be started on 13 January:

On the cloud:

This is the error what I get when I start keepass:

Yesterday it was still working, this morning it is corrupt…

On January 13 I have created a new entry in the database

It’s really annoying that SeaDrive did not “tell me” that something was wrong and it could not upload. I cannot even repair the corrupted file.

I checked the code of 0.4.2 version. The situation you met shouldn’t happen “naturally” with seadrive. Perhaps your AV software somehow removed the object mentioned in your seadrive.log error.

No the AV did not remove the file. My World-file was also corrupted due to SeaDrive.

The problem is also whenever you logout and login again all the changed files are not uploaded to SeaDrive… (even when the cache was not deleted). This is not normal behavior I would presume? It means that all the changed files are gone and you would have to check every day the logfiles in order to be sure that everything was synced with the server.

This is really weird.

I updated to version 0.5.0 and it seems that all the updated/new files are now transmitted to the server.

[01/19/17 06:16:47] repo-mgr.c(933): Cached file .docx of repo DATA(0f11aa97) is different from repo tree status.
Cached file: mtime 1483881710, size 16612
Repo tree: mtime 1483867676, size 11798
[01/19/17 06:16:47] repo-mgr.c(937): Generating conflict file * (SFConflict * 2017-01-08-14-21-50).docx in repo 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af.
[01/19/17 06:16:47] repo-mgr.c(911): Adding cached file 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af/factuur.pdf to tree.
[01/19/17 06:16:47] repo-mgr.c(933): Cached file BACKUP/
.exe of repo DATA(0f11aa97) is different from repo tree status.
Cached file: mtime 1484330856, size 139264
Repo tree: mtime 1483209260, size 139264
[01/19/17 06:16:47] repo-mgr.c(937): Generating conflict file BACKUP/* (SFConflict * 2017-01-13-19-07-36).exe in repo 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af.
[01/19/17 06:16:48] repo-mgr.c(933): Cached file KEEPASS/DARKLITE 2.0.kdbx of repo DATA(0f11aa97) is different from repo tree status.
Cached file: mtime 1484687794, size 0
Repo tree: mtime 1484687794, size 214286
[01/19/17 06:16:48] repo-mgr.c(937): Generating conflict file KEEPASS/DARKLITE 2.0 (SFConflict * 2017-01-17-22-16-34).kdbx in repo 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af.
[01/19/17 06:16:48] repo-mgr.c(933): Cached file KEEPASS/DARKLITE.kdbx of repo DATA(0f11aa97) is different from repo tree status.
Cached file: mtime 1484341124, size 0
Repo tree: mtime 1483199571, size 213102
[01/19/17 06:16:48] repo-mgr.c(937): Generating conflict file KEEPASS/DARKLITE (SFConflict * 2017-01-13-21-58-44).kdbx in repo 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af.
[01/19/17 06:16:48] repo-mgr.c(933): Cached file .pdf of repo DATA(0f11aa97) is different from repo tree status.
Cached file: mtime 1484214341, size 74186
Repo tree: mtime 1483199610, size 74286
[01/19/17 06:16:48] repo-mgr.c(937): Generating conflict file * (SFConflict * 2017-01-12-10-45-41).pdf in repo 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af.
[01/19/17 06:16:48] repo-mgr.c(911): Adding cached file 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af/
.docx to tree.
[01/19/17 06:16:48] repo-mgr.c(911): Adding cached file 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af/.docx to tree.
[01/19/17 06:16:48] repo-mgr.c(911): Adding cached file 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af/
.pdf to tree.
[01/19/17 06:16:48] repo-mgr.c(911): Adding cached file 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af/.docx to tree.
[01/19/17 06:16:48] repo-mgr.c(911): Adding cached file 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af/
.docx to tree.
[01/19/17 06:16:48] repo-mgr.c(911): Adding cached file 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af/* to tree.
[01/19/17 06:16:48] repo-mgr.c(911): Adding cached file 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af/.pdf to tree.
[01/19/17 06:16:48] repo-mgr.c(911): Adding cached file 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af/
.pdf - Google Search.pdf to tree.
[01/19/17 06:16:48] repo-mgr.c(911): Adding cached file 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af/*.docx to tree.
[01/19/17 06:16:48] repo-mgr.c(911): Adding cached file 0f11aa97-9fe3-44c4-a9c5-bdf14c5477af/PFSENSE/pfSense-CE-2.3.2-RELEASE-amd64.iso to tree.
[01/19/17 06:16:48] sync-mgr.c(375): Repo ‘DATA’ sync state transition from ‘load repo’ to ‘synchronized’.

What is happening?

This is an improved “corruption” recovery behavior in the new version. As I mentioned before, the “corrupted” files are actually still fine in the local cache folder. The new client can now pick up the files and make them accessible again.