You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
python -m asyncio ps fails if any task name is longer than 255 characters #157788
One task name longer than 255 characters makes python -m asyncio ps fail for the whole process. The length limit is treated as a validity check instead of a cap.
Traceback (most recent call last):
File "/Users/timofeiivankov/cpython/repro.py", line 10, in <module>
asyncio.run(main())
~~~~~~~~~~~^^^^^^^^
File "/Users/timofeiivankov/cpython/Lib/asyncio/runners.py", line 205, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/Users/timofeiivankov/cpython/Lib/asyncio/runners.py", line 128, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/Users/timofeiivankov/cpython/Lib/asyncio/base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/Users/timofeiivankov/cpython/repro.py", line 8, in main
print(RemoteUnwinder(os.getpid()).get_all_awaited_by())
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
RuntimeError: Invalid string length (256) at 0x101493800
Expected: the call returns and the long name comes back truncated:
Activity
[3.15] gh-157788: Fix python -m asyncio ps failing on long task names (…
[3.14] gh-157788: Fix python -m asyncio ps failing on long task names (…
encukou commentedon Sep 21, 2026
The new test fails on refleaks buildbots, see e.g. https://buildbot.python.org/#/builders/2263/builds/295
deadlovelll commentedon Sep 21, 2026
Thank you! I'll take a look
gh-157788: Fix `test_long_task_name_is_truncated` by not hardcoding m…
[3.15] gh-157788: Fix `test_long_task_name_is_truncated` by not hardc…
[3.14] gh-157788: Fix `test_long_task_name_is_truncated` by not hardc…