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

vswhere hangs #1090

Closed
randellhodges opened this issue Jul 21, 2017 · 8 comments
Closed

vswhere hangs #1090

randellhodges opened this issue Jul 21, 2017 · 8 comments

Comments

@randellhodges
Copy link

randellhodges commented Jul 21, 2017

Have you try trouble shooting doc?

Link to trouble shooting doc: https://www.visualstudio.com/en-us/docs/build/troubleshooting

Agent version and platform

Version of your agent? v2.117.2, v2.119.1


OS of the machine running the agent? Windows 2008 R2 with SP and windows updates

VSTS type and version

On-Prem TFS


If On-Prem TFS, which release, 2015 RTM/QU1/QU2? 2017 Update 2 RC2


If VisualStudio.com, what is your account name? N/A

What's not working?

With 2.117.2 of the agent, occasionally, a build will hang on vswhere.exe. It will sit there for many minutes. I have to let the build timeout or kill the vswhere process.

I submitted 11 builds, each build would build the debug and release version. It is set to clean sources and only 1 build at a time. So, really there was 22 builds. Out of the 22 builds, it hung 3 times.

2017-07-21T14:45:01.0375122Z ==============================================================================
2017-07-21T14:45:01.0375122Z Task         : Visual Studio Build
2017-07-21T14:45:01.0375122Z Description  : Build with MSBuild and set the Visual Studio version property
2017-07-21T14:45:01.0375122Z Version      : 1.118.0
2017-07-21T14:45:01.0375122Z Author       : Microsoft Corporation
2017-07-21T14:45:01.0375122Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613727)
2017-07-21T14:45:01.0375122Z ==============================================================================
2017-07-21T14:45:03.1747396Z ##[command]"D:\TfsAgent\_work\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.118.0\ps_modules\MSBuildHelpers\vswhere.exe" -version [15.0,15.1) -latest -format json

I tried removing the agent and installing v2.119.1 but it would not install. It would get stuck on searching for VS 2015 in the logs and it would a similar command, but it would have 15.0,16.0 in it.

I only have Visual Studio 2017 with the latest updates installed.

Here is the output from vswhere with no arguments (agent v2.117.2)

Visual Studio Locator version 1.0.62 [query version 1.10.80.60812]
Copyright (C) Microsoft Corporation. All rights reserved.

instanceId: 16153ad4
installDate: 5/24/2017 
installationName: VisualStudio/15.2.0+26430.16
installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
installationVersion: 15.0.26430.16
displayName: Visual Studio Enterprise 2017
description: Microsoft DevOps solution for productivity and coordination across teams of any size
enginePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service
channelId: VisualStudio.15.Release
channelPath: C:\Users\hodgesr\AppData\Local\Microsoft\VisualStudio\Packages\_Channels\4CB340F5\catalog.json
channelUri: https://aka.ms/vs/15/release/channel
releaseNotes: https://go.microsoft.com/fwlink/?LinkId=660284#15.1.26430.16
thirdPartyNotices: https://go.microsoft.com/fwlink/?LinkId=660300


## **Agent and Worker's diag log** Logs are located at the `_diag` under agent root folder, agent log prefix with `Agent_`, worker log prefix with `Worker_`. all sensitive information should already be masked out, please double check before paste here.
@ericsciple
Copy link
Contributor

can you send ersciple the agent diag log from the attempt to configure the 2.119.1 agent when it is getting stuck? (at microsoft com)

note, vs 15.* is 2017. and 14.* is 2015. the agent only uses vswhere when searching for vs 2017, not 2015.

@ericsciple
Copy link
Contributor

The agent currently bundles vswhere 1.0.62. The command line the agent runs is printed in the logs. Does that hang on your machine when you run it directly? If so, then can you try the latest vswhere release?

@randellhodges
Copy link
Author

randellhodges commented Jul 21, 2017

I attempted to duplicate the hang with 2.119.1 during configuration/install but either I was really unlucky the first 10 times I tried, or one of the windows updates I installed might have fixed that issue.

I never had it hang just running it directly. Of course, I only seen it hang 3 times out of 22 or so. I could try running it in a loop and see if I can get it to hang.

Just to clarify:

With 2.119.1, vswhere was hanging during install before I installed some windows updates. Every attempt. The first attempt after I installed windows updates, it didn't hang.

With 2.117.2, vswhere hangs very infrequently during a build even with the latest windows updates.

I can try removing 2.117.2 and going with 2.119.1 if that is the preferred agent for OnPrem 2017.

@randellhodges
Copy link
Author

So, as I mentioned, I was able to get 2.119.1 installed after I installed windows updates. However, after about 16 builds, it hung during a build. Same line as before.

I will try replacing vswhere with the latest and see what happens.

@randellhodges
Copy link
Author

Nope, I still get random hangs with 2.0.2. I made it 5 builds into 22 before I got the hang.

@randellhodges
Copy link
Author

If I just run this in a cmd shell, it eventually will hang. I guess maybe this should be opened over on the vswhere github.

for /L %n in (1,1,100) do "D:\TfsAgent1\_work\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.118.0\ps_modules\MSBuildHelpers\vswhere.exe" -version [15.0,15.1) -latest -format json

@ericsciple
Copy link
Contributor

yes if you have a repro with the vsts agent out of the picture, that is definitely an issue for the vswhere repo

@TingluoHuang
Copy link
Contributor

I am going to close this issue since microsoft/vswhere#87 has been closed

prebansa pushed a commit to prebansa/azure-pipelines-agent that referenced this issue Aug 6, 2019
…NCON.1UpdateReadme

Updating readme file for MMS.M155.WINCON.1
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

No branches or pull requests

3 participants