You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2008/12/26 13:16:16 UTC
Re: broken lock test
Brieuc Jeunhomme wrote on Fri, 28 Nov 2008 at 17:41 +0100:
>
> Hi,
>
> I have found something that looks to me like a bug, although I don't
> know how I came to this situation. I have more detail about the problem
> if needed, I can fill a bug report with all of it if it's confirmed it
> is a bug.
>
>
>
> I am the only one using the svn repository, on a remote server
> (svn+ssh://...). I am using 1.5.4. The symptoms are the following: I
> try to do an update, svn complains about a lock and suggests a cleanup.
> I perform a cleanup, and try to update again, without any success.
>
>
> % svn update
>
> Fetching external item into 'specs'
> svn: Working copy 'specs' locked
> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
> details)
> % ./build-subversion-1.5.4/bin/svn cleanup
> % ./build-subversion-1.5.4/bin/svn update
>
> Fetching external item into 'specs'
> svn: Working copy 'specs' locked
> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
> details)
>
Yes, that's obviously a bug --- especially if you can reproduce it with
a new checkout (i.e., it's not something gone broken in that specific
working copy).
Can you show us how to reproduce this bug, starting with a new
repository? If possible, package the instructions as a script (e.g.,
http://svn.tigris.org/repro-template.sh). Thanks.
>
>
> I am not that familiar with the svn unlock command, however, I have done
'svn unlock' has nothing to do with the lock files. (There's a sidebar
in the svnbook explaining the differences.)
> a couple of tests with strace and some scripts to process the strace
> results, and, if I do strace svn update and remove all the irrelevant
> garbage, I can see that the following happens during the svn update
> execution:
>
> open("specs/.svn/lock", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0666) = 3
> close(3) = 0
> open("specs/.svn/lock", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0666) = -1
> EEXIST (File exists)
> write(2, "svn: run \'svn cleanup\' to remove locks (type \'svn help
> cleanup\' for details)\n", 77) = 77
> unlink("specs/.svn/lock") = 0
>
>
> So, svn creates specs/.svn/lock, then, tries to create it again, fails
> because it already exists, complains about it, deletes it, and exits.
> This is the reason why I am pretty sure it is a bug: it complains about
> the existence of a file it just created.
>
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=992921
Re: broken lock test
Posted by Blair Zajac <bl...@orcaware.com>.
On Jan 26, 2009, at 10:18 PM, Daniel Shahaf wrote:
> Blair Zajac wrote on Mon, 26 Jan 2009 at 19:19 -0800:
>>
>> On Dec 26, 2008, at 5:16 AM, Daniel Shahaf wrote:
>>
>>> Brieuc Jeunhomme wrote on Fri, 28 Nov 2008 at 17:41 +0100:
>>>>
>>>> Hi,
>>>>
>>>> I have found something that looks to me like a bug, although I
>>>> don't
>>>> know how I came to this situation. I have more detail about the
>>>> problem
>>>> if needed, I can fill a bug report with all of it if it's
>>>> confirmed it
>>>> is a bug.
>>>>
>>>>
>>>>
>>>> I am the only one using the svn repository, on a remote server
>>>> (svn+ssh://...). I am using 1.5.4. The symptoms are the
>>>> following: I
>>>> try to do an update, svn complains about a lock and suggests a
>>>> cleanup.
>>>> I perform a cleanup, and try to update again, without any success.
>>>>
>>>>
>>>> % svn update
>>>>
>>>> Fetching external item into 'specs'
>>>> svn: Working copy 'specs' locked
>>>> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
>>>> details)
>>>> % ./build-subversion-1.5.4/bin/svn cleanup
>>>> % ./build-subversion-1.5.4/bin/svn update
>>>>
>>>> Fetching external item into 'specs'
>>>> svn: Working copy 'specs' locked
>>>> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
>>>> details)
>>>>
>>>
>>> Yes, that's obviously a bug --- especially if you can reproduce it
>>> with
>>> a new checkout (i.e., it's not something gone broken in that
>>> specific
>>> working copy).
>>>
>>> Can you show us how to reproduce this bug, starting with a new
>>> repository? If possible, package the instructions as a script
>>> (e.g.,
>>> http://svn.tigris.org/repro-template.sh). Thanks.
>>
>> Fyi, Brieuc opened a ticket on this
>>
>> http://subversion.tigris.org/issues/show_bug.cgi?id=3363
>>
>> which I closed without seeing this the link back to this thread.
>>
>> There's two separate issues. One that doing potentially multiple
>> control-C's
>> to svn can leave the working copy in a locked state. The code
>> currently
>> catches signals and does the best job to clean up the wc and leave
>> it in a
>> good state, but you can always kill -9 or potentially send enough
>> control-C's
>> to kill it and leave the wc in a locked state.
>>
>
> Well, sure, if you do 'kill -9', the wc will remain locked. But I
> don't
> think Brieuc said (in the email) that he did used either that or
> ^C. So
> I assumed no signals were involved.
No, in the email he didn't say any signals were used. In the ticket
that was stated.
Blair
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1057949
Re: broken lock test
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Blair Zajac wrote on Mon, 26 Jan 2009 at 19:19 -0800:
>
> On Dec 26, 2008, at 5:16 AM, Daniel Shahaf wrote:
>
> > Brieuc Jeunhomme wrote on Fri, 28 Nov 2008 at 17:41 +0100:
> > >
> > > Hi,
> > >
> > > I have found something that looks to me like a bug, although I don't
> > > know how I came to this situation. I have more detail about the problem
> > > if needed, I can fill a bug report with all of it if it's confirmed it
> > > is a bug.
> > >
> > >
> > >
> > > I am the only one using the svn repository, on a remote server
> > > (svn+ssh://...). I am using 1.5.4. The symptoms are the following: I
> > > try to do an update, svn complains about a lock and suggests a cleanup.
> > > I perform a cleanup, and try to update again, without any success.
> > >
> > >
> > > % svn update
> > >
> > > Fetching external item into 'specs'
> > > svn: Working copy 'specs' locked
> > > svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
> > > details)
> > > % ./build-subversion-1.5.4/bin/svn cleanup
> > > % ./build-subversion-1.5.4/bin/svn update
> > >
> > > Fetching external item into 'specs'
> > > svn: Working copy 'specs' locked
> > > svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
> > > details)
> > >
> >
> > Yes, that's obviously a bug --- especially if you can reproduce it with
> > a new checkout (i.e., it's not something gone broken in that specific
> > working copy).
> >
> > Can you show us how to reproduce this bug, starting with a new
> > repository? If possible, package the instructions as a script (e.g.,
> > http://svn.tigris.org/repro-template.sh). Thanks.
>
> Fyi, Brieuc opened a ticket on this
>
> http://subversion.tigris.org/issues/show_bug.cgi?id=3363
>
> which I closed without seeing this the link back to this thread.
>
> There's two separate issues. One that doing potentially multiple control-C's
> to svn can leave the working copy in a locked state. The code currently
> catches signals and does the best job to clean up the wc and leave it in a
> good state, but you can always kill -9 or potentially send enough control-C's
> to kill it and leave the wc in a locked state.
>
Well, sure, if you do 'kill -9', the wc will remain locked. But I don't
think Brieuc said (in the email) that he did used either that or ^C. So
I assumed no signals were involved.
> The other issue is that svn cleanup could be improved to descend into
> svn:externals and also clean those up.
>
Agreed.
Daniel
> So I don't see a bug here, only potentially an improvement to svn cleanup.
>
> Regards,
> Blair
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1057760
Re: 'svn cleanup' upgrades?
Posted by Greg Stein <gs...@gmail.com>.
On Tue, Jan 27, 2009 at 19:51, Hyrum K. Wright
<hy...@mail.utexas.edu> wrote:
> Daniel Shahaf wrote:
>> Hyrum K. Wright wrote on Tue, 27 Jan 2009 at 08:28 -0600:
>>> Blair Zajac wrote:
>>>> So I don't see a bug here, only potentially an improvement to svn cleanup.
>>> 'svn cleanup' will be the method by which pre-1.7 working copies are upgraded
>>> to the new wc-ng format.
>>
>> Not the most intuitive UI.
It should be clear enough to the user:
$ svn st
ERROR: you're running against an old working copy. please run "svn
cleanup" to upgrade to the latest working copy format. Note: this may
take time depending upon the size of your working copy.
$ svn cleanup
....
Or something along those lines.
> Pre-1.7 working copies are a big mess, so 'svn cleanup' actually makes sense.
>
> Seriously, though, the upgrade from 1.6 to 1.7 will need to be explicit, due to
> the large amount of data moving, spanning potentially large directory
> hierarchies. Using 'cleanup' make sense, since part of the upgrade will be to
> run any existing logs, then migrate the data to the new format.
>
>> Also, I'm assuming 1.7 isn't going to be able to support *writing* 1.6-era
>> wc's? (Because if it would, we shouldn't shadow the 'cleanup'
>> functionality, IMO...)
>
> Correct. We're still debating it, but I think in order to do *anything*, read
> or write, with a 1.7 client, you'll need to upgrade. No sitting on the fence
> this time. :)
Yeah. The internal design model for the code is going to be
drastically different. It will be pretty difficult for svn to
on-the-fly map from the old model to the new, and "pretend" that the
higher-level code is looking at a new-style working copy.
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1059952
Re: 'svn cleanup' upgrades?
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Greg Stein wrote:
> On Tue, Jan 27, 2009 at 20:06, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
>> ...
>>> Using 'cleanup' make sense, since part of the upgrade will be
>>> to run any existing logs, then migrate the data to the new format.
>> Sure, that's the implementation. But I'm talking about the UI. And
>> all I said was that IMO
>>
>> "Use 'svn cleanup' to upgrade your working copy"
>>
>> might be considered confusing.
>
> "Your working copy is OLD CRAP. Use 'svn cleanup' to clean it up. kthxbai."
ah, much clearer...
-Hyrum
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1059959
Re: 'svn cleanup' upgrades?
Posted by Greg Stein <gs...@gmail.com>.
On Tue, Jan 27, 2009 at 20:06, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
>...
>> Using 'cleanup' make sense, since part of the upgrade will be
>> to run any existing logs, then migrate the data to the new format.
>
> Sure, that's the implementation. But I'm talking about the UI. And
> all I said was that IMO
>
> "Use 'svn cleanup' to upgrade your working copy"
>
> might be considered confusing.
"Your working copy is OLD CRAP. Use 'svn cleanup' to clean it up. kthxbai."
:-)
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1059955
Re: 'svn cleanup' upgrades?
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Hyrum K. Wright wrote on Tue, 27 Jan 2009 at 12:51 -0600:
> Daniel Shahaf wrote:
> > Hyrum K. Wright wrote on Tue, 27 Jan 2009 at 08:28 -0600:
> > > Blair Zajac wrote:
> > > > So I don't see a bug here, only potentially an improvement to svn
> > > > cleanup.
> > > 'svn cleanup' will be the method by which pre-1.7 working copies
> > > are upgraded to the new wc-ng format.
> >
> > Not the most intuitive UI.
>
> Pre-1.7 working copies are a big mess, so 'svn cleanup' actually makes
> sense.
>
> Seriously, though, the upgrade from 1.6 to 1.7 will need to be explicit, due
> to the large amount of data moving, spanning potentially large directory
> hierarchies.
*nod*
> Using 'cleanup' make sense, since part of the upgrade will be
> to run any existing logs, then migrate the data to the new format.
>
Sure, that's the implementation. But I'm talking about the UI. And
all I said was that IMO
"Use 'svn cleanup' to upgrade your working copy"
might be considered confusing.
#53356f :(
> > Also, I'm assuming 1.7 isn't going to be able to support *writing* 1.6-era
> > wc's? (Because if it would, we shouldn't shadow the 'cleanup'
> > functionality, IMO...)
>
> Correct. We're still debating it, but I think in order to do *anything*,
> read or write, with a 1.7 client, you'll need to upgrade. No sitting on the
> fence this time. :)
>
Okay.
Daniel
> -Hyrum
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1059944
Re: 'svn cleanup' upgrades?
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Daniel Shahaf wrote:
> Hyrum K. Wright wrote on Tue, 27 Jan 2009 at 08:28 -0600:
>> Blair Zajac wrote:
>>> So I don't see a bug here, only potentially an improvement to svn cleanup.
>> 'svn cleanup' will be the method by which pre-1.7 working copies are upgraded
>> to the new wc-ng format.
>
> Not the most intuitive UI.
Pre-1.7 working copies are a big mess, so 'svn cleanup' actually makes sense.
Seriously, though, the upgrade from 1.6 to 1.7 will need to be explicit, due to
the large amount of data moving, spanning potentially large directory
hierarchies. Using 'cleanup' make sense, since part of the upgrade will be to
run any existing logs, then migrate the data to the new format.
> Also, I'm assuming 1.7 isn't going to be able to support *writing* 1.6-era
> wc's? (Because if it would, we shouldn't shadow the 'cleanup'
> functionality, IMO...)
Correct. We're still debating it, but I think in order to do *anything*, read
or write, with a 1.7 client, you'll need to upgrade. No sitting on the fence
this time. :)
-Hyrum
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1059880
'svn cleanup' upgrades? (was: Re: broken lock test)
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Hyrum K. Wright wrote on Tue, 27 Jan 2009 at 08:28 -0600:
> Blair Zajac wrote:
> > So I don't see a bug here, only potentially an improvement to svn cleanup.
>
> 'svn cleanup' will be the method by which pre-1.7 working copies are upgraded
> to the new wc-ng format.
Not the most intuitive UI.
Also, I'm assuming 1.7 isn't going to be able to support *writing* 1.6-era
wc's? (Because if it would, we shouldn't shadow the 'cleanup'
functionality, IMO...)
Daniel
> As such, there will be a lot of code churn in it,
> and due to the journal and logging capabilities of sqlite, possibly a bit of
> code reduction.
>
> In other words, let's wait a bit and see if the problem still manifests
> itself.
>
> -Hyrum
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1059766
Re: broken lock test
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Blair Zajac wrote:
> On Dec 26, 2008, at 5:16 AM, Daniel Shahaf wrote:
>
>> Brieuc Jeunhomme wrote on Fri, 28 Nov 2008 at 17:41 +0100:
>>> Hi,
>>>
>>> I have found something that looks to me like a bug, although I don't
>>> know how I came to this situation. I have more detail about the
>>> problem
>>> if needed, I can fill a bug report with all of it if it's confirmed
>>> it
>>> is a bug.
>>>
>>>
>>>
>>> I am the only one using the svn repository, on a remote server
>>> (svn+ssh://...). I am using 1.5.4. The symptoms are the following: I
>>> try to do an update, svn complains about a lock and suggests a
>>> cleanup.
>>> I perform a cleanup, and try to update again, without any success.
>>>
>>>
>>> % svn update
>>>
>>> Fetching external item into 'specs'
>>> svn: Working copy 'specs' locked
>>> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
>>> details)
>>> % ./build-subversion-1.5.4/bin/svn cleanup
>>> % ./build-subversion-1.5.4/bin/svn update
>>>
>>> Fetching external item into 'specs'
>>> svn: Working copy 'specs' locked
>>> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
>>> details)
>>>
>> Yes, that's obviously a bug --- especially if you can reproduce it
>> with
>> a new checkout (i.e., it's not something gone broken in that specific
>> working copy).
>>
>> Can you show us how to reproduce this bug, starting with a new
>> repository? If possible, package the instructions as a script (e.g.,
>> http://svn.tigris.org/repro-template.sh). Thanks.
>
> Fyi, Brieuc opened a ticket on this
>
> http://subversion.tigris.org/issues/show_bug.cgi?id=3363
>
> which I closed without seeing this the link back to this thread.
>
> There's two separate issues. One that doing potentially multiple
> control-C's to svn can leave the working copy in a locked state. The
> code currently catches signals and does the best job to clean up the
> wc and leave it in a good state, but you can always kill -9 or
> potentially send enough control-C's to kill it and leave the wc in a
> locked state.
>
> The other issue is that svn cleanup could be improved to descend into
> svn:externals and also clean those up.
>
> So I don't see a bug here, only potentially an improvement to svn
> cleanup.
'svn cleanup' will be the method by which pre-1.7 working copies are upgraded to
the new wc-ng format. As such, there will be a lot of code churn in it, and due
to the journal and logging capabilities of sqlite, possibly a bit of code reduction.
In other words, let's wait a bit and see if the problem still manifests itself.
-Hyrum
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1059132
Re: broken lock test
Posted by Blair Zajac <bl...@orcaware.com>.
On Dec 26, 2008, at 5:16 AM, Daniel Shahaf wrote:
> Brieuc Jeunhomme wrote on Fri, 28 Nov 2008 at 17:41 +0100:
>>
>> Hi,
>>
>> I have found something that looks to me like a bug, although I don't
>> know how I came to this situation. I have more detail about the
>> problem
>> if needed, I can fill a bug report with all of it if it's confirmed
>> it
>> is a bug.
>>
>>
>>
>> I am the only one using the svn repository, on a remote server
>> (svn+ssh://...). I am using 1.5.4. The symptoms are the following: I
>> try to do an update, svn complains about a lock and suggests a
>> cleanup.
>> I perform a cleanup, and try to update again, without any success.
>>
>>
>> % svn update
>>
>> Fetching external item into 'specs'
>> svn: Working copy 'specs' locked
>> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
>> details)
>> % ./build-subversion-1.5.4/bin/svn cleanup
>> % ./build-subversion-1.5.4/bin/svn update
>>
>> Fetching external item into 'specs'
>> svn: Working copy 'specs' locked
>> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
>> details)
>>
>
> Yes, that's obviously a bug --- especially if you can reproduce it
> with
> a new checkout (i.e., it's not something gone broken in that specific
> working copy).
>
> Can you show us how to reproduce this bug, starting with a new
> repository? If possible, package the instructions as a script (e.g.,
> http://svn.tigris.org/repro-template.sh). Thanks.
Fyi, Brieuc opened a ticket on this
http://subversion.tigris.org/issues/show_bug.cgi?id=3363
which I closed without seeing this the link back to this thread.
There's two separate issues. One that doing potentially multiple
control-C's to svn can leave the working copy in a locked state. The
code currently catches signals and does the best job to clean up the
wc and leave it in a good state, but you can always kill -9 or
potentially send enough control-C's to kill it and leave the wc in a
locked state.
The other issue is that svn cleanup could be improved to descend into
svn:externals and also clean those up.
So I don't see a bug here, only potentially an improvement to svn
cleanup.
Regards,
Blair
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1057051