GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — `_remote_debugging`: binary format only `total_samples:u32` · Issue #151292 · python/cpython Closed Labels extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-profilingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:The binary format defines cpython/Modules/_remote_debugging/binary_io.h Line 269 in 540b3d0
cpython/Modules/_remote_debugging/binary_io.h Lines 53 to 54 in 540b3d0
That's not that much... With just 100khz:
especially if we aim for continous profiling of real production systems. But even of macOS, I'm observing ~0.5-1MHz on my To make matters worse, since #150349 it results in as the header is written on finalize:
cpython/Modules/_remote_debugging/binary_io_writer.c Lines 1196 to 1223 in 540b3d0
To put aside that Other fields seem to be fine, but need a double check here. I think that rotating files is a stop gap, and we need chunking. Reproduction(as a part of routine stress tests of maurycy#3) [130] 2026-06-10T23:35:58.225891000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (vmremap 92ad857*?) % sudo ./python.exe -m profiling.sampling run --binary -r 1000khz -d 25000 -o /tmp/overflow.bin --realtime-stats busywork.py Stats: 647,833.9Hz (1.5µs) Min: 615,379.9Hz Max: 705,712.7Hz N=4294631818 Cache: 100.0% (4294631818+0/1)Traceback (most recent call last): File "<frozen runpy>", line 201, in _run_module_as_main File "<frozen runpy>", line 87, in _run_code File "/Users/maurycy/src/github.com/maurycy/cpython/Lib/profiling/sampling/__main__.py", line 65, in <module> main() ~~~~^^ File "/Users/maurycy/src/github.com/maurycy/cpython/Lib/profiling/sampling/cli.py", line 977, in main _main() ~~~~~^^ File "/Users/maurycy/src/github.com/maurycy/cpython/Lib/profiling/sampling/cli.py", line 1133, in _main handler(args) ~~~~~~~^^^^^^ File "/Users/maurycy/src/github.com/maurycy/cpython/Lib/profiling/sampling/cli.py", line 1280, in _handle_run collector = sample( process.pid, ...<9 lines>... blocking=args.blocking, ) File "/Users/maurycy/src/github.com/maurycy/cpython/Lib/profiling/sampling/sample.py", line 504, in sample profiler.sample(collector, duration_sec, async_aware=async_aware) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/maurycy/src/github.com/maurycy/cpython/Lib/profiling/sampling/sample.py", line 167, in sample raise e from None File "/Users/maurycy/src/github.com/maurycy/cpython/Lib/profiling/sampling/sample.py", line 155, in sample collector.collect(stack_frames) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ File "/Users/maurycy/src/github.com/maurycy/cpython/Lib/profiling/sampling/binary_collector.py", line 84, in collect self._writer.write_sample(stack_frames, timestamp_us) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OverflowError: too many samples for binary format [1] 2026-06-11T01:47:42.249903000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (vmremap cd5a675*?) % def hot_a(n): return sum(i * i for i in range(n)) def hot_b(n): return sum(i + i for i in range(n)) def worker(): while True: hot_a(6_000_000) hot_b(6_000_000) worker() CPython versions tested on:CPython main branch Operating systems tested on:macOS Linked PRs
Activity
MetadataMetadataAssigneesLabelsextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-profilingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402520 — 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. |