sdk icon indicating copy to clipboard operation
sdk copied to clipboard

After first-time project creation, we get: error occurred attempting to run the project model server process

Open balachir opened this issue 10 years ago • 27 comments

Steps to reproduce

Dev14 U2 + AspNetCoreTools RC2

  1. New ASP.NET Core web app > Web Application

Expected behavior

Project to create

Actual behavior

When creating a project for the first-time, sometimes we run into this dialog

image

Environment data

dotnet --info output:

balachir avatar Apr 12 '16 17:04 balachir

/cc @muratg

TheRealPiotrP avatar Apr 12 '16 19:04 TheRealPiotrP

@balachir does this happen only sometimes (and if so, how often)? Does the client side have retries?

muratg avatar Apr 12 '16 19:04 muratg

dotnet may not be started, or when the VS tries to connect to the dotnet the process hasn't fully started yet.

troydai avatar Apr 12 '16 19:04 troydai

A few of us have run into this. After installing the RC2 tooling bits, when creating the project for the very first time, the dialog pops up. If you hit OK and try creating a project again, then we don't see this issue anymore, so it's a little difficult to repro.

I don't think we have retries on the client-side. /cc: @BillHiebert

balachir avatar Apr 12 '16 19:04 balachir

The issue requires a newly installed VS. @balachir is building a test environment for me.

troydai avatar Apr 12 '16 22:04 troydai

@troydai what's the status of this issue?

TheRealPiotrP avatar Apr 18 '16 23:04 TheRealPiotrP

@BillHiebert and @balachir has been investigating this since last week. They're not able to repo this on any machine other than a slow Maddog test machine. These is little I can do at this point.

@BillHiebert and @balachir may have more to update.

troydai avatar Apr 19 '16 04:04 troydai

We are continuing to see this reported in the tests that our China team is running with the RC2 tooling bits using the Maddog machines. Yesterday, I was able to reproduce this on one of my RC2 VMs with a checkpoint, I shall try reverting to that checkpoint to see if that gives a consistent repro. Hopefully, we'll get a repro and that will help us make progress on this investigation.

balachir avatar Apr 19 '16 17:04 balachir

@balachir are we any closer to a repro? If it's so inconsistent, would you ship RC2 without addressing this issue?

TheRealPiotrP avatar Apr 19 '16 23:04 TheRealPiotrP

Here's what we found now.

The issue happens for only:

  1. VS is just installed;
  2. Create a new web project

Research the log captured by Process Monitor during the repo, we found that dotnet.exe process terminates in 1 second after it is started by Visual Studio. The exit status is -1.

It doesn't repo afterwards.

It doesn't repo if between step 1 and 2 open a command line and run dotnet --version. It seems like running dotnet for the first time somehow initialize or set up something.

It doesn't repo if we set COREHOST_TRACE=1 to capture corehost log.

The problem is likely lied in the dotnet muxer and/or in the native code.

troydai avatar Apr 20 '16 00:04 troydai

@piotrpMSFT, we are seeing this issue reported by our China testing team pretty consistently with Maddog machines, and by a few others locally when they have installed the tooling build on less powerful machines. So we should definitely address this for RC2.

Adding to what Troy mentioned above, this one has been a tricky one to investigate because it reproduces the very first-time only. Troy and I did some investigations on one of my VM where I could repro and had saved a checkpoint after installing the RC2 tooling but before starting up VS. I've asked the China team to setup some more Maddog machines tonight as well, which are likely to reproduce the issue. So we should be able to make some more progress on the investigation tomorrow.

balachir avatar Apr 20 '16 01:04 balachir

@piotrpMSFT please advice who we can talk to regarding to the symptom. It is fairly clear now it is not a problem of dotnet-projectmodel-server itself. It more likely a dotnet.exe or muxer issue.

troydai avatar Apr 20 '16 05:04 troydai

@schellap can help if this is a dotnet.exe issue.

TheRealPiotrP avatar Apr 21 '16 23:04 TheRealPiotrP

@troydai @balachir do we know if dotnet.dll is being loaded? Are any tools being referenced by the project? Does CLI produce any command line output?

TheRealPiotrP avatar Apr 21 '16 23:04 TheRealPiotrP

than a slow Maddog test machine

It doesn't repo if we set COREHOST_TRACE=1 to capture corehost log. The problem is likely lied in the dotnet muxer and/or in the native code.

It could be a muxer issue but just setting this logging environment shouldn't be a reason to conclude so. It sounds from the above statements it is a timing issue.

Also, why is the process name in the alert box a version number? "attempting to run a project model server process (1.0.0-rc2-002345)"

schellap avatar Apr 21 '16 23:04 schellap

@schellap just told me that @BillHiebert has taken on this issue.

TheRealPiotrP avatar Apr 26 '16 23:04 TheRealPiotrP

We suspect this is a timing issue. After starting the project model server, VS waits up to 5 seconds to make the tcp connection. On slow VM's, we have noticed that the first run of dotnet.exe is really slow - haven't investigated why. Most likely it is timing out, in which case the process is terminated. We've increased the timeout and we should know in the next day or so.

BillHiebert avatar Apr 28 '16 21:04 BillHiebert

@BillHiebert Did increasing the time out solve this problem?

livarcocc avatar May 10 '16 23:05 livarcocc

Also, did anyone repro this on a second project creation? If it's just a time out problem, wouldn't it occasionally fail in the second time too? (AFAIK it doesn't repro after the first time.)

muratg avatar May 10 '16 23:05 muratg

This has been open for two months without repro. Closing.

TheRealPiotrP avatar Jun 07 '16 17:06 TheRealPiotrP