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

Razor build server (process 27970) failed to shut down: The shutdown command failed: The application to execute does not exist #10573

Closed
khteh opened this issue Oct 25, 2019 · 12 comments · Fixed by #29029
Milestone

Comments

@khteh
Copy link

khteh commented Oct 25, 2019

Steps to reproduce

$ dotnet build-server shutdown error:

Razor build server (process 27970) failed to shut down: The shutdown command failed: The application to execute does not exist: '/usr/share/dotnet/sdk/NuGetFallbackFolder/microsoft.aspnetcore.razor.design/2.2.0/tools/rzc.dll'

Why does it look for 2.2.0 when I am using 3.0?

Expected behavior

Shutdown properly without error

Actual behavior

Environment data

dotnet --info output:

$ dn --info
.NET Core SDK (reflecting any global.json):
 Version:   3.0.100
 Commit:    04339c3a26

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  19.04
 OS Platform: Linux
 RID:         ubuntu.19.04-x64
 Base Path:   /usr/share/dotnet-3.0.100/sdk/3.0.100/

Host (useful for support):
  Version: 3.0.0
  Commit:  7d57652f33

.NET Core SDKs installed:
  3.0.100 [/usr/share/dotnet-3.0.100/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.0.0 [/usr/share/dotnet-3.0.100/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.0.0 [/usr/share/dotnet-3.0.100/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
@livarcocc
Copy link
Contributor

@wli3 can you take a look at this?

@livarcocc
Copy link
Contributor

@khteh is your application targeting netcoreapp3.0 as well?

@wli3 wli3 self-assigned this Oct 30, 2019
@khteh
Copy link
Author

khteh commented Oct 30, 2019

Yes, of course.

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the Discussion milestone Jan 31, 2020
@ooooolivia
Copy link

I think this issue just came back. Our perf build ran into the same issue with .NET 5. We use the command dotnet build-server shutdown to set up before each iteration and recently this happens very frequently with the master branch. @wli3

[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:30][INFO] ----------------------------------------------
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:30][INFO] Initializing logger 2020-06-02 20:37:30.187270
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:30][INFO] ----------------------------------------------
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:30][INFO] $ pushd "/home/helixbot/work/A4AE08C9/p"
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:30][INFO] $ dotnet build-server shutdown
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:30][INFO] Shutting down MSBuild server...
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:30][INFO] Shutting down VB/C# compiler server...
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:30][INFO] Shutting down Razor build server (process 13722)...
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:30][INFO] VB/C# compiler server shut down successfully.
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:30][INFO] Razor build server (process 13722) failed to shut down: The shutdown command failed: The application to execute does not exist: '/home/helixbot/work/AEFA0996/w/AD220924/e/.dotnet14993/sdk/5.0.100-preview.6.20266.3/Sdks/Microsoft.NET.Sdk.Razor/tools/netcoreapp3.0/rzc.dll'
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:30][INFO]
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:31][INFO] MSBuild server shut down successfully.
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:31][INFO] $ popd
[2020/06/02 20:37:31][INFO] [2020/06/02 20:37:31][ERROR] Process exited with status 1

@wli3
Copy link

wli3 commented Jun 3, 2020

@ooooolivia could you use
taskkill /F /IM dotnet.exe /T || taskkill /F /IM VSTest.Console.exe /T || taskkill /F /IM msbuild.exe /T to shut it down for now?

This is a tricky issue. We would need sometime to investigate

@ooooolivia
Copy link

@ooooolivia could you use
taskkill /F /IM dotnet.exe /T || taskkill /F /IM VSTest.Console.exe /T || taskkill /F /IM msbuild.exe /T to shut it down for now?

This is a tricky issue. We would need sometime to investigate

@wli3 I assume the process names would be the same on Linux but without the exe extension?

@wli3
Copy link

wli3 commented Jun 4, 2020

Hm.. yes, need to do the equivalent for Linux

@billwert
Copy link
Member

@wli3 This still hits in the perf lab on occasion, FYI. An example.

@Lxiamail
Copy link
Member

Lxiamail commented Sep 9, 2021

The issue started to happen again in release/5.0.1** branch on .NET SDK 5.0.104 and release/3.1.4.* branch on .NET SDK v3.1.414 since 9/9/21. @wli3 can you or someone from your team to take a look. Since we have the concrete builds which started to repo the issue, hope it will help with the investigation. This issue prevents performance-CI pipeline to stay green, which is something that we try very hard to keep.

@wli3 wli3 removed their assignment Sep 29, 2021
@totollygeek
Copy link

This is still happening. Also on the latest 5.0 SDK. It is breaking our pipelines. Can anyone give us at least some information for a workaround? That issue has been open for almost 2 years now. How much investigation is needed? 🤔

@akoeplinger
Copy link
Member

I hit this too today and it turned out there was a leftover Razor PID file in ~/.dotnet/pids/build/.
In my case it was ~/.dotnet/pids/build/rzc-39759 with this content:

39759
rzc
/usr/local/share/dotnet/sdk/5.0.100-preview.7.20305.10/Sdks/Microsoft.NET.Sdk.Razor/tools/netcoreapp3.0/rzc.dll
alexander.L+W76Ks9oUsxwQ9uK8C8VIY6q

That also explains why it's complaining about dotnet SDK versions that aren't even used since it cached the path in that file.

Deleting the file fixed the dotnet build-server shutdown command.

@akoeplinger
Copy link
Member

I've opened a PR that should fix the issue: #29029

akoeplinger added a commit that referenced this issue Nov 15, 2022
When the server path in the pid file didn't exist we'd hit an error:

```
The shutdown command failed: The application to execute does not exist
```

This can happen when the file wasn't cleaned up and the SDK was uninstalled in the meantime.
Ensure we delete the pid file in that case and don't error.

Fixes #10573
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants