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

Re: BDB-4.4 and automatic database recovery

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2006-01-13 02:30:07 CET

Philip Martin <philip@codematters.co.uk> writes:

> There seems to be a problem with the tracking of the DB_CONFIG file as
> valgrind reports "invalid file descriptor" on lots of operations,
> typically:
> $ valgrind -q subversion/svnlook/.libs/lt-svnlook youngest repo
> 6
> ==23849== Warning: invalid file descriptor -1 in syscall close()

What's happening is that create_env() registers cleanup_env() as a
pool cleanup before the DB_CONFIG file has been opened. Now when the
file is opened APR itself registers a cleanup to close the file and
when the pool is destroyed the cleanups run in the reverse order, so
the apr cleanup closes the file before cleanup_env() runs.


- cleanup_env() doesn't close DB_CONFIG

- cleanup_env() checks the file descriptor before closing DB_CONFIG

- open DB_CONFIG before registering cleanup_env()

Philip Martin
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 13 02:31:11 2006

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.