Edgewall Software
Modify

Opened 15 years ago

Closed 14 years ago

#8379 closed defect (duplicate)

Error while dumping an error w/ postgresql backend

Reported by: Emmanuel Blot Owned by:
Priority: normal Milestone:
Component: database backend Version: 0.12dev
Severity: normal Keywords: postgresql
Cc: felix.schwarz@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

It seems that Trac confuses PostgreSQL backend when an error in PostgreSQL occurs.

From the log file, an error has been triggered from a plugin (Bitten):

Traceback (most recent call last):
  File "/local/engine/trac/trac/web/main.py", line 464, in _dispatch_request
    dispatcher.dispatch(req)
  File "/local/engine/trac/trac/web/main.py", line 212, in dispatch
    resp = chosen_handler.process_request(req)
  File "/local/engine/bitten/bitten/master.py", line 85, in process_request
    return self._process_build_creation(req)
  File "/local/engine/bitten/bitten/master.py", line 110, in _process_build_creation
    queue.populate()
  File "/local/engine/bitten/bitten/queue.py", line 222, in populate
    for platform, rev, build in collect_changes(repos, config, db):
  File "/local/engine/bitten/bitten/queue.py", line 82, in collect_changes
    for platform in TargetPlatform.select(env, config.name, db=db):
  File "/local/engine/bitten/bitten/model.py", line 323, in select
    yield TargetPlatform.fetch(env, id)
  File "/local/engine/bitten/bitten/model.py", line 297, in fetch
    "WHERE id=%s ORDER BY orderno", (id,))
  File "/local/engine/trac/trac/db/util.py", line 59, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/local/engine/trac/trac/db/util.py", line 59, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
ProgrammingError: operator does not exist: text = integer

However, the error reported to the web browser looks like the following

Traceback (most recent call last):
  File "/local/engine/trac/trac/web/api.py", line 382, in send_error
    'text/html')
  File "/local/engine/trac/trac/web/chrome.py", line 761, in render_template
    req.chrome[type_].append(
  File "/local/engine/trac/trac/web/api.py", line 199, in __getattr__
    value = self.callbacks[name](self)
  File "/local/engine/trac/trac/web/chrome.py", line 516, in prepare_request
    for category, name, text in contributor.get_navigation_items(req):
  File "/local/engine/bitten/bitten/web_ui.py", line 94, in get_navigation_items
    repos.sync()
  File "/local/engine/trac/trac/versioncontrol/cache.py", line 90, in sync
    ','.join(["'%s'" % key for key in CACHE_METADATA_KEYS]))
  File "/local/engine/trac/trac/db/util.py", line 60, in execute
    return self.cursor.execute(sql)
  File "/local/engine/trac/trac/db/util.py", line 60, in execute
    return self.cursor.execute(sql)
InternalError: current transaction is aborted, commands ignored until end of transaction block

Attachments (0)

Change History (5)

comment:1 by Emmanuel Blot, 15 years ago

See ticket:404 for the root cause

comment:2 by Christian Boos, 15 years ago

Component: generaldatabase backend
Milestone: 0.11.6

I think this is due to the lack of rollback after errors.

We should consider doing in the IterableCursor when implementing #6348, being careful to not interfere with the garbage collection of PooledConnection (i.e. probably have a weak ref in the cursor to its connection).

comment:3 by Christian Boos, 15 years ago

Milestone: 0.11.60.12
Severity: minornormal

comment:4 by Felix Schwarz <felix.schwarz@…>, 15 years ago

Cc: felix.schwarz@… added

comment:5 by Christian Boos, 14 years ago

Milestone: 0.12
Resolution: duplicate
Status: newclosed

Duplicate of #6348.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.