[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svnlook error message may end up in repos/db/nodes

From: Tobias Ringström <tobias_at_ringstrom.mine.nu>
Date: 2004-06-30 09:36:41 CEST

Roman Neuhauser wrote:

>roman@isis ~/tmp/wc 1065:1 > svnlook diff -r 2 /home/roman/tmp/repos >&- 2>&-
>roman@isis ~/tmp/wc 1066:1 > svnlook diff -r 2 /home/roman/tmp/repos
>svn: Berkeley DB error while opening 'nodes' table for filesystem /home/roman/tmp/repos/db:
>Invalid argument
>roman@isis ~/tmp/wc 1067:1 > head -1 ../repos/db/nodes
>svn: Can't write to stream: Bad file descriptor
>
>the above doesn't seem to be a reliable trigger, but getting the text in
>the db/nodes file is just a matter of the number of tries; perhaps there
>is a race somewhere?
>
>
I'm not that surprised that this happens. What you do is that you're
closing stdout and stderr which makes file descriptors 1 and 2
available. The first two files that are created in svnlook will get file
descriptors 1 and 2 which corresponds to stdout and stderr. If you print
an error message at that point, it will be printed to file descriptor 2,
i.e. whatever that file descriptor happens to be used for. In your case
it was the nodes table. The reason it looks like a race is probably
because of the bdb log files. You can use strace to find out which file
handles are used for what.

I guess we should fix it... but is this something that applications
generally tend to handle?

/Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 30 09:38:19 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.