GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `bm_tornado_http` crashes on PyPy 3.11: "BufferError: Existing exports of data: object cannot be re-sized" · Issue #510 · python/pyperformance

bm_tornado_http crashes on PyPy 3.11: "BufferError: Existing exports of data: object cannot be re-sized" #510

New issue
Copy link
New issue
Copy link
Closed
Closed
bm_tornado_http crashes on PyPy 3.11: "BufferError: Existing exports of data: object cannot be re-sized"#510
Copy link

Description

@sendaoYan
sendaoYan
opened on Nov 9, 2026
Issue body actions

Bug report

Benchmark: tornado_http
Interpreter: PyPy 3.11 (3.11.17) — CPython is unaffected
pyperformance version: 1.14.0
tornado version: 6.5.2
Environment: GitHub Actions ubuntu-latest, matrix entry python: pypy-3.11

Description

Running python -m pyperformance run -b all --debug-single-value (what the
test_run_and_show test does in CI) fails only on PyPy because bm_tornado_http
dies:

1 benchmarks failed:
- tornado_http (Benchmark died)

The benchmark crashes with BufferError: Existing exports of data: object cannot be re-sized, raised from tornado's IOStream._consume where del self._read_buffer[:loc] resizes a buffer that PyPy considers to still have an
active export. tornado then closes the connection, the client sees
HTTPStreamClosedError: Stream closed, and the benchmark process exits non-zero.

Traceback

File ".../tornado/iostream.py", line 993, in _consume
    del self._read_buffer[:loc]
BufferError: Existing exports of data: object cannot be re-sized
Uncaught exception, closing connection.
...
File ".../bm_tornado_http/run_benchmark.py", line 74, in run_client
tornado.simple_httpclient.HTTPStreamClosedError: Stream closed
...
RuntimeError: Benchmark died

Reproducibility

Not a flake — it reproduces on every pypy-3.11 CI run. Both a recent pull-request
run and the main branch run fail identically on tornado_http, so this is
independent of any in-flight change.

Notes

  • BufferError: Existing exports of data: object cannot be re-sized is a PyPy
    buffer-protocol behavior: slice-deleting a buffer that still has an active
    export (e.g. a memoryview) is rejected, where CPython does not enforce it here.
  • Existing issues version 0.8.0 - tornado_http with --track-memory does not terminate #53 ("tornado_http with --track-memory does not terminate"),
    tornado fails with 3.8.0b2 on Windows #61 ("tornado fails with 3.8.0b2 on Windows") and Django and Tornado benchmarks broken on Python 3.9 #76 ("Django and Tornado
    benchmarks broken on Python 3.9") are different problems.

Activity

  1. sendaoYan commented on Nov 9, 2026

    @sendaoYan
    sendaoYan
    on Nov 9, 2026
    ContributorAuthor
    More actions

    This should be fixed now.

    The crash comes from IOStream._consume() resizing _read_buffer while a
    temporary memoryview of it is still alive. PyPy 8.0 enforces this rule like
    CPython but does not release the temporary view until garbage collection, so
    del self._read_buffer[:loc] raises BufferError: Existing exports of data: object cannot be re-sized.

    tornado fixed this in 6.6.0 via tornadoweb/tornado#3750 ("iostream: Release
    memoryviews explicitly for PyPy 8.0 compatibility"; see also #3756 and #3757).

    In pyperformance, #502 bumped
    pyperformance/data-files/benchmarks/bm_tornado_http/requirements.txt from
    tornado==6.5.2 to tornado==6.6, so the benchmark now runs on a fixed
    tornado. CI confirms it: the pypy-3.11 job on main installs tornado==6.6,
    runs [84/91] tornado_http... successfully, and is green (e.g. run
    42538627568).

    Closing as fixed by #502 — feel free to reopen if it resurfaces.

  2. sendaoYan
    closed this as completedon Nov 9, 2026
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.