haiwen / seafile

High performance file syncing and sharing, with also Markdown WYSIWYG editing, Wiki, file label and other knowledge management features.
http://seafile.com/
Other
12.25k stars 1.54k forks source link

Error "Failed to merge local file changes" #312

Closed bigio closed 11 years ago

bigio commented 11 years ago

Hi, I have a Linux server and a couple of Windows clients, on a Windows client I have this error I can reproduce this way:

bigio commented 11 years ago

On Windows the exact error is "file changed in local folder, skip merge", on ccnet log file on the client there is "work tree still dirty after commit", the other client is working fine. The clients are running both 1.8.0 version.

killing commented 11 years ago

I can't reproduce your problem with the latest client. The error message "Failed to merge local file changes" has been removed long time ago. So I suspect an old client produced this error. You can also post seafile.log on the problematic client here.

2013/8/8 bigio notifications@github.com

On Windows the exact error is "file changed in local folder, skip merge", on ccnet log file on the client there is "work tree still dirty after commit", the other client is working fine. The clients are running both 1.8.0 version.

— Reply to this email directly or view it on GitHubhttps://github.com/haiwen/seafile/issues/312#issuecomment-22265942 .

bigio commented 11 years ago

On 08/08/13 02:47, Jiaqiang Xu wrote:

I can't reproduce your problem with the latest client. The error message "Failed to merge local file changes" has been removed long time ago. So I suspect an old client produced this error. You can also post seafile.log on the problematic client here.

2013/8/8 bigio notifications@github.com

On Windows the exact error is "file changed in local folder, skip merge", on ccnet log file on the client there is "work tree still dirty after commit", the other client is working fine. The clients are running both 1.8.0 version.

— Reply to this email directly or view it on GitHubhttps://github.com/haiwen/seafile/issues/312#issuecomment-22265942 .

— Reply to this email directly or view it on GitHub https://github.com/haiwen/seafile/issues/312#issuecomment-22295262.

The client has been installed for the first time a couple of days ago, the problem happens after copying some Gb of data.

Here are the relevant parts of the log file.

[08/07/13 08:57:48] sync-mgr.c(425): Repo 'progetti' sync state transition from 'downloading' to 'merging'. [08/07/13 08:57:51] Worktree changes (at most 5 files are shown): [08/07/13 08:57:51] Cannot find diff entry 00/01/22/3D/ana-03/Analysis1.CATAnalysis in index. [08/07/13 08:57:51] Cannot find diff entry 00/01/22/3D/ana-02/Analysis1.CATAnalysis in index. [08/07/13 08:57:51] Cannot find diff entry 00/01/22/3D/ana-01/Analysis1.CATAnalysis in index. [08/07/13 08:57:51] Cannot find diff entry 00/01/04/Analisi/001/z/Manu-rev08-Studio 1.NOD in index. [08/07/13 08:57:51] Cannot find diff entry 00/01/04/Analisi/001/Analysis1.CATAnalysis in index. [08/07/13 08:57:52] CDC: failed to read: Invalid argument. [08/07/13 08:57:52] Failed to chunk file with CDC. [08/07/13 08:57:52] Failed to index file C:\cloud\progetti/00/00/10/3D/Manu-Rev09/analisi-01/Analysis1.CATAnalysis. [08/07/13 08:57:53] CDC: failed to read: Invalid argument. [08/07/13 08:57:53] Failed to chunk file with CDC. [08/07/13 08:57:53] Failed to index file C:\cloud\progetti/00/00/10/STRUTTURALE/cocacola-rev11-mod-rev03-per-cliente/Analysis1.CATAnalysis. [08/07/13 08:57:54] CDC: failed to read: Invalid argument. [08/07/13 08:57:54] Failed to chunk file with CDC. [08/07/13 08:57:54] Failed to index file C:\cloud\progetti/00/00/10/STRUTTURALE/cocacola-rev11-mod-rev03-riferimento-per-il-definitivo/Analysis1.CATAnalysis. [08/07/13 08:57:55] CDC: failed to read: Invalid argument. [08/07/13 08:57:55] Failed to chunk file with CDC. [08/07/13 08:57:55] Failed to index file C:\cloud\progetti/00/00/11/Analisi/03-0140-001/Analysis1.CATAnalysis. [08/07/13 08:57:56] CDC: failed to read: Invalid argument. [08/07/13 08:57:56] Failed to chunk file with CDC. [08/07/13 08:57:56] Failed to index file C:\cloud\progetti/00/00/11/Analisi/03-0140-002/Analysis1.CATAnalysis. [08/07/13 08:57:57] CDC: failed to read: Invalid argument. [08/07/13 08:57:57] Failed to chunk file with CDC. [08/07/13 08:57:57] Failed to index file C:\cloud\progetti/00/00/11/Analisi/rev03/6.2.1/Analysis1.CATAnalysis. [08/07/13 08:57:57] CDC: failed to read: Invalid argument. [08/07/13 08:57:57] Failed to chunk file with CDC. [08/07/13 08:57:57] Failed to index file C:\cloud\progetti/00/00/11/Analisi/rev03/6.2.1_b/Analysis1.CATAnalysis. [08/07/13 08:57:58] CDC: failed to read: Invalid argument. [08/07/13 08:57:58] Failed to chunk file with CDC. [08/07/13 08:57:58] Failed to index file C:\cloud\progetti/00/00/11/Analisi/rev03/6.2.1_c/Analysis1.CATAnalysis. [08/07/13 08:57:59] CDC: failed to read: Invalid argument. [08/07/13 08:57:59] Failed to chunk file with CDC. [08/07/13 08:57:59] Failed to index file C:\cloud\progetti/00/00/11/Analisi/rev03/6.2.1_d/Analysis1.CATAnalysis. [08/07/13 08:58:00] CDC: failed to read: Invalid argument. [08/07/13 08:58:00] Failed to chunk file with CDC. [08/07/13 08:58:00] Failed to index file C:\cloud\progetti/00/00/11/Analisi/rev03/6.2.1_e/Analysis1.CATAnalysis. [08/07/13 08:58:00] CDC: failed to read: Invalid argument. [08/07/13 08:58:00] Failed to chunk file with CDC. [08/07/13 08:58:00] Failed to index file C:\cloud\progetti/00/00/11/Analisi/rev03/A.2/Analysis1.CATAnalysis. [08/07/13 08:58:02] CDC: failed to read: Invalid argument. [08/07/13 08:58:02] Failed to chunk file with CDC. [08/07/13 08:58:02] Failed to index file C:\cloud\progetti/00/01/04/Analisi/001/Analysis1.CATAnalysis. [08/07/13 08:58:03] CDC: failed to read: Invalid argument. [08/07/13 08:58:03] Failed to chunk file with CDC. [08/07/13 08:58:03] Failed to index file C:\cloud\progetti/00/01/04/Analisi/001/z/Manu-rev08-Studio 1.NOD. [08/07/13 08:58:04] CDC: failed to read: Invalid argument. [08/07/13 08:58:04] Failed to chunk file with CDC. [08/07/13 08:58:04] Failed to index file C:\cloud\progetti/00/01/22/3D/ana-01/Analysis1.CATAnalysis. [08/07/13 08:58:05] CDC: failed to read: Invalid argument. [08/07/13 08:58:05] Failed to chunk file with CDC. [08/07/13 08:58:05] Failed to index file C:\cloud\progetti/00/01/22/3D/ana-02/Analysis1.CATAnalysis. [08/07/13 08:58:05] CDC: failed to read: Invalid argument. [08/07/13 08:58:05] Failed to chunk file with CDC. [08/07/13 08:58:05] Failed to index file C:\cloud\progetti/00/01/22/3D/ana-03/Analysis1.CATAnalysis. [08/07/13 08:58:10] Worktree changes (at most 5 files are shown): [08/07/13 08:58:10] Cannot find diff entry 00/01/22/3D/ana-03/Analysis1.CATAnalysis in index. [08/07/13 08:58:10] Cannot find diff entry 00/01/22/3D/ana-02/Analysis1.CATAnalysis in index. [08/07/13 08:58:10] Cannot find diff entry 00/01/22/3D/ana-01/Analysis1.CATAnalysis in index. [08/07/13 08:58:10] Cannot find diff entry 00/01/04/Analisi/001/z/Manu-rev08-Studio 1.NOD in index. [08/07/13 08:58:10] Cannot find diff entry 00/01/04/Analisi/001/Analysis1.CATAnalysis in index. [08/07/13 08:58:10] sync-mgr.c(597): Worktree is still dirty after commit. [08/07/13 08:58:10] sync-mgr.c(624): [sync mgr] Worktree is not clean. Skip merging repo progetti(1ab6b0a9).


Regards Giovanni

killing commented 11 years ago

This problem is not related to empty folders. Are there anything unusual with the files marked as "Failed to index"?

bigio commented 11 years ago

Nothing strange, if I try to unsync/resync the problem disappear for a while, then I add some other files to the library and, after some time (I just add some Gb of datas) the problem comes back again. The error "CDC: failed to read: Invalid argument" seems to come from readn in lib/utils.c if I am not wrong.

bigio commented 11 years ago

I verified that those files are not committed to the seafile server, how can I check what could be wrong with those files ?

killing commented 11 years ago

Is there any program accessing those files? They may be locked. If you add some other files into that library, are they failing to index too?

bigio commented 11 years ago

After adding those files (they are about 600Mb each) the worktree is in dirty state and the sync does not work anymore until I unsync/sync. Those files are not committed to the server so when I resync the library they are deleted from my local copy as well.

bigio commented 11 years ago

I also tried with another Windows client but the result is the same.

killing commented 11 years ago

What if you create another library and put one of those files into it? Does it fail too?

bigio commented 11 years ago

Yes it fails the same way on seafile.log. On the client the state is syncronized even if it does not upload anything on the server (it fails on indexing phase).

killing commented 11 years ago

It seems the specific file triggers some bug in the indexing code. What if you just add some other file (not similar to the problematic one) to the new library?

bigio commented 11 years ago

Other files are correctly sinchronized. The problematic file is linked with 2 other files (they are needed to be able to open the file), on the server I have only 2 files, the problematic file is skipped by the indexing code.

killing commented 11 years ago

Is the problematic file very large? If not, can you send it to me for debugging? Otherwise I have to add some debug message and build a debug package for you.

bigio commented 11 years ago

The problematic file is 600Mb large, I can send you a link to download it. I will send it as soon as possible. Giovanni -- msg. originale -- Oggetto: Re: [seafile] Error "Failed to merge local file changes" (#312) Da: Jiaqiang Xu notifications@github.com Data: 08/08/2013 15:52

Is the problematic file very large? If not, can you send it to me for debugging? Otherwise I have to add some debug message and build a debug package for you.


Reply to this email directly or view it on GitHub: https://github.com/haiwen/seafile/issues/312#issuecomment-22324720

killing commented 11 years ago

Can you also send me your complete seafile.log so that I can see the complete operation sequence?

killing commented 11 years ago

With your help, I've fixed this bug. It's a bug in the indexing code. Thanks for reporting.