You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by John Jones <jo...@managingwork.com> on 2009/08/12 09:33:17 UTC
SVN 1.5.3 and possible data loss
I have recently joined a project where a developer has appeared to
overwrite a prior release, resulting in lost data. It *appears* to
have happened twice, and had significant impact which is enough to
cause management to question the integrity of svn. Having been a user
and a pm on a number of projects using svn I cannot remember ever
seeing or experiencing anything like it.
The lost data is in a large file, with lots of chang history, where
two developers were working concurrently but in non overlapping areas.
Each developer's work flow for the commits involved indicates no
reason to be working in the affected areas. ie a no conflicts were
likely. But looking directly at the two commits it does look like the
second developer didn't update but still was able to commit his file
without the previous changes being merged. Both times the data loss
occurred when the same developer committed and appeared to overwrite
the previous commit. In tests we have not been able to replicate the
problem.
The only smoking gun we can find is the developer in question joined
the company five days after SVN 1.5.3 was released, installed this on
his Mac and has been using it all along. Looking more closely at the
releases we noticed 1.5.3 was pulled/quickly replaced with 1.5.4. The
repo is running 1.4.6 and every other developer is running a different
client version.
So the looming question for us is: Have we really found the smoking
gun in 1.5.3? Can anyone advise us about the buggy nature of 1.5.3 and
its potential to create the outcome described?
Many Thanks
John
---------------------------------
John Jones
UK: (+44) (0)797 644-3043
"Ideas are like rabbits. You get a couple and learn how to handle
them, and pretty soon you have a dozen."
John Steinbeck
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2382839
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: SVN 1.5.3 and possible data loss_52591
Posted by Andrew Lucas <an...@l-3com.com>.
This might be a red herring as I haven't done any controlled test cases, but I noticed that one has to be very careful about copying / mixing the .svn hidden folder trees. If you have a user that copies the .svn folders from place to place, maybe they are grabbing old copies and mixing them into the current tree?
Say you update your tree, then copy parts of an old .svn tree on top of it. You've just corrupted your .svn tree. I'm not talking just the source files, but the hidden directories used by .svn for repository management and control. You might be confusing svn into thinking the file was updated when it wasn't due to the overwrite.
Could one of your users be doing something like that by accident?
-----Original Message-----
From: john.jones.sk6@gmail.com [mailto:john.jones.sk6@gmail.com] On Behalf Of John Jones
Sent: Thursday, August 13, 2009 6:44 AM
To: users@subversion.tigris.org
Subject: Re: SVN 1.5.3 and possible data loss_52591
Hi,
Thank you everyone who replied to this enquiry. Lots of interesting
points. And no smoke indicating 1.5.3 is the culprit.
The outside editor changes and overwrites we covered in our review of
work flow and it didn't come up as the culprit. Plus, the culture
here is not one of blame and shame so I have no reason to believe this
took place.
Merge is not an issue either, we have a single trunk, so unless there
is some common code that is used in updating a file that is wonky it
is hard to make a connection.
Sometimes these things remain a mystery.
John
---------------------------------
John Jones
UK: (+44) (0)797 644-3043
"Ideas are like rabbits. You get a couple and learn how to handle
them, and pretty soon you have a dozen."
John Steinbeck
On Wed, Aug 12, 2009 at 1:32 PM, Andy Levy<an...@gmail.com> wrote:
> On Wed, Aug 12, 2009 at 08:23, Vincent Lefevre<vi...@vinc17.org> wrote:
>> On 2009-08-12 11:01:15 +0100, Stefan Sperling wrote:
>>> Yes. Editors that simply ignore and overwrite concurrent file
>>> modifications made by other tools (such as Subversion) are no fun.
>>> So make sure your developers are using editors that handle this
>>> gracefully, or have them exit their editor before running svn update.
>>
>> Yes, but this isn't sufficient. I suspect that some users do
>> the following:
>> 1. Copy the file somewhere else (e.g. on a USB key).
>> 2. Do some "off-line" editing. And when they come back:
>> 3. Do "svn up".
>> 4. Copy the edited file to the working copy (with "cp").
>>
>> (Now I wonder whether a Subversion aware "cp" should be provided,
>> to warn the user against possible damage if the destination is a
>> versioned file.)
>
> But what guarantees that the user will use this version?
>
> There's only so far any software can go in protecting the user from
> himself. At some point, the user has to be held accountable for the
> commands he issues & workflow he uses.
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2383629
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN 1.5.3 and possible data loss
Posted by John Jones <jo...@managingwork.com>.
Hi,
Thank you everyone who replied to this enquiry. Lots of interesting
points. And no smoke indicating 1.5.3 is the culprit.
The outside editor changes and overwrites we covered in our review of
work flow and it didn't come up as the culprit. Plus, the culture
here is not one of blame and shame so I have no reason to believe this
took place.
Merge is not an issue either, we have a single trunk, so unless there
is some common code that is used in updating a file that is wonky it
is hard to make a connection.
Sometimes these things remain a mystery.
John
---------------------------------
John Jones
UK: (+44) (0)797 644-3043
"Ideas are like rabbits. You get a couple and learn how to handle
them, and pretty soon you have a dozen."
John Steinbeck
On Wed, Aug 12, 2009 at 1:32 PM, Andy Levy<an...@gmail.com> wrote:
> On Wed, Aug 12, 2009 at 08:23, Vincent Lefevre<vi...@vinc17.org> wrote:
>> On 2009-08-12 11:01:15 +0100, Stefan Sperling wrote:
>>> Yes. Editors that simply ignore and overwrite concurrent file
>>> modifications made by other tools (such as Subversion) are no fun.
>>> So make sure your developers are using editors that handle this
>>> gracefully, or have them exit their editor before running svn update.
>>
>> Yes, but this isn't sufficient. I suspect that some users do
>> the following:
>> 1. Copy the file somewhere else (e.g. on a USB key).
>> 2. Do some "off-line" editing. And when they come back:
>> 3. Do "svn up".
>> 4. Copy the edited file to the working copy (with "cp").
>>
>> (Now I wonder whether a Subversion aware "cp" should be provided,
>> to warn the user against possible damage if the destination is a
>> versioned file.)
>
> But what guarantees that the user will use this version?
>
> There's only so far any software can go in protecting the user from
> himself. At some point, the user has to be held accountable for the
> commands he issues & workflow he uses.
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2383248
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN 1.5.3 and possible data loss
Posted by Vincent Lefevre <vi...@vinc17.org>.
On 2009-08-12 08:32:59 -0400, Andy Levy wrote:
> On Wed, Aug 12, 2009 at 08:23, Vincent Lefevre<vi...@vinc17.org> wrote:
> > Yes, but this isn't sufficient. I suspect that some users do
> > the following:
> > 1. Copy the file somewhere else (e.g. on a USB key).
> > 2. Do some "off-line" editing. And when they come back:
> > 3. Do "svn up".
> > 4. Copy the edited file to the working copy (with "cp").
> >
> > (Now I wonder whether a Subversion aware "cp" should be provided,
> > to warn the user against possible damage if the destination is a
> > versioned file.)
>
> But what guarantees that the user will use this version?
Nothing of course. But it can be useful for a user who knows that
he repeatedly does such things. The sysadmin can also install this
version under some conditions (e.g. an alias in the default .*rc).
--
Vincent Lefèvre <vi...@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2382940
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN 1.5.3 and possible data loss
Posted by Andy Levy <an...@gmail.com>.
On Wed, Aug 12, 2009 at 08:23, Vincent Lefevre<vi...@vinc17.org> wrote:
> On 2009-08-12 11:01:15 +0100, Stefan Sperling wrote:
>> Yes. Editors that simply ignore and overwrite concurrent file
>> modifications made by other tools (such as Subversion) are no fun.
>> So make sure your developers are using editors that handle this
>> gracefully, or have them exit their editor before running svn update.
>
> Yes, but this isn't sufficient. I suspect that some users do
> the following:
> 1. Copy the file somewhere else (e.g. on a USB key).
> 2. Do some "off-line" editing. And when they come back:
> 3. Do "svn up".
> 4. Copy the edited file to the working copy (with "cp").
>
> (Now I wonder whether a Subversion aware "cp" should be provided,
> to warn the user against possible damage if the destination is a
> versioned file.)
But what guarantees that the user will use this version?
There's only so far any software can go in protecting the user from
himself. At some point, the user has to be held accountable for the
commands he issues & workflow he uses.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2382879
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN 1.5.3 and possible data loss
Posted by Vincent Lefevre <vi...@vinc17.org>.
On 2009-08-12 11:01:15 +0100, Stefan Sperling wrote:
> Yes. Editors that simply ignore and overwrite concurrent file
> modifications made by other tools (such as Subversion) are no fun.
> So make sure your developers are using editors that handle this
> gracefully, or have them exit their editor before running svn update.
Yes, but this isn't sufficient. I suspect that some users do
the following:
1. Copy the file somewhere else (e.g. on a USB key).
2. Do some "off-line" editing. And when they come back:
3. Do "svn up".
4. Copy the edited file to the working copy (with "cp").
(Now I wonder whether a Subversion aware "cp" should be provided,
to warn the user against possible damage if the destination is a
versioned file.)
> As an additional safety net, your developers should make a habit
> of looking at the diffs they are about to commit and make sure
> the diff *really* contains only their own modifications. This is
> good practice anyway for additional reasons. For example, there
> may be an unrelated edit in the working copy still lying around
> from last week which might be committed unnoticed. Also, checking
> the diff often makes small errors such as indentation problems more
> easily visible than when looking at the entire file.
I agree!
--
Vincent Lefèvre <vi...@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2382875
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN 1.5.3 and possible data loss
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Aug 12, 2009 at 11:50:15AM +0200, Peter Herth wrote:
> Hi John,
>
> I cannot say anything about the svn version you are using, but I encountered
> such a data loss once with CVS and identified the developer in my case as the
> culprit. The problem was, that the corresponding person was moving the file
> around on his computer. So he did updates from the repository, and
> then overwrote
> the file with "his" version, and such killing all edits by others not
> contained in "his"
> version and then committed it. The same behavior would happen, if you
> have unsaved
> modifications of a file while updating, and then saving the file... So
> you should make
> sure that this is not an user issue.
Yes. Editors that simply ignore and overwrite concurrent file
modifications made by other tools (such as Subversion) are no fun.
So make sure your developers are using editors that handle this
gracefully, or have them exit their editor before running svn update.
As an additional safety net, your developers should make a habit
of looking at the diffs they are about to commit and make sure
the diff *really* contains only their own modifications. This is
good practice anyway for additional reasons. For example, there
may be an unrelated edit in the working copy still lying around
from last week which might be committed unnoticed. Also, checking
the diff often makes small errors such as indentation problems more
easily visible than when looking at the entire file.
Stefan
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2382844
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN 1.5.3 and possible data loss
Posted by Peter Herth <p....@gmail.com>.
Hi John,
I cannot say anything about the svn version you are using, but I encountered
such a data loss once with CVS and identified the developer in my case as the
culprit. The problem was, that the corresponding person was moving the file
around on his computer. So he did updates from the repository, and
then overwrote
the file with "his" version, and such killing all edits by others not
contained in "his"
version and then committed it. The same behavior would happen, if you
have unsaved
modifications of a file while updating, and then saving the file... So
you should make
sure that this is not an user issue.
Peter
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2382841
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN 1.5.3 and possible data loss
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
John Jones wrote on Wed, 12 Aug 2009 at 10:33 +0100:
> So the looming question for us is: Have we really found the smoking
> gun in 1.5.3? Can anyone advise us about the buggy nature of 1.5.3 and
> its potential to create the outcome described?
The only changes between 1.5.3->1.5.4 (per the CHANGES file in the
source tree) are related to mergeinfo. If one of them had a bug in the
area of allowing an in-fact-out-of-date commit (instead of throwing 'out
of date' error), then the other should have it too.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2382843
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].