David Butler <croe...@gmail.com> added the comment:

sorry for the delay, I had to wait until the problem occurred again...

I gdb'ed into the process again, the backtrace is a little different this 
time...

(gdb) bt
#0  0xb76adfc6 in update_refs (containers=<optimized out>) at 
Modules/gcmodule.c:292
#1  collect (generation=2) at Modules/gcmodule.c:873
#2  0xb76ae5e3 in collect_generations () at Modules/gcmodule.c:996
#3  _PyObject_GC_Malloc (basicsize=16) at Modules/gcmodule.c:1457
#4  0xb76ae684 in _PyObject_GC_New (tp=0xb76f6aa0) at Modules/gcmodule.c:1467
#5  0xb761a8bd in list_iter (seq=
    [((None, u'to'), u'aves.rule'), ((None, u'rel'), u'ManyToOneRel'), ((None, 
u'name'), u'rule')]) at Objects/listobject.c:2873
#6  0xb75eef45 in PyObject_GetIter (o=
    [((None, u'to'), u'aves.rule'), ((None, u'rel'), u'ManyToOneRel'), ((None, 
u'name'), u'rule')]) at Objects/abstract.c:3083
#7  0xb7680f35 in PyEval_EvalFrameEx (f=
    Frame 0x9bcc0c4, for file /usr/lib/python2.7/xml/dom/pulldom.py, line 88, 
in startElementNS (self=<PullDOM(documentFactory=<DOMImplementation() at remote 
0x9c217cc>, _ns_contexts=[{'http://www.w3.org/XML/1998/namespace': 'xml'}], 
pending_events=None, _current_context={...}, 
elementStack=[<Document(implementation=<...>, _elem_info={}, doctype=None, 
_id_search_stack=None, childNodes=<NodeList at remote 0xa2fac6c>, _id_cache={}) 
at remote 0xa2fac4c>, <Element(ownerDocument=<...>, nodeName=u'django-objects', 
nextSibling=None, parentNode=<...>, namespaceURI=None, prefix=None, 
_attrsNS={(None, u'version'): <Attr(ownerDocument=<...>, nodeName=u'version', 
ownerElement=<...>, value=u'1.0', namespaceURI=None, prefix=None, 
nodeValue=u'1.0', childNodes=<NodeList at remote 0xa2faccc>, name=u'version') 
at remote 0xa2facac>}, tagName=u'django-objects', childNodes=<NodeList at 
remote 0xa2fabcc>, _attrs={u'version': <...>}) at remote 0xa2faa8c>, 
<Element(ownerDocument=<...>, nodeName=u'object', n
 amespaceURI=None, prefix=None,...(truncated), throwflag=0) at 
Python/ceval.c:2483
#8  0xb768189a in fast_function (nk=<optimized out>, na=<optimized out>, 
n=<optimized out>, 
    pp_stack=<optimized out>, func=<optimized out>) at Python/ceval.c:4099
#9  call_function (oparg=<optimized out>, pp_stack=<optimized out>) at 
Python/ceval.c:4034
#10 PyEval_EvalFrameEx (f=
    Frame 0x9ed8f74, for file /usr/lib/python2.7/xml/sax/expatreader.py, line 
338, in start_element_ns (self=<ExpatParser(_namespaces=1, 
_parser=<pyexpat.xmlparser at remote 0xa22fe2c>, _external_ges=1, 
_source=<InputSource(_InputSource__charfile=None, _InputSource__bytefile=None, 
_InputSource__public_id=None, _InputSource__system_id=None, 
_InputSource__encoding=None) at remote 0xa2fabac>, _decl_handler_prop=None, 
_bufsize=65516, _cont_handler=<PullDOM(documentFactory=<DOMImplementation() at 
remote 0x9c217cc>, _ns_contexts=[{'http://www.w3.org/XML/1998/namespace': 
'xml'}], pending_events=None, _current_context={...}, 
elementStack=[<Document(implementation=<...>, _elem_info={}, doctype=None, 
_id_search_stack=None, childNodes=<NodeList at remote 0xa2fac6c>, _id_cache={}) 
at remote 0xa2fac4c>, <Element(ownerDocument=<...>, nodeName=u'django-objects', 
nextSibling=None, parentNode=<...>, namespaceURI=None, prefix=None, 
_attrsNS={(None, u'version'): <Attr(ownerDocument=<...>, nodeName=u've
 rsion', ownerElement=<...>, va...(truncated), throwflag=0) at 
Python/ceval.c:2666
#11 0xb7683508 in PyEval_EvalCodeEx (co=0x9dd6c80, globals=
    {'SAXNotRecognizedException': <type at remote 0x9c6967c>, 'expat': <module 
at remote 0x96cbd94>, '__name__': 'xml.sax.expatreader', 
'feature_namespace_prefixes': 'http://xml.org/sax/features/namespace-prefixes', 
'AttributesNSImpl': <classobj at remote 0x9d8db0c>, 'feature_string_interning': 
'http://xml.org/sax/features/string-interning', '__package__': 'xml.sax', 
'versi---Type <return> to continue, or q <return> to quit---step
on': '0.20', 'AttributesImpl': <classobj at remote 0x9d8dadc>, 
'feature_namespaces': 'http://xml.org/sax/features/namespaces', '__doc__': 
"\nSAX driver for the pyexpat C module.  This driver works 
with\npyexpat.__version__ == '2.22'.\n", 'feature_validation': 
'http://xml.org/sax/features/validation', 'create_parser': <function at remote 
0x9ddba74>, '__builtins__': {'bytearray': <type at remote 0xb76ed660>, 
'IndexError': <type at remote 0xb76f1520>, 'all': <built-in function all>, 
'help': <_Helper at remote 0xb73643ac>, 'vars': <built-in function vars>, 
'SyntaxError': <type at remote 0xb76f11a0>, 'unicode': <type at remote 
0xb7701340>, 'UnicodeD...(truncated), locals=0x0, args=0x9d94510, argcount=3, 
kws=0x0, kwcount=0, defs=0x0, defcount=0, 
    closure=0x0) at Python/ceval.c:3253
#12 0xb7614f2a in function_call (func=<function at remote 0x9dd502c>, arg=
    (<ExpatParser(_namespaces=1, _parser=<pyexpat.xmlparser at remote 
0xa22fe2c>, _external_ges=1, _source=<InputSource(_InputSource__charfile=None, 
_InputSource__bytefile=None, _InputSource__public_id=None, 
_InputSource__system_id=None, _InputSource__encoding=None) at remote 
0xa2fabac>, _decl_handler_prop=None, _bufsize=65516, 
_cont_handler=<PullDOM(documentFactory=<DOMImplementation() at remote 
0x9c217cc>, _ns_contexts=[{'http://www.w3.org/XML/1998/namespace': 'xml'}], 
pending_events=None, _current_context={...}, 
elementStack=[<Document(implementation=<...>, _elem_info={}, doctype=None, 
_id_search_stack=None, childNodes=<NodeList at remote 0xa2fac6c>, _id_cache={}) 
at remote 0xa2fac4c>, <Element(ownerDocument=<...>, nodeName=u'django-objects', 
nextSibling=None, parentNode=<...>, namespaceURI=None, prefix=None, 
_attrsNS={(None, u'version'): <Attr(ownerDocument=<...>, nodeName=u'version', 
ownerElement=<...>, value=u'1.0', namespaceURI=None, prefix=None, 
nodeValue=u'1.0', childNodes=<
 NodeList at remote 0xa2faccc>,...(truncated), kw=0x0) at 
Objects/funcobject.c:526

--- truncated ---

(gdb) b collect
Breakpoint 1 at 0xb76ade3c: file Modules/gcmodule.c, line 822.
(gdb) cont
Continuing.

( here i let it run for a about a minute )

^C
Program received signal SIGINT, Interrupt.
0xb76adfcb in update_refs (containers=<optimized out>) at Modules/gcmodule.c:290
290     in Modules/gcmodule.c
(gdb) print gc
$1 = (PyGC_Head *) 0xb770df00
(gdb) step
292     in Modules/gcmodule.c
(gdb) info locals
gc = 0xb770df00
(gdb) step
290     in Modules/gcmodule.c
(gdb) info locals
gc = 0xb770df00

I was going to leave the process running, and the debugger up, but I forgot 
that a reboot script was still enabled, and it caused the machine to reboot... 
so i am recompiling python with CFLAGS="-O0 ..." to try to fix some "value 
optimized out" issue in gdb... need to try to figure out what object its 
getting caught on... 

Could this be caused by one of the loadable libraries that I am importing? ( 
pyside, psycopg2, ... ) and one of those is making an object that isn't playing 
nice with the gc?

Also, I have attached a histogram of the cpu usage

I'll try to answer more of your questions when it happens next

----------
Added file: http://bugs.python.org/file24054/cpu_usage.png

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13616>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to