Skip to content

Commit

Permalink
Fix segmentation fault in stream stats
Browse files Browse the repository at this point in the history
The `ldms_stream_close()` race fix (3fe7765) changed the condition of
the stream-client entry (sce) such that it can contain NULL client or
stream. The stream stats code path that also go through the list must
also been modified to support it.
  • Loading branch information
narategithub authored and tom95858 committed Oct 31, 2023
1 parent afb8f74 commit 32d5252
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ldms/src/core/ldms_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1841,6 +1841,8 @@ struct ldms_stream_client_stats_tq_s *ldms_stream_client_stats_tq_get()
pthread_rwlock_rdlock(&s->rwlock);
TAILQ_FOREACH(sce, &s->client_tq, stream_client_entry) {
cli = sce->client;
if (!cli)
continue;
if (cli->is_regex)
continue; /* already handled above */
cs = ldms_stream_client_get_stats(cli);
Expand Down

0 comments on commit 32d5252

Please sign in to comment.