Skip to content

Commit

Permalink
Fix a possible deadlock caused by ldmsd_stream_publish()
Browse files Browse the repository at this point in the history
The deadlock occurs when applications publishes data on the same stream
multiple times by calling ldmsd_stream_publish().

The deadlock was caused by pull request #1081.
  • Loading branch information
nichamon authored and tom95858 committed Jan 21, 2023
1 parent 67b8b3e commit 783cfdd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ldms/src/ldmsd/ldmsd_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ int ldmsd_stream_publish(ldms_t xprt,
s->s_pub_info.count += 1;
s->s_pub_info.last_ts = now;
s->s_pub_info.total_bytes += data_len;
pthread_mutex_unlock(&s->s_lock);

err:
if (buf)
Expand Down

0 comments on commit 783cfdd

Please sign in to comment.