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

"Too many open files" for "svn diff" [Was: Re: "Cannot allocate memory" error for "svn diff"]

From: Sunil Shetye <shetye_at_bombay.retortsoft.com>
Date: 2004-10-29 09:51:52 CEST

=============================================================================
Thanks for the help. It has not solved the problem completely though.

Quoting from J Robert Ray's mail on Thu, Oct 28, 2004 at 04:14:40PM -0700:
> Increasing set_lg_max and set_lg_bsize didn't work for me, until I added
> the set_cachesize and set_lg_regionmax settings (see link) I couldn't
> get recover to succeed.

Increasing set_lg_regionmax did make "svnadmin recover" succeed. It
also changed the error message for the original "svn diff" command.
Setting set_cachesize did not make any difference.

Since the source of the problem appears to be different now, I am
repeating the problem.
=============================================================================

"svn diff" fails when run with many filenames (more than 60 or so if
"ulimit -n" is 1024).

$ svn diff -r 41899:41900 file001 file002 ... file150
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///my/repos/trunk/file057'
svn: Berkeley DB error while opening 'transactions' table for filesystem /my/repos/db:
Too many open files
Aborted

The problem seems to be related to db files being opened repeatedly
and not closed. Here is the partial output of ltrace:

======
SYS_open("/my/repos/locks/db.lock", 0, 0666) = 3
SYS_open("/my/repos/db/nodes", 32770, 00) = 4
SYS_open("/my/repos/db/revisions", 32770, 00) = 5
SYS_open("/my/repos/db/transactions", 32770, 00) = 6
SYS_open("/my/repos/db/copies", 32770, 00) = 7
SYS_open("/my/repos/db/changes", 32770, 00) = 8
SYS_open("/my/repos/db/representations", 32770, 00) = 9
SYS_open("/my/repos/db/strings", 32770, 00) = 10
SYS_open("/my/repos/db/uuids", 32770, 00) = 11
======
SYS_open("/my/repos/locks/db.lock", 0, 0666) = 12
SYS_open("/my/repos/db/nodes", 32770, 00) = 13
SYS_open("/my/repos/db/revisions", 32770, 00) = 14
SYS_open("/my/repos/db/transactions", 32770, 00) = 15
SYS_open("/my/repos/db/copies", 32770, 00) = 16
SYS_open("/my/repos/db/changes", 32770, 00) = 17
SYS_open("/my/repos/db/representations", 32770, 00) = 18
SYS_open("/my/repos/db/strings", 32770, 00) = 19
SYS_open("/my/repos/db/uuids", 32770, 00) = 20
======
SYS_open("/my/repos/locks/db.lock", 0, 0666) = 21
SYS_open("/my/repos/db/nodes", 32770, 00) = 22
SYS_open("/my/repos/db/revisions", 32770, 00) = 23
SYS_open("/my/repos/db/transactions", 32770, 00) = 24
SYS_open("/my/repos/db/copies", 32770, 00) = 25
SYS_open("/my/repos/db/changes", 32770, 00) = 26
SYS_open("/my/repos/db/representations", 32770, 00) = 27
SYS_open("/my/repos/db/strings", 32770, 00) = 28
SYS_open("/my/repos/db/uuids", 32770, 00) = 29
======
SYS_open("/my/repos/locks/db.lock", 0, 0666) = 30
SYS_open("/my/repos/db/nodes", 32770, 00) = 31
SYS_open("/my/repos/db/revisions", 32770, 00) = 32
SYS_open("/my/repos/db/transactions", 32770, 00) = 33
SYS_open("/my/repos/db/copies", 32770, 00) = 34
SYS_open("/my/repos/db/changes", 32770, 00) = 35
SYS_open("/my/repos/db/representations", 32770, 00) = 36
SYS_open("/my/repos/db/strings", 32770, 00) = 37
SYS_open("/my/repos/db/uuids", 32770, 00) = 38
======
...

-- 
Sunil Shetye.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Oct 29 09:44:55 2004

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

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