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

Build task is crashing on ETA and VSI runs #7470

Closed
heejaechang opened this issue Dec 14, 2015 · 22 comments
Closed

Build task is crashing on ETA and VSI runs #7470

heejaechang opened this issue Dec 14, 2015 · 22 comments
Assignees
Labels
Area-Compilers Bug Contributor Pain The issue impedes progress for project collaborators.

Comments

@heejaechang
Copy link
Contributor

C:\Users\dotnet-bot.nuget\packages\Microsoft.Net.Compilers\1.2.0-beta-20151211-01\tools\Microsoft.CSharp.Core.targets(67,5): error MSB3883: Unexpected exception: [d:\j\workspace\roslyn-internal_prtest_win_dbg_unit32\Open\src\Features\Core\Portable\Features.csproj]
10:53:14 C:\Users\dotnet-bot.nuget\packages\Microsoft.Net.Compilers\1.2.0-beta-20151211-01\tools\Microsoft.CSharp.Core.targets(67,5): error : System.NullReferenceException: Object reference not set to an instance of an object. [d:\j\workspace\roslyn-internal_prtest_win_dbg_unit32\Open\src\Features\Core\Portable\Features.csproj]

http://dotnet-ci.cloudapp.net/job/roslyn-internal_prtest_win_dbg_unit32/404/consoleFull#56248540979494335-f7bd-47d0-8771-8661e00c2db2

@heejaechang
Copy link
Contributor Author

10:53:15 C:\Users\dotnet-bot.nuget\packages\Microsoft.Net.Compilers\1.2.0-beta-20151211-01\tools\Microsoft.CSharp.Core.targets(67,5): error : at Microsoft.CodeAnalysis.BuildTasks.ManagedCompiler.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [d:\j\workspace\roslyn-internal_prtest_win_dbg_unit32\Open\src\Features\Core\Portable\Features.csproj]
10:53:16 CSharpCodeAnalysis -> d:\j\workspace\roslyn-

@davkean
Copy link
Member

davkean commented Dec 15, 2015

We hit this again, @jaredpar can you get someone to have a look at this?

@davkean davkean changed the title [Test Failure] building Feature layer failed with error Build task is crashing on ETA and VSI runs Dec 15, 2015
@TyOverby
Copy link
Contributor

The following projects are failing:

  • 404
    • Features
    • Features
  • 89
    • BasicWorkspace
    • BasicWorkspace
  • 111
    • CodeAnalysisTest
    • CodeAnalysisTest

Notice that each failure happens twice for each build. @davkean: did you find out why this is built twice?

@davkean
Copy link
Member

davkean commented Dec 15, 2015

We suspect that the toolset update introduced this: #7444.

@TyOverby
Copy link
Contributor

I am currently attempting to reproduce the issue with PDBs present. This way, hopefully we can get line-number info as well as (maybe) a call stack.

@davkean
Copy link
Member

davkean commented Dec 17, 2015

How did we go with this?

@TyOverby
Copy link
Contributor

It hasn't failed in the two days since I've tried to repro...

@TyOverby TyOverby closed this as completed Jan 5, 2016
@davkean
Copy link
Member

davkean commented Jan 6, 2016

We hit this again: #7782

@amcasey amcasey added the Contributor Pain The issue impedes progress for project collaborators. label Jan 7, 2016
@davkean
Copy link
Member

davkean commented Jan 7, 2016

@agocke
Copy link
Member

agocke commented Jan 7, 2016

I think I see the problem: https://github.com/dotnet/roslyn/blob/master/src/Compilers/Core/MSBuildTask/Shared/ManagedCompiler.cs#L389

NRE if responseTask is null.

https://github.com/dotnet/roslyn/blob/master/src/Compilers/Shared/DesktopBuildClient.cs#L160

Looks like that should be return Task.FromResult<BuildResponse>(null)

@agocke
Copy link
Member

agocke commented Jan 7, 2016

Making a PR now.

@davkean
Copy link
Member

davkean commented Jan 7, 2016

Damnit, nice one. We've been trying find the cause for ages. We couldn't get a consistent repro.

@agocke
Copy link
Member

agocke commented Jan 7, 2016

Jared actually fixed a case in e0d04ad but just missed this one.

@amcasey
Copy link
Member

amcasey commented Jan 7, 2016

Should we have an analyzer that detects constant null returns from non-async task-returning methods?

@agocke
Copy link
Member

agocke commented Jan 7, 2016

@amcasey I could see a good reason for returning null, rather than boxing a null in a task. I just happened to choose the "no-null" approach.

@TyOverby
Copy link
Contributor

TyOverby commented Jan 7, 2016

@agocke What is your example scenario? I've always thought of Task as being a prime example of "this is a reference type, but seriously shouldn't ever be null".

@agocke
Copy link
Member

agocke commented Jan 7, 2016

@TyOverby Someone with a task-returning method which is often going to be "empty" and they don't want to incur an extra allocation. In theory the Task.FromResult(..) could be cached, but I'm not willing to say that's uniformly better.

@agocke agocke closed this as completed in 94948e1 Jan 8, 2016
agocke added a commit that referenced this issue Jan 8, 2016
@jaredpar
Copy link
Member

jaredpar commented Jan 8, 2016

@agocke good catch.

How were you able to debug this? Or did you just find this via code inspection?

@agocke
Copy link
Member

agocke commented Jan 8, 2016

@jaredpar Code inspection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Contributor Pain The issue impedes progress for project collaborators.
Projects
None yet
Development

No branches or pull requests

6 participants