fowode / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

FICS python crash: "GC object already tracked" #895

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Fatal Python error: GC object already tracked
Fatal Python error: Aborted

Thread 0x00007f3b8cffd700:
  File "/usr/lib64/python2.7/threading.py", line 339 in wait
  File "/usr/lib64/python2.7/Queue.py", line 168 in get
  File "/home/gatto/code/hg/pychess/lib/pychess/System/GtkWorker.py", line 29 in run
  File "/usr/lib64/python2.7/threading.py", line 811 in __bootstrap_inner
  File "/usr/lib64/python2.7/threading.py", line 784 in __bootstrap

Thread 0x00007f3b8f7fe700:
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/FICSConnection.py", line 281 in keep_alive
  File "/usr/lib64/python2.7/threading.py", line 764 in run
  File "/usr/lib64/python2.7/threading.py", line 811 in __bootstrap_inner
  File "/usr/lib64/python2.7/threading.py", line 784 in __bootstrap

Thread 0x00007f3b8ffff700:
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/FICSConnection.py", line 281 in keep_alive
  File "/usr/lib64/python2.7/threading.py", line 764 in run
  File "/usr/lib64/python2.7/threading.py", line 811 in __bootstrap_inner
  File "/usr/lib64/python2.7/threading.py", line 784 in __bootstrap

Thread 0x00007f3b9cca4700:
  File "/usr/lib64/python2.7/logging/__init__.py", line 835 in flush
  File "/usr/lib64/python2.7/logging/__init__.py", line 875 in emit
  File "/usr/lib64/python2.7/logging/__init__.py", line 939 in emit
  File "/usr/lib64/python2.7/logging/__init__.py", line 749 in handle
  File "/usr/lib64/python2.7/logging/__init__.py", line 1318 in callHandlers
  File "/usr/lib64/python2.7/logging/__init__.py", line 1278 in handle
  File "/usr/lib64/python2.7/logging/__init__.py", line 1268 in _log
  File "/usr/lib64/python2.7/logging/__init__.py", line 1137 in debug
  File "/usr/lib64/python2.7/logging/__init__.py", line 1422 in debug
  File "/home/gatto/code/hg/pychess/lib/pychess/System/glock.py", line 19 in _debug
  File "/home/gatto/code/hg/pychess/lib/pychess/System/glock.py", line 56 in release
  File "/home/gatto/code/hg/pychess/lib/pychess/System/GtkWorker.py", line 51 in run
  File "/usr/lib64/python2.7/threading.py", line 811 in __bootstrap_inner
  File "/usr/lib64/python2.7/threading.py", line 784 in __bootstrap

Thread 0x00007f3b9d6ab700:
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/TimeSeal.py", line 162 in cook_some
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/TimeSeal.py", line 159 in readuntil
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/TimeSeal.py", line 150 in readline
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/VerboseTelnet.py", line 161 in _get_lines
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/VerboseTelnet.py", line 156 in popleft
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/VerboseTelnet.py", line 206 in parse
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/FICSConnection.py", line 295 in run
  File "/usr/lib64/python2.7/threading.py", line 811 in __bootstrap_inner
  File "/usr/lib64/python2.7/threading.py", line 784 in __bootstrap

Current thread 0x00007f3ba8e92700:
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/FICSObjects.py", line 76 in __init__
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/managers/HelperManager.py", line 222 in on_player_available
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/VerboseTelnet.py", line 114 in handle
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/VerboseTelnet.py", line 226 in test_prediction
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/VerboseTelnet.py", line 213 in parse
  File "/home/gatto/code/hg/pychess/lib/pychess/ic/FICSConnection.py", line 295 in run
  File "/usr/lib64/python2.7/threading.py", line 811 in __bootstrap_inner
  File "/usr/lib64/python2.7/threading.py", line 784 in __bootstrap

Thread 0x00007f3b9e6ac700:
  File "/home/gatto/code/hg/pychess/lib/pychess/System/debug.py", line 29 in thread_dumper
  File "/usr/lib64/python2.7/threading.py", line 764 in run
  File "/usr/lib64/python2.7/threading.py", line 811 in __bootstrap_inner
  File "/usr/lib64/python2.7/threading.py", line 784 in __bootstrap

Thread 0x00007f3bb7441740:
  File "/home/gatto/code/hg/pychess/lib/pychess/Main.py", line 493 in run
  File "/home/gatto/code/hg/pychess/pychess", line 138 in <module>

(gdb) bt
#0  0x000000308e40ee6b in raise (sig=6) at 
../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
#1  <signal handler called>
#2  0x000000308e0359e9 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#3  0x000000308e0370f8 in __GI_abort () at abort.c:90
#4  0x00000030a92f8b5e in Py_FatalError (msg=msg@entry=0x30a93228ac "GC object 
already tracked")
    at /usr/src/debug/Python-2.7.5/Python/pythonrun.c:1697
#5  0x00000030a930bba0 in PyObject_GC_Track (op=op@entry=0x7fc000208960)
    at /usr/src/debug/Python-2.7.5/Modules/gcmodule.c:1539
#6  0x00000030a9289a0c in make_new_set (type=<optimized out>, iterable=0x0)
    at /usr/src/debug/Python-2.7.5/Objects/setobject.c:1019
#7  0x00000030a929d653 in type_call (type=0x30a958d040 <PySet_Type>, args=(), 
kwds=0x0)
    at /usr/src/debug/Python-2.7.5/Objects/typeobject.c:729
#8  0x00000030a9249dd3 in PyObject_Call (func=func@entry=<type at remote 
0x30a958d040>, arg=arg@entry=(), 
    kw=kw@entry=0x0) at /usr/src/debug/Python-2.7.5/Objects/abstract.c:2529
#9  0x00000030a92db6dc in do_call (nk=<optimized out>, na=0, 
pp_stack=0x7fc020e71c50, 
    func=<type at remote 0x30a958d040>) at /usr/src/debug/Python-2.7.5/Python/ceval.c:4316
#10 call_function (oparg=<optimized out>, pp_stack=0x7fc020e71c50)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4121
#11 PyEval_EvalFrameEx (
    f=f@entry=Frame 0x7fbfe4455c80, for file /home/gatto/code/hg/pychess/lib/pychess/ic/FICSObjects.py, line 76, in __init__ (self=<FICSPlayer(_game=None, _online=False, name='GuestCJWN', ratings=<FICSRatings at remote 0x7fc0110abeb0>, adjournment=False, _previous_status=10, keep_after_logout=False, _status=10) at remote 0x7fc00021a690>, name='GuestCJWN', online=False, status=10, game=None, titles=None), 
    throwflag=throwflag@entry=0) at /usr/src/debug/Python-2.7.5/Python/ceval.c:2740
#12 0x00000030a92dec7d in PyEval_EvalCodeEx (co=<optimized out>, 
globals=<optimized out>, 
    locals=locals@entry=0x0, args=args@entry=0x7fc00056c530, argcount=2, kws=kws@entry=0x0, 
    kwcount=kwcount@entry=0, defs=defs@entry=0x3ad1c18, defcount=defcount@entry=4, closure=0x0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
#13 0x00000030a926dca0 in function_call (func=<function at remote 0x38ff938>, 
    arg=(<FICSPlayer(_game=None, _online=False, name='GuestCJWN', ratings=<FICSRatings at remote 0x7fc0110abeb0>, adjournment=False, _previous_status=10, keep_after_logout=False, _status=10) at remote 0x7fc00021a690>, 'GuestCJWN'), kw=0x0) at /usr/src/debug/Python-2.7.5/Objects/funcobject.c:526
#14 0x00000030a9249dd3 in PyObject_Call (func=func@entry=<function at remote 
0x38ff938>, 
    arg=arg@entry=(<FICSPlayer(_game=None, _online=False, name='GuestCJWN', ratings=<FICSRatings at remote 0x7fc0110abeb0>, adjournment=False, _previous_status=10, keep_after_logout=False, _status=10) at remote 0x7fc00021a690>, 'GuestCJWN'), kw=kw@entry=0x0) at /usr/src/debug/Python-2.7.5/Objects/abstract.c:2529
#15 0x00000030a9258555 in instancemethod_call (func=<function at remote 
0x38ff938>, 
    arg=(<FICSPlayer(_game=None, _online=False, name='GuestCJWN', ratings=<FICSRatings at remote 0x7fc0110abeb0>, adjournment=False, _previous_status=10, keep_after_logout=False, _status=10) at remote 0x7fc00021a690>, 'GuestCJWN'), kw=0x0) at /usr/src/debug/Python-2.7.5/Objects/classobject.c:2602
#16 0x00000030a9249dd3 in PyObject_Call (func=func@entry=<instancemethod at 
remote 0x7fc011623f00>, 
    arg=arg@entry=('GuestCJWN',), kw=kw@entry=0x0) at /usr/src/debug/Python-2.7.5/Objects/abstract.c:2529
---Type <return> to continue, or q <return> to quit---
#17 0x00000030a929e937 in slot_tp_init (self=<optimized out>, 
args=('GuestCJWN',), kwds=0x0)
    at /usr/src/debug/Python-2.7.5/Objects/typeobject.c:5692
#18 0x00000030a929d69f in type_call (type=<optimized out>, args=('GuestCJWN',), 
kwds=0x0)
    at /usr/src/debug/Python-2.7.5/Objects/typeobject.c:745
#19 0x00000030a9249dd3 in PyObject_Call (
    func=func@entry=<GObjectMeta(__module__='pychess.ic.FICSObjects', bughouse=<property at remote 0x38ed1b0>, set_online=<function at remote 0x38ffaa0>, blitz=<property at remote 0x38ed050>, long_name=<function at remote 0x38ff9b0>, titles=<property(name='titles', default=None, minimum=None, maximum=None, nick='', getter=<function at remote 0x38ffe60>, flags=3, _exc=None, type=<gobject.GType at remote 0x7fc0416d3480>, blurb='', setter=<function at remote 0x38ffed8>) at remote 0x3a9a650>, atomic=<property at remote 0x38ed158>, getRatingMean=<function at remote 0x38f0a28>, __init__=<function at remote 0x38ff938>, suicide=<property at remote 0x38ed2b8>, set_titles=<function at remote 0x38ffed8>, get_titles=<function at remote 0x38ffe60>, set_game=<function at remote 0x38ffde8>, isAdmin=<function at remote 0x38f07d0>, getRatingForCurrentGame=<function at remote 0x38f0b90>, set_status=<function at remote 0x38ffc08>, get_online=<function at remote 0x38ffa28>, get_game=<function at remote 0x38ffd70>, __gtype__=<gobject.GType at remote...(truncated), 
    arg=arg@entry=('GuestCJWN',), kw=kw@entry=0x0) at /usr/src/debug/Python-2.7.5/Objects/abstract.c:2529
#20 0x00000030a92db6dc in do_call (nk=<optimized out>, na=1, 
pp_stack=0x7fc020e72230, 
    func=<GObjectMeta(__module__='pychess.ic.FICSObjects', bughouse=<property at remote 0x38ed1b0>, set_online=<function at remote 0x38ffaa0>, blitz=<property at remote 0x38ed050>, long_name=<function at remote 0x38ff9b0>, titles=<property(name='titles', default=None, minimum=None, maximum=None, nick='', getter=<function at remote 0x38ffe60>, flags=3, _exc=None, type=<gobject.GType at remote 0x7fc0416d3480>, blurb='', setter=<function at remote 0x38ffed8>) at remote 0x3a9a650>, atomic=<property at remote 0x38ed158>, getRatingMean=<function at remote 0x38f0a28>, __init__=<function at remote 0x38ff938>, suicide=<property at remote 0x38ed2b8>, set_titles=<function at remote 0x38ffed8>, get_titles=<function at remote 0x38ffe60>, set_game=<function at remote 0x38ffde8>, isAdmin=<function at remote 0x38f07d0>, getRatingForCurrentGame=<function at remote 0x38f0b90>, set_status=<function at remote 0x38ffc08>, get_online=<function at remote 0x38ffa28>, get_game=<function at remote 0x38ffd70>, __gtype__=<gobject.GType at remote...(truncated))
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4316
#21 call_function (oparg=<optimized out>, pp_stack=0x7fc020e72230)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4121
#22 PyEval_EvalFrameEx (
    f=f@entry=Frame 0x7fc00110e420, for file /home/gatto/code/hg/pychess/lib/pychess/ic/managers/HelperManager.py, line 95, in on_game_add (self=<HelperManager(helperconn=<FICSConnection(_Thread__ident=140463162472192, hm=<...>, _Thread__started=<_Event(_Verbose__verbose=False, _Event__flag=True, _Event__cond=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0x31f4f50>, acquire=<built-in method acquire of thread.lock object at remote 0x31f4f50>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0x31f4f50>) at remote 0x7fc00807c310>) at remote 0x7fc00807c290>, registred=False, _Thread__initialized=True, conn=<FICSConnection(em=<ErrorManager at remote 0x7fc008085aa0>, _Thread__ident=140462992721664, cm=<ChatManager(channels=[('shout', u'Shout'), ('cshout', u'Chess Shout'), ('0', 'Admins  [restricted to admins]'), ('1', 'Server Help and Assistance'), ('2', 'General discussions about FICS'), ('3', 'FICS programmers'), ('4', 'Guests'), ('5', 'Service Representati...(truncated), 
    throwflag=throwflag@entry=0) at /usr/src/debug/Python-2.7.5/Python/ceval.c:2740
---Type <return> to continue, or q <return> to quit---

Original issue reported on code.google.com by mattgatto on 26 Jun 2014 at 11:41

Attachments:

GoogleCodeExporter commented 9 years ago
After some searching I found this:
http://faq.pygtk.org/index.py?req=show&file=faq20.019.htp

From the link above:
"This error will most likely happen in a threaded application. Make sure you 
have informed gobject you are writing a threaded script/application by calling 
gobject.threads_init() just after importing the gobject module."

So I'm testing a patch which does that.

Original comment by mattgatto on 26 Jun 2014 at 12:28