Skip to content
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

AssertionError when disabling vmprof #191

Open
plocharz-9livesdata opened this issue Feb 5, 2019 · 5 comments
Open

AssertionError when disabling vmprof #191

plocharz-9livesdata opened this issue Feb 5, 2019 · 5 comments

Comments

@plocharz-9livesdata
Copy link

plocharz-9livesdata commented Feb 5, 2019

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.

@plocharz-9livesdata
Copy link
Author

Bug was introduced between versions 0.4.3 and 0.4.12

@timpalpant
Copy link
Contributor

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'")

@timpalpant
Copy link
Contributor

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'")

@timpalpant
Copy link
Contributor

I suspect something in bb40a68, since it introduced a substantially different implementation for writing out the code objects.

@gerasimovalexander
Copy link

gerasimovalexander commented Oct 27, 2022

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'")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants