Skip to content

AssertionError when disabling vmprof #191

Open

Description

@plocharz-9livesdata

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.

Activity

  1. plocharz-9livesdata commented on Feb 11, 2019

    @plocharz-9livesdata
    Author

    Bug was introduced between versions 0.4.3 and 0.4.12

  2. timpalpant commented on Jul 9, 2019

    @timpalpant
    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'")
    
  3. timpalpant commented on Aug 7, 2019

    @timpalpant
    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'")
    
  4. timpalpant commented on Aug 7, 2019

    @timpalpant
    Contributor

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

  5. gerasimovalexander commented on Oct 27, 2022

    @gerasimovalexander

    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'")
    
  6. mattip commented on Sep 14, 2026

    @mattip
    Contributor

    Is this still reproducible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions