Dotnet build is stuck - how could I fix it?

Hello, I’ve encouraged a weird issue - dotnet build is just stuck forever. I’ve disucssed the idea at dotnet/cli gitter channel, see https://gitter.im/dotnet/cli?at=5e3db126f3718e705deb7c3f and following.

It behaves like this:

urbanecm@titanium  ~/tmp
$ ps ux | grep dotnet
urbanecm 1010806  0.0  0.0  13056   804 pts/5    S+   11:22   0:00 grep --color=auto dotnet
urbanecm@titanium  ~/tmp
$ mkdir foo
urbanecm@titanium  ~/tmp
$ cd foo
urbanecm@titanium  ~/tmp/foo
$ dotnet new console
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on /home/urbanecm/tmp/foo/foo.csproj...
[is stuck]
^C
urbanecm@titanium  ~/tmp/foo
$ ps ux | grep dotnet
urbanecm 1010875  0.0  1.4 3691804 61088 pts/5   SLl  11:22   0:01 dotnet exec /usr/share/dotnet/sdk/2.2.402/MSBuild.dll -maxcpucount -verbosity:m -nologo -target:Restore /home/urbanecm/tmp/foo/foo.csproj -distr
ibutedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,/usr/share/dotnet/sdk/2.2.402/dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,/usr/share/dotnet/sdk/2.2.402/dotnet.dll
urbanecm 1010940  0.0  0.0  13056   832 pts/5    S+   11:23   0:00 grep --color=auto dotnet
urbanecm@titanium  ~/tmp/foo
$ kill -9 1010875
urbanecm@titanium  ~/tmp/foo
$ dotnet build
Microsoft (R) Build Engine version 16.2.32702+c4012a063 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

[stuck as well]
^CAttempting to cancel the build...

urbanecm@titanium  ~/tmp/foo
$ ps ux | grep dotnet
urbanecm 1010985  0.0  1.3 3494904 58296 pts/5   SLl  11:23   0:01 dotnet exec /usr/share/dotnet/sdk/2.2.402/MSBuild.dll -maxcpucount -verbosity:m -restore -consoleloggerparameters:Summary -target:Build -distrib
utedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,/usr/share/dotnet/sdk/2.2.402/dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,/usr/share/dotnet/sdk/2.2.402/dotnet.dll
urbanecm 1011039  0.0  0.0  13056   780 pts/5    S+   11:23   0:00 grep --color=auto dotnet
urbanecm@titanium  ~/tmp/foo
$ kill -9 1010985
urbanecm@titanium  ~/tmp/foo
$

This was dotnet 2.2, but dotnet 3.1 behaves the same. Interesting is that self-contained apps behaves the same.

urbanecm@titanium  /home/s3w3n/linux-x64
$ ./blazor-self-contained
Failed to create CoreCLR, HRESULT: 0x8013200A

Any idea how this could be fixed?

.NET Foundation Website | Blog | Projects | Code of Conduct