Title: test_perf_profiler cores periodically on macOS/aarch64 · Issue #149156 · python/cpython · GitHub
Open Graph Title: test_perf_profiler cores periodically on macOS/aarch64 · Issue #149156 · python/cpython
X Title: test_perf_profiler cores periodically on macOS/aarch64 · Issue #149156 · python/cpython
Description: Crash report What happened? When running test_perf_profiler, the subprocess fails with what appears to be a bad memory access. This doesn't happen every time, maybe 1 in 5 runs. I can't tell if it's load related (It doesn't seem to be fr...
Open Graph Description: Crash report What happened? When running test_perf_profiler, the subprocess fails with what appears to be a bad memory access. This doesn't happen every time, maybe 1 in 5 runs. I can't tell if it'...
X Description: Crash report What happened? When running test_perf_profiler, the subprocess fails with what appears to be a bad memory access. This doesn't happen every time, maybe 1 in 5 runs. I can't tel...
Opengraph URL: https://github.com/python/cpython/issues/149156
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_perf_profiler cores periodically on macOS/aarch64","articleBody":"# Crash report\n\n### What happened?\n\nWhen running `test_perf_profiler`, the subprocess fails with what appears to be a bad memory access. \n\nThis doesn't happen every time, maybe 1 in 5 runs. I can't tell if it's load related (It doesn't seem to be from my extremely unscientific testing), but it does happen when running only this test suite (ie test_perf_profiler), or all the Python tests in parallel. I've also seen this happen on the MacOS build bots. \n\nThis build was configured as such -\n```\n/Volumes/devel/src/cpython-fixes/configure --with-assertions --with-pydebug --enable-safety --enable-slower-safety CC=`basename $CC`\n```\nNote that the build tree (and thus cwd when running the tests) is completely outside of the source tree (I doubt this makes a difference, but who knows).\n\n```python\n% ./python -m test test_perf_profiler --header\nRaised RLIMIT_NOFILE: 256 -\u003e 1024\n== CPython 3.15.0a8+ (heads/main:4a5d25c26c0, Apr 29 2026, 16:33:39) [Clang 22.1.4 ]\n== macOS-26.4.1-arm64-arm-64bit-Mach-O little-endian\n== Python build: debug\n== cwd: /Volumes/devel/build/cpython-fixes.debug/build/test_python_worker_55492æ\n== CPU count: 12\n== encodings: locale=UTF-8 FS=utf-8\n== resources: all test resources are disabled, use -u option to unskip tests\n\nUsing random seed: 1637940672\n0:00:00 load avg: 3.66 Run 1 test sequentially in a single process\n0:00:00 load avg: 3.66 [1/1] test_perf_profiler\ntest test_perf_profiler failed -- Traceback (most recent call last):\n File \"/Volumes/devel/src/cpython-fixes/Lib/test/test_perf_profiler.py\", line 145, in test_trampoline_works_with_forks\n self.assertEqual(process.returncode, 0)\n ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError: 139 != 0\n\n0:00:02 load avg: 3.61 [1/1/1] test_perf_profiler failed (1 failure)\n\n== Tests result: FAILURE ==\n\n1 test failed:\n test_perf_profiler\n\nTotal duration: 2.5 sec\nTotal tests: run=14 failures=1 skipped=5\nTotal test files: run=1/1 failed=1\nResult: FAILURE\n```\n\nI codesigned the python binary for coredumping so was able to obtain this stack trace -\n\n```\n% lldb --core /cores/core.55510 ./python\n(lldb) target create \"./python\" --core \"/cores/core.55510\"\nbt\nCore file '/cores/core.55510' (arm64) was loaded.\n(lldb) bt\n* thread #1, stop reason = ESR_EC_IABORT_EL0 (fault address: 0x10510f84c)\n * frame #0: 0x000000010510f84c\n frame #1: 0x000000010510f84c\n frame #2: 0x0000000104a4f4d0 python`py_trampoline_evaluator(ts=0x0000000104d8a360, frame=0x0000000105104140, throw=0) at perf_trampoline.c:450:12\n frame #3: 0x00000001049062e4 python`_PyEval_EvalFrame(tstate=0x0000000104d8a360, frame=0x0000000105104140, throwflag=0) at pycore_ceval.h:120:12\n frame #4: 0x0000000104906208 python`_PyEval_Vector(tstate=0x0000000104d8a360, func=0x0000000109af9790, locals=0x0000000000000000, args=0x000000016b7f2a88, argcount=0, kwnames=0x0000000000000000) at ceval.c:2124:12\n frame #5: 0x00000001046f158c python`_PyFunction_Vectorcall(func=0x0000000109af9790, stack=0x000000016b7f2a88, nargsf=9223372036854775808, kwnames=0x0000000000000000) at call.c:413:16\n frame #6: 0x00000001046efd80 python`_PyObject_VectorcallTstate(tstate=0x0000000104d8a360, callable=0x0000000109af9790, args=0x000000016b7f2a88, nargsf=9223372036854775808, kwnames=0x0000000000000000) at pycore_call.h:144:11\n frame #7: 0x00000001046f112c python`PyObject_Vectorcall(callable=0x0000000109af9790, args=0x000000016b7f2a88, nargsf=9223372036854775808, kwnames=0x0000000000000000) at call.c:327:12\n frame #8: 0x0000000104906820 python`_Py_VectorCallInstrumentation_StackRefSteal(callable=(bits = 4457469840), arguments=0x0000000105104140, total_args=0, kwnames=(bits = 1), call_instrumentation=false, frame=0x00000001051040e0, this_instr=0x0000000109c1576e, tstate=0x0000000104d8a360) at ceval.c:775:11\n frame #9: 0x000000010490e18c python`_PyEval_EvalFrameDefault(tstate=0x0000000104d8a360, frame=0x00000001051040e0, throwflag=0) at generated_cases.c.h:1846:35\n(lldb) ^D\n\n```\n\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nmacOS\n\n### Output from running 'python -VV' on the command line:\n\nPython 3.15.0a8+ (heads/main:4a5d25c26c0, Apr 29 2026, 16:33:39) [Clang 22.1.4 ]\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-150347\n* gh-150392\n* gh-150393\n* gh-150394\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/neek78","@type":"Person","name":"neek78"},"datePublished":"2026-04-29T14:44:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/149156/cpython/issues/149156"}
| 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:e24f63b8-26b6-4cd1-dc70-20def9f213ca |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB2E:29798E:53B853:708131:6A523501 |
| html-safe-nonce | 9b18f097be2574ee95bd5cd25ab5d5127391abe75c660e450591e684036ce9bd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjJFOjI5Nzk4RTo1M0I4NTM6NzA4MTMxOjZBNTIzNTAxIiwidmlzaXRvcl9pZCI6Ijk0Mjk4MTUzNzg2NzExNzgyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ae39e909ec9bc99a0be0a1da6cd5527472d77f9b8fce4e626d4d3dbc0304f228 |
| hovercard-subject-tag | issue:4351442825 |
| 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/149156/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6c6a0b7cfca064d42e74b1506bd4155b806111aba611b7777ec278d023baa08d/python/cpython/issues/149156 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6c6a0b7cfca064d42e74b1506bd4155b806111aba611b7777ec278d023baa08d/python/cpython/issues/149156 |
| og:image:alt | Crash report What happened? When running test_perf_profiler, the subprocess fails with what appears to be a bad memory access. This doesn't happen every time, maybe 1 in 5 runs. I can't tell if it'... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | neek78 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width