| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
🤖 New build scheduled with the buildbot fleet by @corona10 for commit 2649e2b 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F159112%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
Upgrade mimalloc from v2.1.2 to v2.5.2 as-is from upstream. v2.1.2: https://github.com/microsoft/mimalloc/releases/tag/v2.1.2 v2.5.2: https://github.com/microsoft/mimalloc/releases/tag/v2.5.2
|
🤖 New build scheduled with the buildbot fleet by @corona10 for commit f81e6c2 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F159112%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
|
@mpage, could you trigger a free-threading benchmark for this change? :) |
Sorry, something went wrong.
Documentation build overview85 files changed · ± 85 modified ± Modified |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @corona10 for commit 222601b 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F159112%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
|
I will fix MSAN later: ==11983==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x55e368c48377 in _mi_random_next /home/runner/work/cpython/cpython/Objects/mimalloc/random.c:158:3
#1 0x55e368c48377 in _mi_heap_random_next /home/runner/work/cpython/cpython/Objects/mimalloc/heap.c:281:10
#2 0x55e368c48377 in mi_heap_main_init /home/runner/work/cpython/cpython/Objects/mimalloc/init.c:220:29
#3 0x55e368c49eaf in _mi_auto_process_init /home/runner/work/cpython/cpython/Objects/mimalloc/init.c:568:3
#4 0x7f8aa762aa53 in __libc_start_main (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2aa53) (BuildId: 4ec69afdf3da96ce7388640dcd27c6d0c1b256ef)
#5 0x55e36886ee24 in _start (/home/runner/work/cpython/cpython/Programs/_freeze_module+0xb4e24) (BuildId: 5e5dc085937d530e3b49b31b09d53deb8664a51d)
Uninitialized value was stored to memory at
#0 0x55e368c8b8a0 in chacha_block /home/runner/work/cpython/cpython/Objects/mimalloc/random.c:67:20
#1 0x55e368c47beb in chacha_next32 /home/runner/work/cpython/cpython/Objects/mimalloc/random.c:83:5
#2 0x55e368c47beb in _mi_random_next /home/runner/work/cpython/cpython/Objects/mimalloc/random.c:154:22
#3 0x55e368c47beb in _mi_heap_random_next /home/runner/work/cpython/cpython/Objects/mimalloc/heap.c:281:10
#4 0x55e368c47beb in mi_heap_main_init /home/runner/work/cpython/cpython/Objects/mimalloc/init.c:220:29
#5 0x55e368c49eaf in _mi_auto_process_init /home/runner/work/cpython/cpython/Objects/mimalloc/init.c:568:3
#6 0x7f8aa762aa53 in __libc_start_main (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2aa53) (BuildId: 4ec69afdf3da96ce7388640dcd27c6d0c1b256ef)
#7 0x55e36886ee24 in _start (/home/runner/work/cpython/cpython/Programs/_freeze_module+0xb4e24) (BuildId: 5e5dc085937d530e3b49b31b09d53deb8664a51d)
Uninitialized value was stored to memory at
#0 0x55e368c5d150 in chacha_init /home/runner/work/cpython/cpython/Objects/mimalloc/random.c:109:23
#1 0x55e368c5d150 in mi_random_init_ex /home/runner/work/cpython/cpython/Objects/mimalloc/random.c:201:3
#2 0x55e368c47b57 in _mi_random_init /home/runner/work/cpython/cpython/Objects/mimalloc/random.c:205:3
#3 0x55e368c47b57 in mi_heap_main_init /home/runner/work/cpython/cpython/Objects/mimalloc/init.c:218:7
#4 0x55e368c49eaf in _mi_auto_process_init /home/runner/work/cpython/cpython/Objects/mimalloc/init.c:568:3
#5 0x7f8aa762aa53 in __libc_start_main (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2aa53) (BuildId: 4ec69afdf3da96ce7388640dcd27c6d0c1b256ef)
#6 0x55e36886ee24 in _start (/home/runner/work/cpython/cpython/Programs/_freeze_module+0xb4e24) (BuildId: 5e5dc085937d530e3b49b31b09d53deb8664a51d)
Uninitialized value was created by an allocation of 'key' in the stack frame
#0 0x55e368c5cbad in mi_random_init_ex /home/runner/work/cpython/cpython/Objects/mimalloc/random.c:181:3
SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/runner/work/cpython/cpython/Objects/mimalloc/random.c:158:3 in _mi_random_next
Exiting
|
Sorry, something went wrong.
Most of the previous downstream changes were upstreamed in mimalloc v2.1.3 - v2.1.7 (heap tags, _mi_heap_init/_mi_tld_init, MI_PRIM_THREAD_ID, sub-processes, heap walk optimizations, platform fixes) and are dropped. Remaining CPython-specific changes, all marked with a "CPython" comment: - QSBR delayed page freeing for free-threaded builds (pythongh-115103, pythongh-145615): mi_page_t/mi_heap_t fields and _PyMem_mi_* hooks in page.c, heap.c and segment.c. - debug_offset: preserve the first bytes of a PyObject (ob_tid, refcount fields) when filling freed or uninitialized memory in debug builds (pythongh-115491). - Atomic mi_block_t.next loads/stores to avoid TSAN reports (pythongh-129748). - Relax the owning thread assertion in _mi_free_delayed_block for free-threaded builds, since the GC traverses heaps of other threads. - Call _mi_heap_delayed_free_partial() in mi_heap_visit_blocks() (pythongh-112532). - Only count reclaimed pages up to MI_MEDIUM_OBJ_SIZE_MAX as a "right page" in mi_segment_reclaim (pythongh-115103). - Rename the weak _ZSt15get_new_handlerv symbol and disable the mi_is_in_heap_region debug warning. - Zero-initialize _mi_page_empty instead of a positional initializer.
|
🤖 New build scheduled with the buildbot fleet by @corona10 for commit 8b9cb49 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F159112%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
|
@corona10 - Kicked off another run. Fingers crossed this one works. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Okay benchmark result now looks good to me since there is no significant change fork: corona10 ref: gh_159111 machine: linux-x86_64 commit hash: 8b9cb49 commit date: 2026-10-13 overall geometric mean: 1.003x faster HPT reliability: 97.78% HPT 99th percentile: 1.00x faster Memory change: 1.00x Would you like to review this PR? |
Sorry, something went wrong.
| * Update the bundled `mimalloc library`_ from version 2.1.2 to 2.5.2. | ||
| (Contributed by Donghee Na in :gh:`159111`.) | ||
|
|
||
| .. _mimalloc library: https://github.com/microsoft/mimalloc/ | ||
|
|
There was a problem hiding this comment.
| * Update the bundled `mimalloc library`_ from version 2.1.2 to 2.5.2. | |
| (Contributed by Donghee Na in :gh:`159111`.) | |
| .. _mimalloc library: https://github.com/microsoft/mimalloc/ |
Sorry, something went wrong.
There was a problem hiding this comment.
Because for the main branch, we will target v3.
Sorry, something went wrong.
There was a problem hiding this comment.
This looks good!
Sorry, something went wrong.
|
Thanks @corona10 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
Sorry, something went wrong.
|
Sorry, @corona10, I could not cleanly backport this to 3.15 due to a conflict. Please backport manually with cherry_picker, see the devguide for more information. cherry_picker aff7a2e23bd6ed68fa15c1ceda94a2fdd7f8cf7f 3.15 |
Sorry, something went wrong.
|
Sorry, @corona10, I could not cleanly backport this to 3.14 due to a conflict. Please backport manually with cherry_picker, see the devguide for more information. cherry_picker aff7a2e23bd6ed68fa15c1ceda94a2fdd7f8cf7f 3.14 |
Sorry, something went wrong.
…159112) * Update vendored mimalloc to v2.5.2 Upgrade mimalloc from v2.1.2 to v2.5.2 as-is from upstream. v2.1.2: https://github.com/microsoft/mimalloc/releases/tag/v2.1.2 v2.5.2: https://github.com/microsoft/mimalloc/releases/tag/v2.5.2 * Re-apply CPython-specific changes to mimalloc v2.5.2 Most of the previous downstream changes were upstreamed in mimalloc v2.1.3 - v2.1.7 (heap tags, _mi_heap_init/_mi_tld_init, MI_PRIM_THREAD_ID, sub-processes, heap walk optimizations, platform fixes) and are dropped. Remaining CPython-specific changes, all marked with a "CPython" comment: - QSBR delayed page freeing for free-threaded builds (pythongh-115103, pythongh-145615): mi_page_t/mi_heap_t fields and _PyMem_mi_* hooks in page.c, heap.c and segment.c. - debug_offset: preserve the first bytes of a PyObject (ob_tid, refcount fields) when filling freed or uninitialized memory in debug builds (pythongh-115491). - Atomic mi_block_t.next loads/stores to avoid TSAN reports (pythongh-129748). - Relax the owning thread assertion in _mi_free_delayed_block for free-threaded builds, since the GC traverses heaps of other threads. - Call _mi_heap_delayed_free_partial() in mi_heap_visit_blocks() (pythongh-112532). - Only count reclaimed pages up to MI_MEDIUM_OBJ_SIZE_MAX as a "right page" in mi_segment_reclaim (pythongh-115103). - Rename the weak _ZSt15get_new_handlerv symbol and disable the mi_is_in_heap_region debug warning. - Zero-initialize _mi_page_empty instead of a positional initializer. * Update the free-threaded build to mimalloc v2.5.2 changes mimalloc v2.1.4 replaced the list of abandoned segments with per-arena bitmaps and introduced sub-processes (mi_subproc_t) to keep abandoned segments of separate interpreters apart. Use them instead of the CPython-specific mi_abandoned_pool_t: - Each interpreter owns a mi_subproc_t created in init_interpreter(). - tstate_mimalloc_bind() sets tld->segments.subproc and uses the upstream _mi_heap_init() signature. - The GC and sys.getallocatedblocks() visit abandoned segments with _PyMem_mi_visit_abandoned_blocks(), the upstream cursor API without the mi_option_visit_abandoned requirement, while STW. * Update NEWS.d * fix MSAN * fix TSAN * fix test_cext * Disable THP * Address code review * Address code review * Address code review * nit * Address code review * Address code review (cherry picked from commit aff7a2e) Co-authored-by: Donghee Na <donghee.na@python.org>
|
GH-160178 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
|
GH-160183 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.