-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Getting command line via diagnostic pipe GetProcessInfo command during suspension only reports process name #59439
Comments
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process Issue DetailsDescriptionOn a non-Windows platform, while a runtime instance is suspended, issuing the GetProcessInfo command on the diagnostic pipe will only return the process name for the command line field. None of the command line parameters are provided. ConfigurationAll non-Windows platforms, both .NET 5 and .NET 6. Regression?No, my understanding is that during suspension on non-Windows platforms, this field never provided the full command line. Other informationDuring suspension, the command line field in the GetProcessInfo response will be something like:
If the GetProcessInfo command is issued immediately after resuming the runtime, the same data is reported (only the process name). If the GetProcessInfo command is issued sometime after the runtime is resumed and has run for a bit, then it returns the proper command line, e.g.:
cc @josalem
|
I took a look at the code paths for this and I think this unfortunately falling prey to the same ordering problems that the assembly name does, namely, part of command line resolution happens in the host. This means we are stuck waiting on the host to populate the command line. Specifically, the runtime suspends in The main issue is that on non-Windows platforms, we calculate the commandline rather than read it from some system API. The host is using the assembly path for the main assembly to generate it. |
Description
On a non-Windows platform, while a runtime instance is suspended, issuing the GetProcessInfo command on the diagnostic pipe will only return the process name for the command line field. None of the command line parameters are provided.
Configuration
All non-Windows platforms, both .NET 5 and .NET 6.
Regression?
No, my understanding is that during suspension on non-Windows platforms, this field never provided the full command line.
Other information
During suspension, the command line field in the GetProcessInfo response will be something like:
/__w/1/s/.dotnet/dotnet
If the GetProcessInfo command is issued immediately after resuming the runtime, the same data is reported (only the process name).
If the GetProcessInfo command is issued sometime after the runtime is resumed and has run for a bit, then it returns the proper command line, e.g.:
/__w/1/s/.dotnet/dotnet /__w/1/s/artifacts/bin/Microsoft.Diagnostics.Monitoring.UnitTestApp/Release/net5.0/Microsoft.Diagnostics.Monitoring.UnitTestApp.dll AsyncWait
cc @josalem
The text was updated successfully, but these errors were encountered: