The version of nsys is NVIDIA Nsight Systems version 2023.3.3.42-233333266658v0. The program simply hung there and no file was generated. Is it a known issue?
Without --wait=primary, it is surely stuck. Actually, the purpose of adding --wait=primary is to avoid be stuck. But now even with this option, profiling is stuck.
Were you able to reproduce it with the current release of nsys?
If you are still having issues, are you running directly on the host, or are you in a container? Can you try to do a manual capture by running the program with nsys launch, and then in another window run nsys start followed by nsys stop?