Skip to content

TEST/STATS: Make sure statistics are disabled after test is finished - #11201

Merged
yosefe merged 4 commits into
openucx:masterfrom
yosefe:topic/test-stats-make-sure-statistics-are-disabled
Mar 7, 2026
Merged

yosefe merged 4 commits into
openucx:masterfrom
yosefe:topic/test-stats-make-sure-statistics-are-disabled

Conversation

@yosefe

@yosefe yosefe commented Feb 22, 2026 •

Copy link
Copy Markdown
Member

Why

Currently some tests do not restore the disabled state of statistics as needed when the test is skipped, leading to warnings like stats.c:831 UCX WARN stats node funk10:340159 still has active children from subsequent tests, for example ib/test_md_fork

Comment thread test/gtest/ucp/test_ucp_am.cc Resolved
tvegas1
tvegas1 previously approved these changes Feb 23, 2026
iyastreb
iyastreb previously approved these changes Feb 23, 2026
@yosefe
yosefe dismissed stale reviews from iyastreb and tvegas1 via 7db10b7 February 24, 2026 08:39
tvegas1
tvegas1 previously approved these changes Feb 24, 2026
Comment thread src/ucs/stats/stats.c
pthread_t thread;
} ucs_stats_context_t;

volatile unsigned ucs_stats_context_flags = 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just wandering, what's the rationale to move the flags out of the struct?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed to have the flags available in inline function in the header, and moving the whole struct would pull all its dependencies into stats.h as well

@yosefe

yosefe commented Mar 4, 2026

Copy link
Copy Markdown
Member Author

@iyastreb @tvegas1 can you check again pls?

@yosefe
yosefe merged commit 2ee1df5 into openucx:master Mar 7, 2026
151 checks passed
jeynmann pushed a commit to jeynmann/ucx that referenced this pull request Mar 17, 2026
…penucx#11201)

* TEST/STATS: Make sure statistics are disabled after test is finished

* TEST/TAG: Fix modify_config placement

* UCS/STATS: Fix double-free by not releasing stats nodes if stats are inactive

* UCS/STATS: Avoid using stats nodes if stats are inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants