You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Niklaus Giger <ng...@mus.ch> on 2002/10/07 15:35:01 UTC

svn has problems to add directory (Lock-problem?)

Hi, 

I managed again to lock the subversion repository. I do not recall all the 
steps I have done, but I access my files from a x86- and a ppc-machine. Once 
I got a error message from my powerbook about a stale NFS-handle.

I tried several things like db4.0_recover, svn cleanup, but I cannot commit 

niklaus@ngiger.dyndns.org:~$ cd /data/nm/ppcboot/board
niklaus@ngiger.dyndns.org:/data/nm/ppcboot/board$ svn status
svn: Datei oder Verzeichnis nicht gefunden
svn: svn_io_file_open: can't open `oak403/.svn/entries'
niklaus@ngiger.dyndns.org:/data/nm/ppcboot/board$ svn revert oak403
svn: Attempted to lock an already-locked dir
svn: working copy locked:
niklaus@ngiger.dyndns.org:/data/nm/ppcboot/board$ svn cleanup
svn: Path is not a working copy directory
svn: svn_wc_cleanup: oak403 is not a working copy directory
niklaus@ngiger.dyndns.org:/data/nm/ppcboot/board$ svn info
Path:
Url: file:///data/svn3/ppcboot/board
Revision: 12
Node Kind: directory
Schedule: normal
Last Changed Author: niklaus
Last Changed Rev: 12
Last Changed Date: 2002-10-06 10:53:30 +0200 (Son, 06 Okt 2002)

niklaus@ngiger.dyndns.org:/data/nm/ppcboot/board$ svn info oak403
Path: oak403
Name: oak403
Node Kind: directory
Schedule: add

The repository seems to be completly locked. I cannot checkout trying
to run 
svn checkout file:///data/svn3/ppcboot/board/walnut403
does not produce any output.
gdb info is as follows:
(gdb) info stack
#0  0x404b039e in select () from /lib/libc.so.6
#1  0x4011b41c in db_xa_switch_4000 () from /usr/lib/libdb-4.0.so
#2  0x400fccfa in __os_yield_4000 () from /usr/lib/libdb-4.0.so
#3  0x40099db4 in __db_tas_mutex_lock_4000 () from /usr/lib/libdb-4.0.so
#4  0x400d9c43 in __db_e_attach_4000 () from /usr/lib/libdb-4.0.so
#5  0x400d6c6d in __dbenv_open_4000 () from /usr/lib/libdb-4.0.so
#6  0x400745a6 in svn_fs_open_berkeley () from /usr/lib/libsvn_fs-1.so.0
#7  0x40061f65 in svn_repos_open () from /usr/lib/libsvn_repos-1.so.0
#8  0x40055818 in svn_ra_local__split_URL () from 
/usr/lib/libsvn_ra_local-1.so.0
#9  0x400544b3 in svn_ra_local__get_editor () from 
/usr/lib/libsvn_ra_local-1.so.0
#10 0x4002430f in svn_client__open_ra_session () from 
/usr/lib/libsvn_client-1.so.0
#11 0x400187af in svn_client_checkout () from /usr/lib/libsvn_client-1.so.0
#12 0x0804ac4d in svn_handle_warning ()
#13 0x0804ee0a in svn_handle_warning ()
#14 0x404000bf in __libc_start_main () from /lib/libc.so.6
(gdb)

What shall I do?

-- 
Niklaus Giger
Wieshoschet 6
CH-8753 Mollis
Tel. ++41 55 612 20 54 (privat)
Tel. ++41 55 618 64 68 (Geschäft)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn has problems to add directory (Lock-problem?)

Posted by Niklaus Giger <ng...@mus.ch>.
On Montag, 7. Oktober 2002 18.48, Ben Collins-Sussman wrote:
> Niklaus Giger <ng...@mus.ch> writes:
> > The repository seems to be completly locked. I cannot checkout trying
> > to run
> > svn checkout file:///data/svn3/ppcboot/board/walnut403
> > does not produce any output.
> > gdb info is as follows:
> > (gdb) info stack
> > #0  0x404b039e in select () from /lib/libc.so.6
> > #1  0x4011b41c in db_xa_switch_4000 () from /usr/lib/libdb-4.0.so
>
> Berkeley DB is waiting for a write lock to go away, one that was left
> behind by a dead process.
>
> What happens when you run 'db4_recover -ve -h /path/to/repos/db'?
Here is the output if the command is run on the local harddisk. The partition 
uses the ReiserFS format. No NFS is taking place.
niklaus@ngiger.dyndns.org:/data/nm/ppcboot/board$ db4.0_recover -ve -h 
/data/svn3
db_recover: Recovery complete at Mon Oct  7 23:31:44 2002
db_recover: Maximum transaction id 80000000 Recovery checkpoint [0][0]
niklaus@ngiger.dyndns.org:/data/nm/ppcboot/board$ svn status
_ L    CVS
_ L    RPXlite
_ L    RPXlite/CVS
<..>
_ L    lwmon/CVS
!      oak403
_ L    pcippc2
<..>
_ L    walnut405/CVS
$ svn cleanup
svn: Datei oder Verzeichnis nicht gefunden
svn: svn_wc_check_wc: oak403 does not exist
>
> You say it doesn't work, but I have no idea what that means.
Sorry, for not formulating precisely.  As you see above the command finished 
without any suspicious output, but there is no effect. E.g. svn revert, svn 
update, svn cleanup continue to produce errors.
To be sure that my HW is okay, I rebooted into single user, did a reiserfsck 
on the partition with the repository on it. But everything was okay.
At the moment it is also not possible to checkout another workspace.

Any ideas?

-- 
Niklaus Giger
Wieshoschet 6
CH-8753 Mollis
Tel. ++41 55 612 20 54 (privat)
Tel. ++41 55 618 64 68 (Geschäft)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn has problems to add directory (Lock-problem?)

Posted by Ben Collins-Sussman <su...@collab.net>.
Niklaus Giger <ng...@mus.ch> writes:

> The repository seems to be completly locked. I cannot checkout trying
> to run 
> svn checkout file:///data/svn3/ppcboot/board/walnut403
> does not produce any output.
> gdb info is as follows:
> (gdb) info stack
> #0  0x404b039e in select () from /lib/libc.so.6
> #1  0x4011b41c in db_xa_switch_4000 () from /usr/lib/libdb-4.0.so

Berkeley DB is waiting for a write lock to go away, one that was left
behind by a dead process.

What happens when you run 'db4_recover -ve -h /path/to/repos/db'?

You say it doesn't work, but I have no idea what that means.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn has problems to add directory (Lock-problem?)

Posted by Niklaus Giger <ng...@mus.ch>.
On Montag, 7. Oktober 2002 19.25, Philip Martin wrote:
> Niklaus Giger <ng...@mus.ch> writes:
> > I managed again to lock the subversion repository. I do not recall all
> > the steps I have done, but I access my files from a x86- and a
> > ppc-machine. Once I got a error message from my powerbook about a stale
> > NFS-handle.
>
> Are you accessing your repository over NFS, i.e. are you using an URL
> like file:///some/path where /some/path is on NFS?  If so you will have
> problems, see
>
> http://www.sleepycat.com/docs/ref/env/remote.html
Thank you very much for this hint. I didn't know this beforehand. It would 
even be better if such assumptions were checked by the programs. But either 
we are too lazy, too busy or it is too complicated.
> A working copy on NFS should be fine.
>
> If you want to access the repository from multiple machines you
> probably need to set up a Subversion server.
I had had some problems setting it up, as the owner/group did not match the 
default group of the Apache2. Now it works.
>
> First you have to stop/kill all the processes that are accessing the
> repository, then you have to run db_recover.  See the subversion
> handbook
See my mail to Colin-Sussmann. I tried several things, but nothing made be 
happy.

Thank you anyway for your help.

Regards
-- 
Niklaus Giger
Wieshoschet 6
CH-8753 Mollis
Tel. ++41 55 612 20 54 (privat)
Tel. ++41 55 618 64 68 (Geschäft)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn has problems to add directory (Lock-problem?)

Posted by Philip Martin <ph...@codematters.co.uk>.
Niklaus Giger <ng...@mus.ch> writes:

> I managed again to lock the subversion repository. I do not recall all the 
> steps I have done, but I access my files from a x86- and a ppc-machine. Once 
> I got a error message from my powerbook about a stale NFS-handle.

Are you accessing your repository over NFS, i.e. are you using an URL
like file:///some/path where /some/path is on NFS?  If so you will have
problems, see

http://www.sleepycat.com/docs/ref/env/remote.html

A working copy on NFS should be fine.

If you want to access the repository from multiple machines you
probably need to set up a Subversion server.

> I tried several things like db4.0_recover, svn cleanup, but I cannot commit 
> 
> niklaus@ngiger.dyndns.org:~$ cd /data/nm/ppcboot/board
> niklaus@ngiger.dyndns.org:/data/nm/ppcboot/board$ svn status
> svn: Datei oder Verzeichnis nicht gefunden
> svn: svn_io_file_open: can't open `oak403/.svn/entries'
> niklaus@ngiger.dyndns.org:/data/nm/ppcboot/board$ svn revert oak403
> svn: Attempted to lock an already-locked dir
> svn: working copy locked:
> niklaus@ngiger.dyndns.org:/data/nm/ppcboot/board$ svn cleanup
> svn: Path is not a working copy directory
> svn: svn_wc_cleanup: oak403 is not a working copy directory
> niklaus@ngiger.dyndns.org:/data/nm/ppcboot/board$ svn info
> Path:
> Url: file:///data/svn3/ppcboot/board
> Revision: 12
> Node Kind: directory
> Schedule: normal
> Last Changed Author: niklaus
> Last Changed Rev: 12
> Last Changed Date: 2002-10-06 10:53:30 +0200 (Son, 06 Okt 2002)

Looks like the oak403/.svn directory is incomplete.  If that is the
only problem with your working copy you could try deleting, or moving,
oak403 and then running update to restore it

$ mv oak403 /tmp
$ svn up

> niklaus@ngiger.dyndns.org:/data/nm/ppcboot/board$ svn info oak403
> Path: oak403
> Name: oak403
> Node Kind: directory
> Schedule: add

Except you cannot do that, because oak403 is status add and so does
not yet exist in the repository.  You are going to need to do
something like

$ mv oak403 /tmp
$ svn revert oak403

and then copy oak403 from /tmp back into your working copy, remove all
the .svn subdirs from oak403, and then run svn add on the new oak403.

> The repository seems to be completly locked. I cannot checkout trying
> to run 
> svn checkout file:///data/svn3/ppcboot/board/walnut403
> does not produce any output.
> gdb info is as follows:
> (gdb) info stack
> #0  0x404b039e in select () from /lib/libc.so.6
> #1  0x4011b41c in db_xa_switch_4000 () from /usr/lib/libdb-4.0.so
> #2  0x400fccfa in __os_yield_4000 () from /usr/lib/libdb-4.0.so
> #3  0x40099db4 in __db_tas_mutex_lock_4000 () from /usr/lib/libdb-4.0.so
> #4  0x400d9c43 in __db_e_attach_4000 () from /usr/lib/libdb-4.0.so
> #5  0x400d6c6d in __dbenv_open_4000 () from /usr/lib/libdb-4.0.so
> #6  0x400745a6 in svn_fs_open_berkeley () from /usr/lib/libsvn_fs-1.so.0
> #7  0x40061f65 in svn_repos_open () from /usr/lib/libsvn_repos-1.so.0
> #8  0x40055818 in svn_ra_local__split_URL () from 
> /usr/lib/libsvn_ra_local-1.so.0
> #9  0x400544b3 in svn_ra_local__get_editor () from 
> /usr/lib/libsvn_ra_local-1.so.0
> #10 0x4002430f in svn_client__open_ra_session () from 
> /usr/lib/libsvn_client-1.so.0
> #11 0x400187af in svn_client_checkout () from /usr/lib/libsvn_client-1.so.0
> #12 0x0804ac4d in svn_handle_warning ()
> #13 0x0804ee0a in svn_handle_warning ()
> #14 0x404000bf in __libc_start_main () from /lib/libc.so.6
> (gdb)

First you have to stop/kill all the processes that are accessing the
repository, then you have to run db_recover.  See the subversion
handbook

http://subversion.tigris.org/files/documents/15/576/svn-handbook.html#Repository%20maintenance

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org