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
chore(profiling): fix 'test_semaphore_and_bounded_semaphore_collectors_coexist' test (#15536)
## Description
Fix a segfault in the
test_semaphore_and_bounded_semaphore_collectors_coexist test that
occurred on Python 3.12. The test was missing the required ddup.config()
and ddup.start() initialization before using lock collectors.
This test was introduced in #15375 (unsure how it passed there...), but
it should be working now.
## What Happened
The test used `ThreadingSemaphoreCollector` and
`ThreadingBoundedSemaphoreCollector` without initializing the ddup
module first. When the profiler tried to push sample data via
handle.push_acquire(), it crashed with a segfault because the C
extension's internal state (memory buffers, output file handles) was
uninitialized.
## Changes
* Added ddup initialization to
test_semaphore_and_bounded_semaphore_collectors_coexist (the fix itself)
* Extracted init_ddup() helper into new
tests/profiling/collector/test_utils.py module (drive-by)
* Updated 3 tests to use the shared helper, reducing code duplication
(drive-by)
## Testing
* CI
0 commit comments