Bug 31578 - CVS Entries file gets corrupted during Synchronize
Summary: CVS Entries file gets corrupted during Synchronize
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC3   Edit
Assignee: Jean-Michel Lemieux CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
: 35118 37251 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-02-11 14:22 EST by Brian Deng CLA
Modified: 2003-05-06 10:28 EDT (History)
4 users (show)

See Also:


Attachments
Two examples of corrupted and fixed Entries files (4.24 KB, application/x-zip-compressed)
2003-02-12 11:56 EST, Brian Deng CLA
no flags Details
Another example of a corrupted Entries file (1.00 KB, application/x-zip-compressed)
2003-02-13 09:56 EST, Brian Deng CLA
no flags Details
.syncinfo file from corrupted workspace (15.96 KB, application/octet-stream)
2003-03-11 15:39 EST, Brian Deng CLA
no flags Details
This is a .syncinfo from the same project (after a clean checkout) (73.54 KB, application/octet-stream)
2003-03-11 15:41 EST, Brian Deng CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Deng CLA 2003-02-11 14:22:20 EST
After running 'Team>Synchronize With Repository' I occasionally receive the 
message 'Malformed entry line'. The Entries file in question contains 4 null 
bytes followed by a CRLF. The only way to recover from this is to manually fix 
the bad Entries file. I haven't figured out a repeatable pattern yet, but it's 
happened twice now.

The following shows up in my .log file:

org.eclipse.team.internal.ccvs.core.CVSException: Malformed entry line: 
	at 
org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo.setEntryLine
(ResourceSyncInfo.java:391)

	at org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo.<init>
(ResourceSyncInfo.java:107)

	at 
org.eclipse.team.internal.ccvs.core.util.SyncFileWriter.readAllResourceSync
(SyncFileWriter.java:104)

	at 
org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.cacheResourceS
yncForChildren(EclipseSynchronizer.java:663)

	at 
org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.getSyncBytes
(EclipseSynchronizer.java:227)

	at 
org.eclipse.team.internal.ccvs.core.resources.EclipseResource.getSyncBytes
(EclipseResource.java:227)

	at 
org.eclipse.team.internal.ccvs.core.resources.EclipseResource.isManaged
(EclipseResource.java:186)

	at 
org.eclipse.team.internal.ccvs.core.resources.EclipseResource.isIgnored
(EclipseResource.java:116)

	at 
org.eclipse.team.internal.ccvs.core.resources.EclipseFile.handleModification
(EclipseFile.java:517)

	at 
org.eclipse.team.internal.ccvs.core.resources.FileModificationManager.contentsCh
anged(FileModificationManager.java:152)

	at 
org.eclipse.team.internal.ccvs.core.resources.FileModificationManager$1.visit
(FileModificationManager.java:68)

	at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:71)

	at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)

	at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)

	at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)

	at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)

	at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)

	at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)

	at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)

	at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)

	at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)

	at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:52)

	at 
org.eclipse.team.internal.ccvs.core.resources.FileModificationManager.resourceCh
anged(FileModificationManager.java:53)

	at org.eclipse.core.internal.events.NotificationManager$1.run
(NotificationManager.java:137)

	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:867)

	at org.eclipse.core.runtime.Platform.run(Platform.java:413)

	at org.eclipse.core.internal.events.NotificationManager.notify
(NotificationManager.java:152)

	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges
(NotificationManager.java:67)

	at org.eclipse.core.internal.resources.Workspace.broadcastChanges
(Workspace.java:161)

	at org.eclipse.core.internal.resources.Workspace.endOperation
(Workspace.java:892)

	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1593)

	at org.eclipse.ui.actions.WorkspaceModifyOperation.run
(WorkspaceModifyOperation.java:79)

	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:95)
Comment 1 Olivier Thomann CLA 2003-02-11 16:32:12 EST
Move to Platform/VCM.
Comment 2 Kevin McGuire CLA 2003-02-11 17:56:24 EST
Please provide:
- eclipse build #
- CVS server type and #
Comment 3 Brian Deng CLA 2003-02-11 18:07:26 EST
This started happening after I installed the M5 build of Eclipse.
Earlier builds of Eclipse did not exhibit the problem.

The CVS server is version 1.11 running on Solaris 2.8:

> bdeng@palomar [2] [3:02pm] [~] >uname -a
> SunOS palomar 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-80
> bdeng@palomar [1] [3:02pm] [~] >cvs --version
> Concurrent Versions System (CVS) 1.11 (client/server)
> 
> Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn,
>                         Jeff Polk, and other authors
> 
> CVS may be copied only under the terms of the GNU General Public License,
> a copy of which can be found with the CVS distribution kit.
> 
> Specify the --help option for further information about CVS
Comment 4 Kevin McGuire CLA 2003-02-11 18:56:04 EST
We'd prefer you run 1.11.1p1 (which, by the way, is of higher quality than 
1.11).

Nontheless, the fact its failing in ResourceSyncInfo.setEntryLine and started 
in M5 suggests its not the server version.
Comment 5 Jean-Michel Lemieux CLA 2003-02-12 11:03:02 EST
When fixing the entries file, are the malformed (e.g. corrupted) entry lines for
folders or files? Could you please provide the corrupted and fixed Entries file
that would help us a lot. Thanks.
Comment 6 Brian Deng CLA 2003-02-12 11:56:23 EST
Created attachment 3449 [details]
Two examples of corrupted and fixed Entries files
Comment 7 Brian Deng CLA 2003-02-12 11:58:22 EST
I've attached two different examples: one has a lot of binary files in the
CVS directory, the other has fewer files (all source files).
There doesn't seem to be a pattern to where the corruption occurs, but it
always seems to be 4 null bytes that get inserted.

I will upgrade our CVS server to 1.11.1p1 to see if it helps, but since
prior builds of Eclipse worked fine, I'm guessing that's not the problem.
Comment 8 Brian Deng CLA 2003-02-13 09:56:22 EST
Created attachment 3468 [details]
Another example of a corrupted Entries file

This is one more example. In this one, there's more than just the 4 null bytes.

It appears to be copying other values in the Entries file.

The pattern I'm noticing now is that the same directories get corrupted in the
same way whenever a file in that directory needs to be patched or updated. The
corruption of the Entries file occurs during the patch (when I select 'Update
from Repository' in the Synchronize view). I have upgraded the CVS server to
1.11.1p1 but the problem still occurs. I am using the pserver connection type
if that makes any difference.
Comment 9 Jean-Michel Lemieux CLA 2003-02-17 21:23:49 EST
Thanks for the files, I haven't had the chance to look into this yet. But I
promise that I'll spend some time this week. I find it strange that you are the
only one who has reported this?
Comment 10 Brian Deng CLA 2003-02-17 23:10:22 EST
I did see one posting today on the tools newsgroup. That person mentioned
this happened to him after Eclipse crashed, I don't believe that was the
case with me, but his posting did mention the same error message that
I'm seeing (Malformed entry line).
Comment 11 Lee Breisacher CLA 2003-03-03 09:23:26 EST
I've been seeing this too, since updating to M5. I have not noticed that it is 
related to any particular event - it seems to be happening at random. Quite a 
serious problem.
Comment 12 Chris Dennis CLA 2003-03-07 11:50:49 EST
After I upgraded from M4 to M5 (on Windows) I too have this problem. It always 
occurs in the same directory if an update or patch occurs. It is always the 
second last line and it is always 4 null chars.

I am now running RC1 and it still happens.

I am using ext.

Our cvs server is SunOS cvs 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-1 
version 1.11.
Comment 13 Kevin McGuire CLA 2003-03-07 16:26:14 EST
We'll need to do a code walkthrough I guess.
Comment 14 Michael Valenta CLA 2003-03-07 21:28:30 EST
What JVM(s) were you using when the problem occured?
Comment 15 Lee Breisacher CLA 2003-03-07 22:06:51 EST
I've been using 1.4.1_02. 
Comment 16 Chris Dennis CLA 2003-03-07 23:35:19 EST
Sun's 1.4.1_01
Comment 17 Brian Deng CLA 2003-03-07 23:51:12 EST
1.4.1_01. As a side note, After re-checking out the module I haven't yet 
experienced this problem again.
Comment 18 Jean-Michel Lemieux CLA 2003-03-11 15:19:42 EST
Could one of you please send us the .syncinfo files for the projects in which
the sync info in the Entries file is being corrupted. You can find these files
in <your workspace home>/.metadata/org.eclipse.core.resources/.projects/<project
name>. A hint of the directory in which the Entries file is corrupted would also
help.

Has anybody else tried what Brian has done, to delete the local project then
checkout the project from the repository again. Has this fixed the problem for
others too?

We haven't been able to reproduce and a code walkthrough hasn't revealed
anything that would cause this.
Comment 19 Brian Deng CLA 2003-03-11 15:39:56 EST
Created attachment 4015 [details]
.syncinfo file from corrupted workspace

Here's the .syncinfo from my corrupted workspace.
There were a few directories corrupted. One of which I remember was:
nProcess/server/common/src/com/nexprise/core/model

I will also upload the .syncinfo from my current workspace which is working OK.
Comment 20 Brian Deng CLA 2003-03-11 15:41:17 EST
Created attachment 4017 [details]
This is a .syncinfo from the same project (after a clean checkout)

This .syncinfo is from my current workspace which has no problems during
synchronize.
Comment 21 Lee Breisacher CLA 2003-03-11 15:42:01 EST
Well, I haven't seen the problem again recently. I don't recall exactly what I 
did to make it go away, but I must have tried delete-files followed by replace-
with-latest (or something similar). Shrug. Thanks for looking.
Comment 22 Jean-Michel Lemieux CLA 2003-03-11 16:33:40 EST
I've had a look at the .syncinfo files and they are indeed the cause of the
invalid Entry lines. During the development for 2.1 the CVS team has made
several changes to sync info storage that broke some workspaces. We really think
that this is now fixed. 

So far Brian and Lee have confirmed that there workspaces are now ok (e.g. as a
result of either a clean checkout or deleting the .syncinfo files).

Chris, can you please confirm that your have been able to fix your workspace?
Thanks.
Comment 23 Chris Dennis CLA 2003-03-11 16:57:37 EST
Once I tracked down which Entries file I just manually fixed it as required. 
There haven't been any changes to that part of our tree lately so I'm not sure 
if the problem is fixed.

Can I just delete the .syncinfo file?
Comment 24 Chris Dennis CLA 2003-03-11 17:07:59 EST
I just made a trivial change and the problem is still there.
Comment 25 Jean-Michel Lemieux CLA 2003-03-12 14:01:49 EST
yes, please delete the .syncinfo file then restart eclipse and re-checkout your
projects. 
Comment 26 Chris Dennis CLA 2003-03-12 14:04:52 EST
I deleted the .synchinfo file and rechecked out the project. Now the package in 
question is always marked as modifed (a > before the name). Not sure how to fix 
that. But no more nulls in the Entries file.
Comment 27 Chris Dennis CLA 2003-03-12 16:37:45 EST
I've managed to clear of the erraneous > markers.
Comment 28 Jean-Michel Lemieux CLA 2003-03-13 09:39:17 EST
Good news. I'm very confident that the corrupt Entries files was caused by
incompatible workspaces between 2.0 and 2.1. As for the dirty indicator, this
was resolved as part of bug 31806.
Thanks for your help guys. And please download RC3 when it is available to
double check that this problem has been fixed.
Comment 29 Jean-Michel Lemieux CLA 2003-03-17 09:20:12 EST
*** Bug 35118 has been marked as a duplicate of this bug. ***
Comment 30 Jean-Michel Lemieux CLA 2003-05-06 10:28:55 EDT
*** Bug 37251 has been marked as a duplicate of this bug. ***