Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 15 years ago

#2770 closed defect (duplicate)

trac-admin: failed to initialize environment. (Can't set position pointer in file...)

Reported by: peter.hoydonkx@… Owned by: daniel
Priority: normal Milestone:
Component: admin/console Version: 0.9.3
Severity: blocker Keywords: 2
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

Hi,

When I try to initialize a new environment using the trac-admin command, i get following message:

'' Indexing repository
Failed to initialize environment. ("Can't set position pointer in file '/home/svn_root/tmp/svnrepo-test/db/revs/0': Invalid argument", 22)
Traceback (most recent call last):
  File "/usr/local/lib/python2.3/site-packages/trac/scripts/admin.py", line 617, in do_initenv
    repos.sync()
  File "/usr/local/lib/python2.3/site-packages/trac/versioncontrol/cache.py", line 87, in sync
    for path,kind,action,base_path,base_rev in changeset.get_changes():
  File "/usr/local/lib/python2.3/site-packages/trac/versioncontrol/svn_fs.py", line 458, in get_changes
    root = fs.revision_root(self.fs_ptr, self.rev, pool())
SubversionException: ("Can't set position pointer in file '/home/svn_root/tmp/svnrepo-test/db/revs/0': Invalid argument", 22)''

What could be the cause of this warning? How to solve it?

Linux server - Red Hat Enterprise Linux WS release 3 (Taroon Update 4)

Tools used:

subversion 1.2.3
python 2.3.5
trac 0.9.3
clearsilver 0.9.3
pysqlite 1.0.1
silvercity 0.9.5
swig 1.3.21

with kind regards, Peter

Attachments (0)

Change History (11)

comment:1 by Christian Boos, 18 years ago

Do you have the read permission on /home/svn_root/tmp/svnrepo-test/db/revs/0?

comment:2 by Peter Dimov, 18 years ago

Yes, the file has read permission. I also tried giving all the files in the dir (+subdirs) /home/svn_root/tmp/svnrepo-test rwxrwxrwx permissions. But i still get the error.

comment:3 by Christian Boos, 18 years ago

Try out the following:

  • svnadmin verify svnrepo-test
  • svnadmin dump svnrepo-test > dump.txt
  • svn co file:///.../svnrepo-test co-test
  • finally, exercise the python svn bindings on your repo (look at ticket #2620 and use the check_svn_repos.py script attached on that ticket).

Also, now that I see it, swig 1.3.21 looks a bit suspicious. You should use either SWIG 1.3.24 or 1.3.25.

comment:4 by Peter Dimov, 18 years ago

When running "/cadappl/python/2.3.5/bin/python2.3 check_svn_repos.py /home/svn_root/tmp/svnrepo-test 1" I get following message:

Traceback (most recent call last):

File "check_svn_repos.py", line 1, in ?

from trac.versioncontrol.svn_fs import Pool

ImportError: No module named trac.versioncontrol.svn_fs

Any idea what the problem can be?

Sorry but I was wrong about our SWIG version. We use 1.3.27.

comment:5 by Christian Boos, 18 years ago

(For the script problem above, put the location where you've installed your trac package in the PYTHONPATH)

Ok, I believe it's an issue with the SWIG bindings. 1.3.27 should not be used. Use 1.3.24 or 1.3.25 as explained in the subversion/bindings/swig/NOTES.

1.3.28 should work also, but I've not checked yet.

comment:6 by Peter Dimov, 18 years ago

Where is this PYTHONPATH defined?

comment:7 by Christian Boos, 18 years ago

It's an environment variable:

echo $PYTHONPATH # check the current value, if any
export PYTHONPATH=<your-svn-install>/lib/svn-python:<your-trac-install>/lib/python2.3/site-packages:$PYTHONPATH

comment:8 by Christian Boos, 18 years ago

Description: modified (diff)

Happened to someone else recently: Trac-ML:8371

comment:9 by Christian Boos, 18 years ago

(btw. this ticket suffers from #3232, so please don't report the issue again!)

comment:10 by Christian Boos, 18 years ago

Resolution: duplicate
Status: newclosed

This is a duplicate of #2920 (Can't set position pointer in file …)

comment:11 by Christian Boos, 15 years ago

Milestone: experimental

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain daniel.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from daniel to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.