Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multithreaded smoketest produces no end events #156

Open
slabasan opened this issue Apr 25, 2024 · 1 comment
Open

Multithreaded smoketest produces no end events #156

slabasan opened this issue Apr 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@slabasan
Copy link
Collaborator

slabasan commented Apr 25, 2024

First reported by Henry on turing, but can also produce on lassen.

mkdir build
cd build
cmake -C ../host-configs/lassen*.cmake -DPERFFLOWASPECT_WITH_MULTITHREADING=ON ../
make

Running

$ cd test
$ ./smoketest_MT 
This is worker_thread() 3 
This is worker_thread() 2 
This is worker_thread() 1 
$ cat perfflow.lassen709.19136.pfw 
[
{"name": "foo", "cat": "/g/g19/brink2/git_root_pub/PerfFlowAspect/src/c/test/smoketest_MT.cpp", "pid": 19136, "tid": 19138, "ts": 1714069138376341.0, "ph": "B"},
{"name": "foo", "cat": "/g/g19/brink2/git_root_pub/PerfFlowAspect/src/c/test/smoketest_MT.cpp", "pid": 19136, "tid": 19139, "ts": 1714069138376361.0, "ph": "B"},
{"name": "foo", "cat": "/g/g19/brink2/git_root_pub/PerfFlowAspect/src/c/test/smoketest_MT.cpp", "pid": 19136, "tid": 19137, "ts": 1714069138376325.0, "ph": "B"},

Test notes:

  • Smoketest with pointcut=after produces pfw file with all E events
  • Smoketest_MT with pointcut=before produces pfw file with all B events
  • Smoketest_MT with pointcut=after produces no pfw file

Could be an issue with locks. Perhaps using the same lock causes problem with threads. Would adding another lock variable and using different ones solve the problem?

@tpatki
Copy link
Member

tpatki commented Apr 26, 2024

Capturing notes from discussion with @slabasan .

The different cases need to be clearly documented and tested.

  • after + compact format has no if-statement currently and will fail
  • pid/tid is not getting added correctly to the default case
  • No file is being created for smoketest_MT with pointcut=after: this needs to be debugged.

@tpatki tpatki added the bug Something isn't working label Apr 26, 2024
@tpatki tpatki added this to the Release 0.2.0 milestone Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants