[issue7494] _lsprof (cProfile): Profiler.clear() keeps references to detroyed nodes
STINNER Victor victor.stin...@haypocalc.com added the comment: Fixed by r78641 (trunk) Backport done: r79200 (2.6). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7494] _lsprof (cProfile): Profiler.clear() keeps references to detroyed nodes
STINNER Victor victor.stin...@haypocalc.com added the comment: Sorry, but I'm unable to write a reliable unit test. You have to trust me: the patch fixes the issue and the issue does exist :-) Fixed by r78641 (trunk), r78642 (py3k), r78643 (3.1). Leave this issue open until the fix can be backported to 2.6 (after 2.6.5 release). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7494] _lsprof (cProfile): Profiler.clear() keeps references to detroyed nodes
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +alexandre.vassalotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7494] _lsprof (cProfile): Profiler.clear() keeps references to detroyed nodes
New submission from STINNER Victor victor.stin...@haypocalc.com: clearEntries() delete all nodes of the profiler tree, but currentProfilerContext keeps a reference to a tree node (currentProfilerContext-previous-header attribute). The patch fixes clearEntries() to delete all references (destroy currentProfilerContext and set it to NULL). -- components: Extension Modules files: _lsprof.patch keywords: patch messages: 96346 nosy: haypo severity: normal status: open title: _lsprof (cProfile): Profiler.clear() keeps references to detroyed nodes type: crash versions: Python 2.7 Added file: http://bugs.python.org/file15543/_lsprof.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7494] _lsprof (cProfile): Profiler.clear() keeps references to detroyed nodes
STINNER Victor victor.stin...@haypocalc.com added the comment: The crash is an Heisenbug (read object which just has been destroyed, sometimes it works, sometimes it crash), so it's not easy the write a short example showing the crash. The code looks like: import cProfile prof = cProfile.Profile() prof.enable() prof.clear() The next instruction will be analyzed by the profiler, but the profiler will crash in: ptrace_enter_call()-initContext()-getSubEntry()- Rotating_Tree_Get(caller-calls, entry), because caller-calls node is invalid. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7494] _lsprof (cProfile): Profiler.clear() keeps references to detroyed nodes
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #3952. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com