Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

Last modified 3 years ago

#7109 closed defect (worksforme)

Sqlite: cannot start a transaction within a transaction

Reported by: jsinger@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.11b2
Severity: major Keywords: sqlite, macosx
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

compare to Error #3471

How to Reproduce

While doing a GET operation on /timeline, Trac issued an internal error.

Machine in question is a Power Mac G5 running Mac OS X 10.4.11 Trac, Python, mod_python subversion have been specifically compiled for the machine using the latest avalilable versions.

Trac has just been setup, there are no contents yet anywhere. As soon as timeline is selected the error appears.

System Information

Trac 0.11b2
Python 2.5.2 (r252:60911, Apr 12 2008, 11:53:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5370)]
setuptools 0.6c8
SQLite 3.1.3
pysqlite 2.4.1
Genshi 0.4.4
mod_python 3.3.1
Subversion 1.4.6 (r28521)

Python Traceback

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Trac-0.11b2-py2.5.egg/trac/web/main.py", line 419, in _dispatch_request
    dispatcher.dispatch(req)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Trac-0.11b2-py2.5.egg/trac/web/main.py", line 221, in dispatch
    req.session.save()
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Trac-0.11b2-py2.5.egg/trac/web/session.py", line 179, in save
    (self.sid,))
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Trac-0.11b2-py2.5.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Trac-0.11b2-py2.5.egg/trac/db/sqlite_backend.py", line 58, in execute
    args or [])
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Trac-0.11b2-py2.5.egg/trac/db/sqlite_backend.py", line 50, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: cannot start a transaction within a transaction

Attachments (0)

Change History (6)

comment:1 by Tim Hatch, 17 years ago

Component: timelinegeneral
Keywords: sqlite osx added; transaction (cmp Error 3471) removed
Owner: changed from Christian Boos to Jonas Borgström
Version: 0.11b10.11b2

I can try to reproduce this on my G4 Mac with Tiger as well, but can you first give some more specifics:

  • Was mod_python compiled against the apache2 that comes with OSX? Is PHP enabled on the server?
  • Does the error also occur with tracd, or only with mod_python?
  • Does the error also occur with other pages, or only with timeline? Does it continue if you clear cookies (to get a new sessionid) and/or try with another browser?
  • Do you have fink or darwinports installed that might be providing another libsqlite?
  • Can you reproduce with a newly created project again?

in reply to:  1 ; comment:2 by anonymous, 17 years ago

Replying to thatch:

  • Was mod_python compiled against the apache2 that comes with OSX? Is PHP

enabled on the server?

No, it was compiled specifically against apache 2.2.8. There are several modules compiled into apache, like ldap-support mod_python and svn_dav are loaded from http.conf - there is no PHP included, yet.

Mac OS X Tiger comes with apache 1.3, which we currently do not use. There is another apache 2.0 (installed from darwinports) running to keep users happy while I try to set up the new environment.

  • Does the error also occur with tracd, or only with mod_python?

The error does not occur with tracd (though tracd is not an option for me, since I need LDAP authorization)

Note that I had to install python 2.5 as a framework in /System/Library to get things running. Even then, if mod_python was given /usr/local/bin/python in configure it claimed to compile with /System/Library/Frameworks/Python.framework/Version/2.5, but when used within apache it used the default Mac Version of 2.3 - this only changed after I gave —with-python=/System/Library/Frameworks/Python.frameworks/Version/2.5/bin/python to configure

  • Does the error also occur with other pages, or only with timeline? Does it continue if you clear cookies (to get a new sessionid) and/or try with another browser?

I could not find any other pages, but there are no actively used trac projects under this server. The error occurs with FireFox (2.0.0.11) and Safari (3.1)

  • Do you have fink or darwinports installed that might be providing another libsqlite?

There is no fink, but darwinports is installed. However it was not used to setup the trac environment in question - and the following were installed from scratch, i.e. source python 2.5.2 apache 2.2.8 mod_python 3.3.1 swig 1.3.34 subversion 1.4.6 pysqlite 2.4.1 trac 0.11b2

The search path on the machine is: /usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/local/bin

On the Mac Server there were libsqlite in /usr/lib and /usr/local/lib, though I made the former an alias of the latter. There is another one in /opt/local/lib.

They all do have the same version number (3.0.8.6)

  • Can you reproduce with a newly created project again?

Yes I can reproduce.

in reply to:  2 ; comment:3 by Tim Hatch, 17 years ago

On the Mac Server there were libsqlite in /usr/lib and /usr/local/lib, though I made the former an alias of the latter. There is another one in /opt/local/lib.

They all do have the same version number (3.0.8.6)

How did one end up in /usr/local/lib? I don't have that. Did you compile sqlite3 yourself as well? Did you alias BEFORE compiling?

in reply to:  3 ; comment:4 by anonymous, 17 years ago

Replying to thatch:

On the Mac Server there were libsqlite in /usr/lib and /usr/local/lib, though I made the former an alias of the latter. There is another one in /opt/local/lib.

They all do have the same version number (3.0.8.6)

How did one end up in /usr/local/lib? I don't have that. Did you compile sqlite3 yourself as well? Did you alias BEFORE compiling?

No - this is how I took over the machine - I have no access to the former admin, and there is no documentation of what was done, but I guess these are not unusal circumstances for a school setup.

However, after your remark I did compile my own version of sqlite: It seems that, independent of the actual version, sqlite3 ist always called libsqlite3.0.8.6.dylib -at least that was the name I got for my compiled version 3.5.7. As a result, I am not able to say which version of sqlite was used. The good news is: the error seems to have disappeared after I replaced the sqlite in /usr/local/lib with 3.5.7 (I also kept the link from /usr/lib to that version, in the hope that there will be no ill effects for other programms using sqlite)

in reply to:  4 comment:5 by Christian Boos, 17 years ago

Resolution: worksforme
Status: newclosed

Replying to anonymous:

… I did compile my own version of sqlite: It seems that, independent of the actual version, sqlite3 ist always called libsqlite3.0.8.6.dylib -at least that was the name I got for my compiled version 3.5.7. … The good news is: the error seems to have disappeared after I replaced the sqlite in /usr/local/lib with 3.5.7

Yes, this is the suggestion I was going to make: SQLite 3.1.3 was pretty outdated, using a more recent version seemed the thing to do.

comment:6 by Ryan J Ollos, 10 years ago

Keywords: macosx added; osx removed

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.