Edgewall Software
Modify

Opened 20 years ago

Closed 19 years ago

#1590 closed defect (fixed)

Trac can't handle errornous logs?

Reported by: orange <trac@…> Owned by: Jonas Borgström
Priority: high Milestone:
Component: general Version: 0.8.1
Severity: normal Keywords: svn locked
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I'm getting the 'database is locked' error. This seems to be caused because Trac fails when a log is corrupted. I had a server crash while commiting, which made the log for the commit errornous. It's missing author, date and message. The svn client shows it like this:

r142 | (no author) | (no date) | 2 lines

Trac seems not to be able to handle this, eg:

$ trac-admin /repos resync
resyncing...
Segmentation fault

This is what I get when I'm accessing the main site (anywhere):

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/core.py", line 531, in cgi_start
    real_cgi_start()
  File "/usr/lib/python2.3/site-packages/trac/core.py", line 513, in real_cgi_start
    env = open_environment()
  File "/usr/lib/python2.3/site-packages/trac/core.py", line 190, in open_environment
    version = env.get_version()
  File "/usr/lib/python2.3/site-packages/trac/Environment.py", line 162, in get_version
    cursor.execute("SELECT value FROM system WHERE name='database_version'")
  File "/usr/lib/python2.3/site-packages/sqlite/main.py", line 244, in execute
    self.rs = self.con.db.execute(SQL)
OperationalError: database is locked

To get trac somewhat useful in this state, remove the trac.db-journal which can be found in trac/project/db. Tho, in this state the browser or the timeline won't work (at least while that commit is accessed).

Please tell me if you're intrested in the binary changeset. I've tried to get some additional information using the logging mechanism in Trac, but all I get is the 500 Internal Server Error.

Attachments (0)

Change History (1)

comment:1 by Christian Boos, 19 years ago

Keywords: svn added
Resolution: fixed
Status: newclosed

Well, the primary problem here was a Segmentation fault during resync, due to buggy svn bindings. This left the trac.db-journal behind, which in turn produced the database is locked problem.

Upgrading the SVN bindings was probably the thing to do here (and I'm going to assume this has solved the problem for the reporter, otherwise please reopen + provide a dump of the repository upto r142 in order for us to be able to reproduce the issue).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström 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.