MsBuild hangs after completion

Sysprogs forums Forums VisualGDB MsBuild hangs after completion

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #21931
    Jensa
    Participant

    Hi,

    Today we started getting a weird issue on all our computers and all our different projects using VisualGDB. When we build our applications on our build server we use MsBuild which has worked perfectly before. Today though it started hanging after it completed the build and MsBuild doesn’t exit causing all our build scripts to hang.

    See the attached log where we build the default application template project using the command:

    call “C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe” /p:Configuration=Release /p:Platform=VisualGDB /t:Clean;Build Y:\LinuxProject1\LinuxProject1.sln

    Our windows projects still work fine with MsBuild which is why I’m posting it here first instead of the MsBuild forum 🙂
    The MsBuild stops after the “Time Elapsed…” print and we have to CTRL+C to stop it.

    First I thought it was that I updated to Visual Studio 15.8.3 which came today but when we started testing here it happens on all our computers with and without the update. Also it doesn’t help when we revert our code to earlier known working states. It just stops there no matter what we do.

    Any ideas what could be wrong?

    Attachments:
    You must be logged in to view attached files.
    #21933
    support
    Keymaster

    Hi,

    Unfortunately we are not aware of anything that could be causing this, but we can still help you pinpoint it. First of all, please check whether the problem can be reproduced:

    • When building from Visual Studio
    • When building the default target only (no /t switch)
    • When building a clean “Hello, World” project using the same toolchain
    • When building a remote “Hello, World” project
    • When building a regular VC++ Win32 project

    Please let us know your findings and we can suggest further steps to narrow it down.

    #21937
    Jensa
    Participant

    Thanks for trying 🙂

    With VisualStudio it works fine to build and nothing seems to hang after it’s completed. As you can see in the log when using MsBuild it does work and it’s completely built the only problem is that MsBuild doesn’t exit after which causes our build scripts to hang.

    I tried without the /t switch and it was exactly the same. The attached log was from a clean “Hello, World” project so unfortunately that doesn’t work either. Also tried now building on the remote target and it hangs at the exact same place.

    A normal VC++ Win32 project works fine though which is why I posted it here and not at MS site.

    See new attached logs of one VC++ and one VisualGDB remote build. This time I included the logged “CTRL+C” break at the end of the linux one which is the problem that it’s needed.

    Any other ideas of what could cause this is appreciated.

    Attachments:
    You must be logged in to view attached files.
    #21944
    support
    Keymaster

    Hi,

    Thanks for rechecking everything. Most likely VisualGDB creates a background thread that doesn’t properly exit after the normal MSBuild logic terminates. Please try attaching to the MSBuild process from Visual Studio in the Managed mode (ensure you select the correct one as VS itself may run several of them) and check the call stacks of all threads. Please post them here along with the exact VisualGDB build number and we should be able to tell what is going on and provide a fix/workaround.

    #21948
    Jensa
    Participant

    Hi,

    See attached images for the available callstacks.

    Attachments:
    You must be logged in to view attached files.
    #21953
    Jensa
    Participant

    Last image since I was only allowed to attach 4 to previous post.

    Attachments:
    You must be logged in to view attached files.
    #21957
    Jensa
    Participant

    Forgot to add that the buildnr is 2413.

    #21963
    support
    Keymaster

    Hi,

    Thanks, looks like one of the recent MSBuild builds changed the internal thread structure, so VisualGDB was not properly detecting the end-of-build event.

    Please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.4.2436.msi

    #21977
    Jensa
    Participant

    Thanks!

    It now works great again.

    Regards
    Jens Nilsson

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.