Ticket #3504
(closed defect: fixed)
AssertionError in trac.db.pool.PooledConnection.__del__
| Reported by: |
exarkun@… |
Owned by: |
cboos
|
|
Priority:
|
high
|
Milestone:
|
0.10
|
|
Component:
|
general
|
Version:
|
devel
|
|
Severity:
|
critical
|
Keywords:
|
database connection pool
|
|
Cc:
|
exarkun@…
|
|
|
On nearly every request, my server logs this error:
Exception exceptions.AssertionError: <exceptions.AssertionError instance at 0x89faeacc> in <bound method PooledConnection.__del__ of <trac.db.pool.PooledConnection object at 0xb47cc88c>> ignored
Attachments
-
force_close_at_thread_exit.patch
(2.6 KB) - added by cboos
2 years ago.
-
Fix for #3504, on top of r3747. The final call to cnx.close() in the request dispatcher forces the disposal of the pysqlite Connection object, even if there are still other PooledConnections waiting to be garbage collected.
-
selective_shutdown_at_thread_exit.patch
(4.5 KB) - added by cboos
2 years ago.
-
Another possible fix for this ticket, still on top of r3747. This solution is a bit more satisfying, as it doesn't require to create a Connection when there's no need to, so an additional benefit of this patch could be a small performance boost.
-
even_more_threadsafe_pool-r3756.diff
(3.4 KB) - added by cboos
2 years ago.
-
Now the PooledConnection remembers which thread it has been created in. If GC of the instance happens in another thread, avoid to do the cleanup from there, and instead defer the cleanup of the Connection to be done when the thread that created it terminates.
-
even_more_threadsafe_pool-r3762.diff
(2.7 KB) - added by cboos
2 years ago.
-
Ok, this last patch seems to be more correct. Please review. (take 2)
-
debug_thread_reuse.diff
(3.1 KB) - added by cboos
2 years ago.
-
Some more debugging code to check the "rapid thread id reuse" hypothesis
-
db_pool_timeout-r3868.patch
(6.2 KB) - added by cboos
2 years ago.
-
There was apparently a missing decrement of the cursize, potentially the cause for a hang. We'll see…
Change History