Title: Abort in `_interpqueuesmodule` due to queue being created with negative `maxsize` · Issue #135698 · python/cpython · GitHub
Open Graph Title: Abort in `_interpqueuesmodule` due to queue being created with negative `maxsize` · Issue #135698 · python/cpython
X Title: Abort in `_interpqueuesmodule` due to queue being created with negative `maxsize` · Issue #135698 · python/cpython
Description: Crash report What happened? The interpreter will abort when running the following MRE, which creates a queue with maxsize=-1: import _interpqueues _interpqueues.create(-1, 1, 1) _interpqueues.is_full(1) Abort backtrace: python: ./Modules...
Open Graph Description: Crash report What happened? The interpreter will abort when running the following MRE, which creates a queue with maxsize=-1: import _interpqueues _interpqueues.create(-1, 1, 1) _interpqueues.is_fu...
X Description: Crash report What happened? The interpreter will abort when running the following MRE, which creates a queue with maxsize=-1: import _interpqueues _interpqueues.create(-1, 1, 1) _interpqueues.is_fu...
Opengraph URL: https://github.com/python/cpython/issues/135698
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Abort in `_interpqueuesmodule` due to queue being created with negative `maxsize`","articleBody":"# Crash report\n\n### What happened?\n\nThe interpreter will abort when running the following MRE, which creates a queue with `maxsize=-1`:\n\n```python\nimport _interpqueues\n\n_interpqueues.create(-1, 1, 1)\n_interpqueues.is_full(1)\n```\n\nAbort backtrace:\n```shell\npython: ./Modules/_interpqueuesmodule.c:713: _queue_is_full: Assertion `queue->items.count \u003c= queue->items.maxsize' failed.\n\nProgram received signal SIGABRT, Aborted.\n\n#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737350575936) at ./nptl/pthread_kill.c:44\n#1 __pthread_kill_internal (signo=6, threadid=140737350575936) at ./nptl/pthread_kill.c:78\n#2 __GI___pthread_kill (threadid=140737350575936, signo=signo@entry=6) at ./nptl/pthread_kill.c:89\n#3 0x00007ffff7cdf476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26\n#4 0x00007ffff7cc57f3 in __GI_abort () at ./stdlib/abort.c:79\n#5 0x00007ffff7cc571b in __assert_fail_base (fmt=0x7ffff7e7a130 \"%s%s%s:%u: %s%sAssertion `%s' failed.\\n%n\",\n assertion=0x7ffff79dc020 \"queue->items.count \u003c= queue->items.maxsize\", file=0x7ffff79dc000 \"./Modules/_interpqueuesmodule.c\", line=713,\n function=\u003coptimized out>) at ./assert/assert.c:94\n#6 0x00007ffff7cd6e96 in __GI___assert_fail (assertion=assertion@entry=0x7ffff79dc020 \"queue->items.count \u003c= queue->items.maxsize\",\n file=file@entry=0x7ffff79dc000 \"./Modules/_interpqueuesmodule.c\", line=line@entry=713,\n function=function@entry=0x7ffff79dc980 \u003c__PRETTY_FUNCTION__.16> \"_queue_is_full\") at ./assert/assert.c:103\n#7 0x00007ffff79d7aed in _queue_is_full (queue=0x555555de5fa0, p_is_full=p_is_full@entry=0x7fffffffd33c) at ./Modules/_interpqueuesmodule.c:713\n#8 0x00007ffff79d7cde in queue_is_full (queues=queues@entry=0x7ffff79e05a8 \u003c_globals+8>, qid=qid@entry=1,\n p_is_full=p_is_full@entry=0x7fffffffd33c) at ./Modules/_interpqueuesmodule.c:1248\n#9 0x00007ffff79da801 in queuesmod_is_full (self=0x7ffff7ac8590, args=args@entry=0x7ffff7a5bde0, kwds=kwds@entry=0x0)\n at ./Modules/_interpqueuesmodule.c:1803\n#10 0x000055555570b67d in cfunction_call (func=0x7ffff7ac8ad0, args=0x7ffff7a5bde0, kwargs=0x0) at Objects/methodobject.c:565\n#11 0x0000555555689bf1 in _PyObject_MakeTpCall (tstate=tstate@entry=0x555555d6f7c0 \u003c_PyRuntime+331232>, callable=callable@entry=0x7ffff7ac8ad0,\n args=args@entry=0x7fffffffd668, nargs=\u003coptimized out>, keywords=keywords@entry=0x0) at Objects/call.c:242\n#12 0x000055555568a012 in _PyObject_VectorcallTstate (tstate=0x555555d6f7c0 \u003c_PyRuntime+331232>, callable=0x7ffff7ac8ad0, args=0x7fffffffd668,\n nargsf=\u003coptimized out>, kwnames=0x0) at ./Include/internal/pycore_call.h:167\n#13 0x000055555568a03e in PyObject_Vectorcall (callable=callable@entry=0x7ffff7ac8ad0, args=args@entry=0x7fffffffd668, nargsf=\u003coptimized out>,\n kwnames=kwnames@entry=0x0) at Objects/call.c:327\n```\n\nFound using [fusil](https://github.com/devdanzin/fusil) by @vstinner.\n\n### CPython versions tested on:\n\nCPython main branch, 3.15, 3.14\n\n### Operating systems tested on:\n\nLinux\n\n### Output from running 'python -VV' on the command line:\n\nPython 3.15.0a0 (heads/main-dirty:b706ff003c5, Jun 14 2025, 23:08:39) [GCC 11.4.0]\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-135703\n* gh-135724\n* gh-135775\n* gh-135778\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/devdanzin","@type":"Person","name":"devdanzin"},"datePublished":"2025-06-19T02:33:16Z","url":"https://github.com/python/cpython/issues/135698"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1d66ac21-87c8-b253-2e65-ee8efcdc02cc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9642:3A8E64:1E1C55D:27BE582:6B023310 |
| html-safe-nonce | 3084d1e2eb45852542ccb98718457e323bcd36793021b105b00f675f079abec5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjQyOjNBOEU2NDoxRTFDNTVEOjI3QkU1ODI6NkIwMjMzMTAiLCJ2aXNpdG9yX2lkIjoiNzA4NjI4NTkwOTQ3MzI0MzkyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cb5346c18ec99e5481057a5da26fef1e2b93fc64438ec4e6127ddb9dde102608 |
| hovercard-subject-tag | issue:3158693719 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/135698/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ad31bbf3208b888a430db21ada5f9586c37c684fa1f19472845d3d6dc373b2b0/python/cpython/issues/135698 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ad31bbf3208b888a430db21ada5f9586c37c684fa1f19472845d3d6dc373b2b0/python/cpython/issues/135698 |
| og:image:alt | Crash report What happened? The interpreter will abort when running the following MRE, which creates a queue with maxsize=-1: import _interpqueues _interpqueues.create(-1, 1, 1) _interpqueues.is_fu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | devdanzin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width