New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
profiler: Bad return and Bad call errors with exceptions #41539
Comments
I ran into a weird error when trying to profile a test I managed to whittle it down to some minimal test $ python-cvs -m profile profile_badcall.py
Traceback (most recent call last):
[snipped ...]
File
"/home/donut/usr64/python/lib/python2.5/profile.py",
line 444, in runctx
exec cmd in globals, locals
File "<string>", line 1, in ?
File "profile_badcall.py", line 10, in ?
os.path.join("C",'b')
File
"/home/donut/usr64/python/lib/python2.5/posixpath.py",
line 56, in join
def join(a, *p):
File
"/home/donut/usr64/python/lib/python2.5/profile.py",
line 228, in trace_dispatch_i
if self.dispatch[event](self, frame, t):
File
"/home/donut/usr64/python/lib/python2.5/profile.py",
line 285, in trace_dispatch_call
assert (self.cur is None or \
AssertionError: ('Bad call', ('profile_badcall.py', 2,
'trier'))
$ python-cvs -m profile profile_badreturn.py
Traceback (most recent call last):
[snipped...]
File
"/home/donut/usr64/python/lib/python2.5/profile.py",
line 444, in runctx
exec cmd in globals, locals
File "<string>", line 1, in ?
File
"/home/donut/usr64/python/lib/python2.5/profile.py",
line 228, in trace_dispatch_i
if self.dispatch[event](self, frame, t):
File
"/home/donut/usr64/python/lib/python2.5/profile.py",
line 312, in trace_dispatch_return
assert frame is self.cur[-2].f_back, ("Bad return",
self.cur[-3])
AssertionError: ('Bad return', ('profile_badreturn.py',
1, 'trier')) The errors occur in python CVS as of 20050206 and |
Logged In: YES Is there any news on this bug? It is possibly preventing |
Logged In: YES I still see this in current python 2.4, but not in current Also, hotshot seems to work ok in 2.4 and CVS. OS: ubuntu breezy (5.10) |
Logged In: YES I've run into this bug too and decided to check the test
Traceback (most recent call last):
File "c:\Python24\lib\profile.py", line 611, in ?
run('execfile(%r)' % (sys.argv[0],), options.outfile,
options.sort)
File "c:\Python24\lib\profile.py", line 72, in run
prof = prof.run(statement)
File "c:\Python24\lib\profile.py", line 448, in run
return self.runctx(cmd, dict, dict)
File "c:\Python24\lib\profile.py", line 454, in runctx
exec cmd in globals, locals
File "<string>", line 1, in ?
File "profile_badreturn.py", line 9, in ?
sum(1,0)
TypeError: iteration over non-sequence Python versions used: Python 2.4.1 (#1, May 27 2005, 18:02:40) Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit |
Logged In: YES This bug was fixed by the following check-in: http://mail.python.org/pipermail/python-checkins/2005- It should be closed. A work-around for people using older from profile import Profile
Profile.dispatch['c_exception'] = \
Profile.trace_dispatch_return |
Ping to close this? |
With pleasure. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: