question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Non-deterministic concurrency issues in solutions with multiple projects

See original GitHub issue

I’m seeing concurrency issues that occurs when calling dotnet build SomeProject.sln. The errors I see do not occur on every build, nor does there seem to be any pattern to when they occur. The errors can occur on first builds after a fresh clone as much as they will occur on second and third builds.

The only thing that seems to be consistent is that it occurs in projects with multiple project references.

The project: DotNetTools.zip

Versions: dotnet-cli 1.0.0-preview4-004215 Windows 10

Detailed log: msbuild.log.txt

The errors:

CSC : error CS2012: Cannot open ‘C:\dev\Universe\DotNetTools\test\Microsoft.DotNet.Watcher.Tools.Tests\obj\Debug\netcoreapp1.0\Microsoft.DotNet.Watcher.Tools.Tests.dll’ for writing – ‘The process cannot access the file ‘C:\dev\Universe\DotNetTools\test\Microsoft.DotNet.Watcher.Tools.Tests\obj\Debug\netcoreapp1.0\Microsoft.DotNet.Watcher.Tools.Tests.dll’ because it is being used by another process.’ [C:\dev\Universe\DotNetTools\test\Microsoft.DotNet.Watcher.Tools.Tests\Microsoft.DotNet.Watcher.Tools.Tests.csproj]

C:\dev\Universe\DotNetTools.dotnet\sdk\1.0.0-preview4-004215\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(119,5): error MSB4018: The “GenerateRuntimeConfigurationFiles” task failed unexpectedly.\r [C:\dev\Universe\DotNetTools\test\Microsoft.DotNet.Watcher.Tools.Tests\Microsoft.DotNet.Watcher.Tools.Tests.csproj] C:\dev\Universe\DotNetTools.dotnet\sdk\1.0.0-preview4-004215\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(119,5): error MSB4018: System.IO.IOException: The process cannot access the file ‘C:\dev\Universe\DotNetTools\test\Microsoft.DotNet.Watcher.Tools.Tests\bin\Debug\netcoreapp1.0\Microsoft.DotNet.Watcher.Tools.Tests.runtimeconfig.json’ because it is being used by another process.\r [C:\dev\Universe\DotNetTools\test\Microsoft.DotNet.Watcher.Tools.Tests\Microsoft.DotNet.Watcher.Tools.Tests.csproj]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
nguerreracommented, Sep 20, 2017

Closing this again as the cause of the issues in Roslyn is different than what was fixed for #739, which was almost certainly a dupe of this.

https://github.com/dotnet/roslyn/pull/22232 will fix things for Roslyn

https://github.com/dotnet/sdk/issues/1599 tracks better diagnostics/experience in this explicit-documentation-file-vs-multi-targeting case.

0reactions
nguerreracommented, Sep 19, 2017

Thanks, that will help a lot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tools And Techniques to Identify Concurrency Issues
In this article, we'll look at testing techniques for parallel programs and present six helpful tools you can use to locate potentially serious ......
Read more >
Debugging concurrency bugs in multithreaded applications
Concurrency bugs are non-deterministic defects that arise when the execution of a thread or process disrupts the behavior of other threads (or processes) ......
Read more >
Concurrency bugs in open source software: a case study
This paper presents an empirical study focusing on understanding the differences and similarities between concurrency bugs and other bugs, as ...
Read more >
Capturing High-level Nondeterminism in Concurrent ...
In this paper, we propose a record & replay approach for multi-paradigm concurrent application which: (1) enables deterministic replay for high- ...
Read more >
The Non-Deterministic Path to Concurrency – Exploring ...
In this paper we aim to explore how students' understanding these abstractions by examining 137 solutions to two concurrency questions given on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found