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

Berkeley DB fails creating a new repository, "invalid argument"

From: Enrique Perez-Terron <enrio_at_online.no>
Date: 2004-08-16 21:56:16 CEST

The command sequence (as root)

  # rm -rf /home-4/subversion
  # svnadmin create /home-4/subversion

Gives the error messages

  svn: Berkeley DB error while creating environment for filesystem /home-4/subversion/db:
  Invalid argument

I run Fedora Core 2 with all updates on a single-cpu AMD K6 (i385) and
have

  # rpm -q subversion db4
  subversion-1.0.6-1
  db4-4.2.52-3.1
  # uname -r
  2.6.6-1.435.2.3

(The latter is not the latest kernel, but the latest kernel
(2.6.7-1.494.2.2) failed to mount its initrd alleging "unsupported user
options" and therefore failed to boot.)

I have tried to determine what exactly fails, and have used 'strace'.
The output from strace ends with the following lines which seem to
indicate the error is not a result of a failed system call:

10153 mkdir("/home-4/subversion/db", 0777) = 0
10153 open("/home-4/subversion/db/DB_CONFIG", O_WRONLY|O_CREAT, 0666) = 3
10153 write(3, "# This is the configuration file"..., 1282) = 1282
10153 write(3, "#\n# Disable fsync of log files o"..., 195) = 195
10153 write(3, "# set_flags DB_TXN_NOSYNC\n", 26) = 26
10153 write(3, "#\n# Enable automatic removal of "..., 207) = 207
10153 write(3, "set_flags DB_LOG_AUTOREMOVE\n", 28) = 28
10153 close(3) = 0
10153 open("/etc/mtab", O_RDONLY) = 3
10153 fstat64(3, {st_mode=S_IFREG|0644, st_size=742, ...}) = 0
10153 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x1fea8000
10153 read(3, "/dev/hda9 / ext3 rw 0 0\nnone /pr"..., 4096) = 742
10153 close(3) = 0
10153 munmap(0x1fea8000, 4096) = 0
10153 open("/proc/stat", O_RDONLY) = 3
10153 fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
10153 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x1fea7000
10153 read(3, "cpu 286117 3622 53926 2179540 5"..., 1024) = 243
10153 read(3, "", 1024) = 0
10153 close(3) = 0
10153 munmap(0x1fea7000, 4096) = 0
10153 write(2, "svn: Berkeley DB error while cre"..., 105) = 105
10153 exit_group(1) = ?

I have also tried to use ltrace, but to my surprise it failed to record
any library calls. (The only output was "5144 +++ exited (status 1)
+++").

I have begun looking at the source code, and determined that the error
somehow arises in the call to fs->env->open() (subversion/libsvn_fs/fs.c
line 536), which I think is a call to the db4 library. I will next
acquire the source of the db4 library, but I wanted to ask if this error
is known. I could not find anything in the mail archive.

Regards,
Enrique

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Aug 16 21:56:37 2004

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