Edgewall Software

Ticket #2770 (closed defect: duplicate)

Opened 3 years ago

Last modified 2 years ago

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:
Cc:

Description (last modified by cboos) (diff)

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

Change History

Changed 3 years ago by cboos

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

Changed 3 years ago by peter

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.

Changed 3 years ago by cboos

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.

Changed 3 years ago by peter

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.

Changed 3 years ago by cboos

(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.

Changed 3 years ago by peter

Where is this PYTHONPATH defined?

Changed 3 years ago by cboos

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

Changed 2 years ago by cboos

  • description modified (diff)

Happened to someone else recently: Trac-ML:8371

Changed 2 years ago by cboos

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

Changed 2 years ago by cboos

  • status changed from new to closed
  • resolution set to duplicate

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

Add/Change #2770 (trac-admin: failed to initialize environment. (Can't set position pointer in file...))

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from daniel. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.