Skip to content

Commit

Permalink
qa/src/multithread2.c: don't use PM_CONTEXT_LOCAL
Browse files Browse the repository at this point in the history
This test application only needs a context to initialize some mutexes.

PM_CONTEXT_LOCAL seemed like a good light-weight choice, until
the Linux proc PMDA was added to PM_CONTEXT_LOCAL at which point
pmNewContext() ends up initializing the hotproc metrics which calls
__pmAFregister() before any thread creation in multithread2.c ... and
this totally screws the cleverly orchestrated dance between the two
threads in this app.

Changing to PM_CONTEXT_HOST for the "local:" host restored the qa
tests 449 and 1074 to passing.
  • Loading branch information
kmcdonell committed Aug 1, 2024
1 parent a4611ae commit b62899a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qa/src/multithread2.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ main()
}

/* only need this to initialize library mutexes */
if ((sts = pmNewContext(PM_CONTEXT_LOCAL, NULL)) < 0) {
if ((sts = pmNewContext(PM_CONTEXT_HOST, "local:")) < 0) {
printf("pmNewContext: %s\n", pmErrStr(sts));
exit(1);
}
Expand Down

0 comments on commit b62899a

Please sign in to comment.