Edgewall Software

Ticket #1590 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Trac can't handle errornous logs?

Reported by: orange <trac@…> Owned by: jonas
Priority: high Milestone:
Component: general Version: 0.8.1
Severity: normal Keywords: svn locked
Cc:

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

Change History

Changed 3 years ago by cboos

  • keywords svn added
  • status changed from new to closed
  • resolution set to fixed

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

Add/Change #1590 (Trac can't handle errornous logs?)

Author



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