You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into an issue with builds on my personal machine (MacBook w/ Apple Silicon) failing due to being unable to find 'Global\Metalama.Configuration'. I've tried to Google my way through the problem, but there are no results on Google for "Metalama.Configuration" and only one code reference on GitHub.
At the same time, builds on my CICD system continue to work, which leads me to believe that it is a config or corruption issue on my machine. What should I do/look for in order to address the problem?
Stacktrace
/Users/me/.nuget/packages/metalama.compiler/2024.0.8/tasks/netcore/Microsoft.CSharp.Core.targets(113,5): error :
Unhandled exception. System.IO.IOException: The system cannot open the device or file specified. : 'Global\Metalama.Configuration'
at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
at Metalama.Backstage.Utilities.MutexHelper.OpenOrCreateMutex(String mutexName, ILogger logger)
at Metalama.Backstage.Configuration.ConfigurationManager..ctor(IServiceProvider serviceProvider)
at Metalama.Backstage.Extensibility.RegisterServiceExtensions.AddConfigurationManager(ServiceProviderBuilder serviceProviderBuilder)
at Metalama.Backstage.Extensibility.RegisterServiceExtensions.AddDiagnosticsRequirements(ServiceProviderBuilder serviceProviderBuilder, IApplicationInfo applicationInfo)
at Metalama.Backstage.Extensibility.RegisterServiceExtensions.AddBackstageServices(ServiceProviderBuilder serviceProviderBuilder, BackstageInitializationOptions options)
at Metalama.Backstage.Extensibility.BackstageServiceFactory.Initialize(BackstageInitializationOptions options, String caller)
at Metalama.Framework.Engine.Utilities.Diagnostics.BackstageServiceFactoryInitializer.Initialize(BackstageInitializationOptions options)
at Metalama.Framework.Engine.Pipeline.SourceTransformer.InitializeServices(InitializeServicesContext context)
at Microsoft.CodeAnalysis.CommonCompiler.CompileAndEmitImpl(TouchedFileLogger touchedFilesLogger, Compilation& compilation, ImmutableArray`1 analyzers, ImmutableArray`1 generators, ImmutableArray`1 transformers, ImmutableArray`1 additionalTextFiles, AnalyzerConfigSet analyzerConfigSet, ImmutableArray`1 sourceFileAnalyzerConfigOptions, ImmutableArray`1 embeddedTexts, DiagnosticBag diagnostics, ErrorLogger errorLogger, CancellationToken cancellationToken, CancellationTokenSource& analyzerCts, AnalyzerDriver& analyzerDriver, Nullable`1& generatorTimingInfo, IServiceProvider& serviceProvider) in C:\buildAgent\work\eb506826dec91df2\src\Compilers\Core\Portable\CommandLine\CommonCompiler.cs:line 1526
at Microsoft.CodeAnalysis.CommonCompiler.CompileAndEmit(TouchedFileLogger touchedFilesLogger, Compilation& compilation, ImmutableArray`1 analyzers, ImmutableArray`1 generators, ImmutableArray`1 transformers, ImmutableArray`1 additionalTextFiles, AnalyzerConfigSet analyzerConfigSet, ImmutableArray`1 sourceFileAnalyzerConfigOptions, ImmutableArray`1 embeddedTexts, DiagnosticBag diagnostics, ErrorLogger errorLogger, CancellationToken cancellationToken, CancellationTokenSource& analyzerCts, AnalyzerDriver& analyzerDriver, Nullable`1& generatorTimingInfo) in C:\buildAgent\work\eb506826dec91df2\src\Compilers\Core\Portable\CommandLine\CommonCompiler.cs:line 1322
at Microsoft.CodeAnalysis.CommonCompiler.RunCore(TextWriter consoleOutput, ErrorLogger errorLogger, CancellationToken cancellationToken) in C:\buildAgent\work\eb506826dec91df2\src\Compilers\Core\Portable\CommandLine\CommonCompiler.cs:line 1034
at Microsoft.CodeAnalysis.CommonCompiler.Run(TextWriter consoleOutput, CancellationToken cancellationToken) in C:\buildAgent\work\eb506826dec91df2\src\Compilers\Core\Portable\CommandLine\CommonCompiler.cs:line 807
at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.<>c__DisplayClass1_0.<Run>b__0(TextWriter tw) in C:\buildAgent\work\eb506826dec91df2\src\Compilers\Shared\Csc.cs:line 28
at Microsoft.CodeAnalysis.CommandLine.ConsoleUtil.RunWithUtf8Output[T](Boolean utf8Output, TextWriter textWriter, Func`2 func) in C:\buildAgent\work\eb506826dec91df2\src\Compilers\Core\CommandLine\ConsoleUtil.cs:line 53
at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.Run(String[] args, BuildPaths buildPaths, TextWriter textWriter, IAnalyzerAssemblyLoader analyzerLoader) in C:\buildAgent\work\eb506826dec91df2\src\Compilers\Shared\Csc.cs:line 28
at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunLocalCompilation(String[] arguments, BuildPaths buildPaths, TextWriter textWriter) in C:\buildAgent\work\eb506826dec91df2\src\Compilers\Shared\BuildClient.cs:line 196
at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunCompilation(IEnumerable`1 originalArguments, BuildPaths buildPaths, TextWriter textWriter, String pipeName) in C:\buildAgent\work\eb506826dec91df2\src\Compilers\Shared\BuildClient.cs:line 167
at Microsoft.CodeAnalysis.CommandLine.BuildClient.Run(IEnumerable`1 arguments, RequestLanguage language, CompileFunc compileFunc, CompileOnServerFunc compileOnServerFunc, ICompilerServerLogger logger) in C:\buildAgent\work\eb506826dec91df2\src\Compilers\Shared\BuildClient.cs:line 116
at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.MainCore(String[] args) in C:\buildAgent\work\eb506826dec91df2\src\Compilers\CSharp\csc\Program.cs:line 37
at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main(String[] args) in C:\buildAgent\work\eb506826dec91df2\src\Compilers\CSharp\csc\Program.cs:line 18
What I've tried
Deleting all files within my local repository, and then reapplying only committed files to remove generated files.
Deleting all downloaded packages in /Users/me/.nuget/packages at the same time as step 1 to force new copies to be redownloaded.
Other questions: are there other locations that should be cleaned out in order to fix this issue, or is there something else I should be doing?
The text was updated successfully, but these errors were encountered:
The problem is with opening a named mutex. Since macOS doesn't natively support those, I believe they are implemented using file locks on temporary files, which could be the source of the problem.
Can you see if running the following code on your mac throws?
I created a new ASP.NET Core project with only this code and ran it using dotnet run. Here's the output:
Unhandled exception. System.IO.IOException: The system cannot open the device or file specified. : 'Global\Metalama.Configuration'
at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
at Program.<Main>$(String[] args) in /Users/me/Code/TestMutex/Program.cs:line 5
Just in case it was a permissions issue, I ran the same code using sudo dotnet run, and got the same result.
However, when I ran dotnet run with a different name -- "Global/Random.Name" -- it worked properly, and I was even able to run it repeatedly without encountering into an error.
Update: A hard restart solves it, so it does appear that it is linked to a /tmp file somewhere, or something else that can be cleared out on (re)boot.
I'm running into an issue with builds on my personal machine (MacBook w/ Apple Silicon) failing due to being unable to find 'Global\Metalama.Configuration'. I've tried to Google my way through the problem, but there are no results on Google for "Metalama.Configuration" and only one code reference on GitHub.
At the same time, builds on my CICD system continue to work, which leads me to believe that it is a config or corruption issue on my machine. What should I do/look for in order to address the problem?
Stacktrace
What I've tried
Other questions: are there other locations that should be cleaned out in order to fix this issue, or is there something else I should be doing?
The text was updated successfully, but these errors were encountered: