[Yum-devel] Python 2.5 sqlite dont like threads.

Tim Lauridsen tim at rasmil.dk
Mon Dec 18 09:23:12 UTC 2006


Hi

I just look at this bugzilla report on yumex:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219746

Component: yumex
Version: 1.2.0
Summary: TBe83547cb sqlitesack.py:446:simplePkgList:ProgrammingError: SQLite
objects created in a thread can only be used in that same thread.The object was
created in thread id -1240970352 and this is thread id -1208543552

Traceback (most recent call last):
  File "/usr/share/yumex/yumexmain.py", line 1106, in <module>
    mainApp = YumexMainApplication()
  File "/usr/share/yumex/yumexmain.py", line 541, in __init__
    self.setup_yum()
  File "/usr/share/yumex/yumexmain.py", line 995, in setup_yum
    self.yumexbase.build_package_lists( self.recentlimit, pkglists )
  File "/usr/lib/python2.5/site-packages/yumex/yumexBase.py", line 445, in
build_package_lists
    self.doUpdateSetup()
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 357, in
doUpdateSetup
    self.pkgSack.simplePkgList())
  File "/usr/lib/python2.5/site-packages/yum/packageSack.py", line 303, in
simplePkgList
    return self._computeAggregateListResult("simplePkgList")
  File "/usr/lib/python2.5/site-packages/yum/packageSack.py", line 323, in
_computeAggregateListResult
    sackResult = apply(method, args)
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 446, in
simplePkgList
    cur = cache.cursor()
ProgrammingError: SQLite objects created in a thread can only be used in that
same thread.The object was created in thread id -1240970352 and this is thread
id -1208543552

Local variables in innermost frame:
simplelist: []
rep: development
cache: <sqlite3.Connection object at 0x94477a0>
self: <yum.sqlitesack.YumSqlitePackageSack instance at 0x99ee18c>

I looks like the sqlite3 stuff in python 2.5 don't like threads very 
much, it very bad for me, in the generation of yumex 1.9.x, everything 
is  done in a thread to make the gui responsive at all times.
Anybody body got a clue, how to solve this, it works with out problems 
in python 2.4.

Tim



More information about the Yum-devel mailing list