vmprof-python
vmprof-python copied to clipboard
AssertionError when disabling vmprof
Following assertion is thrown once every 100 or so executions:
>> File "site-packages/vmprof/__init__.py", line 38, in disable
>> File "site-packages/vmprof/reader.py", line 294, in read_all
>>AssertionError: (26820, "b'/'")
vmprof is enabled and disabled by http request to flask application.
Bug was introduced between versions 0.4.3 and 0.4.12
I have also seen this. Don't have an easy repro but willing to investigate if anyone has ideas
vmprof.disable()
File "vmprof/__init__.py", line 38, in disable
l.read_all()
File "vmprof/reader.py", line 294, in read_all
assert not marker, (fileobj.tell(), repr(marker))
AssertionError: (204679, "'y'")
Here's an example where we hit it on Travis in test_line_profiling
: https://ci.appveyor.com/project/antocuni/vmprof-python/builds/26541234/job/c2u3veh8ex8v8urv
> assert not marker, (fileobj.tell(), repr(marker))
529E AssertionError: (422, "b'\\x00'")
I suspect something in bb40a6873669ed414817f87b4a0cde5d5b90af82, since it introduced a substantially different implementation for writing out the code objects.
is this going any further? the issue is still forcing me to install version 0.4.2 and make dirty workarounds in _vmprof.enable
arguments to keep it work with latest PyPy
vmprof.disable()
File "/home/lib/pypy3.9/site-packages/vmprof/__init__.py", line 38, in disable
l.read_all()
File "/home/lib/pypy3.9/site-packages/vmprof/reader.py", line 294, in read_all
assert not marker, (fileobj.tell(), repr(marker))
AssertionError: (7459042, "b'\\x00'")