Branch: refs/heads/master
Home: https://github.com/STEllAR-GROUP/hpx
Commit: 573566f39476a471892c03ed155bf8a72de12323
https://github.com/STEllAR-GROUP/hpx/commit/573566f39476a471892c03ed155bf8a72de12323
Author: Arpit Khandelwal <[email protected]>
Date: 2026-02-03 (Tue, 03 Feb 2026)
Changed paths:
M libs/full/runtime_distributed/src/runtime_distributed.cpp
Log Message:
-----------
Fix runtime shutdown ordering for collectives on macOS Debug
Ensure all pending collective actions and continuations complete
before global runtime teardown to avoid allocator use-after-destruction.
This fix addresses a crash in hpx::util::one_size_heap_list::alloc
that occurs in Debug mode on macOS (arm64) when using hpx::collectives::set.
The issue is caused by undefined global destructor ordering where collective
continuations may still be executing after hpx_main returns but global
allocators have already been destroyed.
The fix adds explicit synchronization after hpx_main returns:
1. Flush all pending parcels via parcel_handler_.flush_parcels()
2. Yield to allow background work to complete
3. Only then proceed to post_main and teardown
This ensures all collective operations and their continuations finish
before static destructors run, preventing use-after-free bugs.
Commit: bdc90ed0437316fa818024ee1cbd5981e8795209
https://github.com/STEllAR-GROUP/hpx/commit/bdc90ed0437316fa818024ee1cbd5981e8795209
Author: Arpit Khandelwal <[email protected]>
Date: 2026-02-04 (Wed, 04 Feb 2026)
Changed paths:
M libs/full/runtime_distributed/src/runtime_distributed.cpp
Log Message:
-----------
Remove shutdown workaround based on maintainer feedback
The previous workaround that flushed parcels and yielded after hpx_main
returns was incomplete and occurred at the wrong point in HPX's shutdown
sequence. As noted by @hkaiser:
1. HPX already has extensive shutdown synchronization via Dijkstra
termination detection (two rounds)
2. Flushed parcels can trigger more work on remote localities
3. The workaround happened after HPX's proper shutdown mechanisms
This commit removes the workaround to allow proper investigation of the
root cause if the issue reappears.
Commit: c810d6108f503f307b2b641a8aee41ebd020ecc5
https://github.com/STEllAR-GROUP/hpx/commit/c810d6108f503f307b2b641a8aee41ebd020ecc5
Author: Arpit Khandelwal <[email protected]>
Date: 2026-02-04 (Wed, 04 Feb 2026)
Changed paths:
M examples/1d_stencil/1d_stencil_5.cpp
M libs/core/algorithms/tests/unit/algorithms/max_element.cpp
M libs/core/algorithms/tests/unit/algorithms/min_element.cpp
M libs/core/algorithms/tests/unit/algorithms/minmax_element.cpp
M libs/core/algorithms/tests/unit/algorithms/test_utils.hpp
M libs/core/algorithms/tests/unit/container_algorithms/max_element_range.cpp
M libs/core/algorithms/tests/unit/container_algorithms/min_element_range.cpp
M
libs/core/algorithms/tests/unit/container_algorithms/minmax_element_range.cpp
M libs/core/algorithms/tests/unit/container_algorithms/test_utils.hpp
Log Message:
-----------
Merge branch 'master' into fix/macos-debug-collectives-shutdown
Commit: 72ca7cf8045becb26d353b99b5137345fbe539a4
https://github.com/STEllAR-GROUP/hpx/commit/72ca7cf8045becb26d353b99b5137345fbe539a4
Author: Arpit Khandelwal <[email protected]>
Date: 2026-02-06 (Fri, 06 Feb 2026)
Changed paths:
M .circleci/tests.unit5.targets
M .github/CONTRIBUTING.md
M libs/core/executors/include/hpx/executors/fork_join_executor.hpp
M libs/core/threading_base/CMakeLists.txt
A
libs/core/threading_base/include/hpx/threading_base/set_thread_affinity.hpp
A libs/core/threading_base/src/set_thread_affinity.cpp
M libs/core/threading_base/src/set_thread_state.cpp
M libs/core/threading_base/tests/unit/CMakeLists.txt
A libs/core/threading_base/tests/unit/set_thread_affinity.cpp
M libs/full/collectives/tests/performance/benchmark_collectives.cpp
Log Message:
-----------
Merge branch 'master' into fix/macos-debug-collectives-shutdown
Commit: 2919d88a8f39942def4ffb0a482f53eb23cf769c
https://github.com/STEllAR-GROUP/hpx/commit/2919d88a8f39942def4ffb0a482f53eb23cf769c
Author: Arpit Khandelwal <[email protected]>
Date: 2026-02-06 (Fri, 06 Feb 2026)
Changed paths:
M libs/core/runtime_local/src/runtime_local.cpp
Log Message:
-----------
Fix shutdown crash by waiting for threads before destroying allocators
This commit fixes issue #6776 where HPX crashes in one_size_heap_list::alloc
during shutdown on macOS Debug builds.
Root Cause:
- thread_manager_->stop() initiates shutdown but does not block
- util::reinit_destruct() immediately destroys component heap allocators
- Collective operation continuations may still be running on background threads
- These threads attempt to allocate from already-destroyed allocators
- Result: Segmentation fault
Solution:
Added thread_manager_->wait() call in runtime::~runtime() before
reinit_destruct(). This ensures all threads complete their work before
allocators are destroyed, eliminating the race condition.
The fix:
- Uses existing HPX synchronization mechanisms
- Minimal performance impact (only affects shutdown)
- Platform-safe and compatible with all builds
- Addresses the root cause directly
Fixes #6776
Commit: ebbf3a9fd68e695db6a440fcbc06005f1e9411c4
https://github.com/STEllAR-GROUP/hpx/commit/ebbf3a9fd68e695db6a440fcbc06005f1e9411c4
Author: Hartmut Kaiser <[email protected]>
Date: 2026-02-06 (Fri, 06 Feb 2026)
Changed paths:
M libs/core/runtime_local/src/runtime_local.cpp
Log Message:
-----------
Merge pull request #6873 from
arpittkhandelwal/fix/macos-debug-collectives-shutdown
Fix runtime shutdown ordering for collectives on macOS Debug - Issue #6776
Compare:
https://github.com/STEllAR-GROUP/hpx/compare/3efee2390107...ebbf3a9fd68e
To unsubscribe from these emails, change your notification settings at
https://github.com/STEllAR-GROUP/hpx/settings/notifications
_______________________________________________
hpx-commits mailing list
[email protected]
https://mail.cct.lsu.edu/mailman/listinfo/hpx-commits