Bug 8770 - When running nuget install in parallel random null references exceptions are thrown deep in the bowels of mono's reflection impl
Summary: When running nuget install in parallel random null references exceptions are ...
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: 2.10.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-12-05 09:34 UTC by David Fowler
Modified: 2012-12-05 10:25 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description David Fowler 2012-12-05 09:34:54 UTC
I've been working on getting nuget to work properly on mono and one of the first things I came across were these errors when trying to fix nuget package restore (nuget.exe install packages.config). The errors are here https://gist.github.com/4201936.

It only happens when we try to run installs in parallel, if we don't it works fine. Here's the code that fails:

The file is:

The method is ExecuteInParallel.

I have a branch that works around this by just skipping parallel builds altogether on mono. The easiest way to reproduce this is to run the following on osx:

1. Clone https://git01.codeplex.com/nuget
2. Run git checkout mono-build
3. Remove the check for mono in  src/CommandLine/Commands/InstallCommand.cs so that DisableParallel is always false.
4. Run ./build.sh

It should throw null reference exceptions when running package restore on mono itself. After the first time, packages are cached so remove %localappdata%\nuget\cache and run git clean -xdf, to reproduce this multiple times.
Comment 1 Marek Safar 2012-12-05 10:11:10 UTC
Could you try it with Mono 3.0. The stack trace is quite odd.
Comment 2 Marek Safar 2012-12-05 10:25:49 UTC
I tried your steps with mono master and no NRE but quite few tests failures.

Closing as already fixed.