runtime icon indicating copy to clipboard operation
runtime copied to clipboard

The system cannot open the device or file specified 'NuGet-Migrations'

Open lonix1 opened this issue 2 years ago • 11 comments
trafficstars

Description

In a CI build, in the official sdk docker image, I run dotnet nuget locals all --clear, and get this:

RUN dotnet nuget locals all --clear
System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
   at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
   at NuGet.Common.Migrations.MigrationRunner.Run()
   at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
   at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)
ERROR: process "/bin/sh -c dotnet nuget locals all --clear" did not complete successfully: exit code: 1

Reproduction Steps

inside the sdk container:

RUN \
  export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 && \
  dotnet nuget locals all --clear

Expected behavior

No error

Actual behavior

Error

Regression?

uknown

Known Workarounds

none

Configuration

mcr.microsoft.com/dotnet/sdk:7.0.400-bookworm-slim-amd64

Other information

Might be related to https://github.com/NuGet/Home/issues/12159 and https://github.com/dotnet/runtime/issues/80619, but those have been locked.

If I remove that offending line, I can build the docker image. If I then run that image and do something as simple as dotnet nuget it will give the same error as above.

{
  "ErrorMessage": "The system cannot open the device or file specified. : 'NuGet-Migrations'",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": false
}

Known issue validation

Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=426482 Error message validated: The system cannot open the device or file specified. : 'NuGet-Migrations' Result validation: :white_check_mark: Known issue matched with the provided build. Validation performed at: 10/4/2023 1:44:58 AM UTC

Report

Build Definition Test Pull Request
562124 dotnet/runtime JIT.Regression.CLR-x86-JIT.V1-M09-M11.WorkItemExecution
556282 dotnet/runtime JIT.HardwareIntrinsics.X86.Sse41.WorkItemExecution dotnet/runtime#97071
555737 dotnet/runtime JIT.HardwareIntrinsics.X86.Lzcnt.WorkItemExecution dotnet/runtime#98057
555733 dotnet/runtime JIT.Methodical.eh.WorkItemExecution dotnet/runtime#98056
553407 dotnet/runtime JIT/HardwareIntrinsics/X86/Regression/GitHub_23438/GitHub_23438_r/GitHub_23438_r.sh dotnet/runtime#97551
544321 dotnet/runtime JIT.jit64.opt.WorkItemExecution dotnet/runtime#97551
543295 dotnet/runtime JIT.HardwareIntrinsics.X86.Avx2.WorkItemExecution dotnet/runtime#97551
541982 dotnet/runtime JIT.Regression.CLR-x86-JIT.V1-M12-M13.WorkItemExecution dotnet/runtime#97551
534036 dotnet/runtime JIT.Methodical.f-iF-I.WorkItemExecution
529432 dotnet/runtime JIT.HardwareIntrinsics.X86.X86Base.WorkItemExecution
529010 dotnet/runtime JIT.Methodical.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 4 11

lonix1 avatar Sep 13 '23 06:09 lonix1

Update: when I run the container as root, the problem disappears.

But even so, that error is misleading.

lonix1 avatar Sep 13 '23 12:09 lonix1

Tagging subscribers to this area: @mangod9 See info in area-owners.md if you want to be subscribed.

Issue Details

Description

In a CI build, in the official sdk docker image, I run dotnet nuget locals all --clear, and get this:

RUN dotnet nuget locals all --clear
System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
   at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
   at NuGet.Common.Migrations.MigrationRunner.Run()
   at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
   at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)
ERROR: process "/bin/sh -c dotnet nuget locals all --clear" did not complete successfully: exit code: 1

Reproduction Steps

inside the sdk container:

RUN \
  export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 && \
  dotnet nuget locals all --clear

Expected behavior

No error

Actual behavior

Error

Regression?

uknown

Known Workarounds

none

Configuration

mcr.microsoft.com/dotnet/sdk:7.0.400-bookworm-slim-amd64

Other information

Might be related to https://github.com/NuGet/Home/issues/12159 and https://github.com/dotnet/runtime/issues/80619, but those have been locked.

If I remove that offending line, I can build the docker image. If I then run that image and do something as simple as dotnet nuget it will give the same error as above.

Author: lonix1
Assignees: -
Labels:

area-System.Threading, untriaged, needs-area-label

Milestone: -

ghost avatar Sep 13 '23 15:09 ghost

cc @kouvel

jkotas avatar Sep 13 '23 15:09 jkotas

This could be similar to https://github.com/dotnet/runtime/issues/80619. If the container get set up as root or some other user and then a different user uses the container, a workaround may be to delete the /tmp/.dotnet/shm and /tmp/.dotnet/lockfiles directories as root as the last step before switching to a different user. There is a fix that is targeting the next servicing versions for .NET 7 and .NET 6 that may help if it's the same issue.

But even so, that error is misleading.

There is an issue for that, which would hopefully be addressed soon: https://github.com/dotnet/runtime/issues/89090

kouvel avatar Sep 14 '23 22:09 kouvel

Thanks. I'll try the new version when it's released to see if it fixes this.

Is it one of those fixes that's released every month or so?

lonix1 avatar Sep 15 '23 01:09 lonix1

Is it one of those fixes that's released every month or so?

Yes, the change should be in the next version that is released, 6.0.23 and 7.0.12.

kouvel avatar Sep 15 '23 03:09 kouvel

@kouvel this might not be a System.Threading specific issue.

I'm also seeing this failure in 7.0 CI runs for JIT HardwareIntrinsics in WASM like this one (completely unrelated):

  • 7.0 PR: https://github.com/dotnet/runtime/pull/92970
  • Queue: Build Browser wasm Linux Release AllSubsets_Mono_RuntimeTests
  • Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=426482&view=logs&j=190ad6c8-5950-568c-cadd-f2dfb7d5a79f&t=c0f6fdc1-ac5d-583c-8ae1-a18de0846552&l=37
  • Log: https://helixre107v0xd1eu3ibi6ka.blob.core.windows.net/dotnet-runtime-refs-pull-92970-merge-dd168e95f4c34310ba/JIT.HardwareIntrinsics.X86.Aes/1/console.3ae4e55e.log?helixlogtype=result
Output (Expand):
Microsoft.DotNet.XUnitConsoleRunner v2.5.0 (64-bit .NET 7.0.10)
  Discovering: JIT.HardwareIntrinsics.XUnitWrapper (method display = ClassAndMethod, method display options = None)
  Discovered:  JIT.HardwareIntrinsics.XUnitWrapper (found 2 of 362 test cases)
  Starting:    JIT.HardwareIntrinsics.XUnitWrapper (parallel test collections = on, max threads = 2)
    JIT/HardwareIntrinsics/X86/Aes/Aes_r/Aes_r.sh [FAIL]
      System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
         at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
         at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
         at NuGet.Common.Migrations.MigrationRunner.Run()
         at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
         at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
         at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
         at Microsoft.DotNet.Cli.Program.Main(String[] args)
      
      Return code:      1
      Raw output file:      /datadisks/disk1/work/B3D809D6/w/C9020AAE/uploads/Reports/JIT.HardwareIntrinsics/X86/Aes/Aes_r/Aes_r.output.txt
      Raw output:
      BEGIN EXECUTION
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=/datadisks/disk1/work/B3D809D6/p
      > /datadisks/disk1/work/B3D809D6/w/C9020AAE/e/JIT/HardwareIntrinsics/X86/Aes/Aes_r/Aes_r.sh
      Expected: True
      Actual:   False
      Stack Trace:
           at JIT_HardwareIntrinsics._X86_Aes_Aes_r_Aes_r_._X86_Aes_Aes_r_Aes_r_sh()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
           at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
      Output:
        System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
           at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
           at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
           at NuGet.Common.Migrations.MigrationRunner.Run()
           at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
           at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
           at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
           at Microsoft.DotNet.Cli.Program.Main(String[] args)
        
        Return code:      1
        Raw output file:      /datadisks/disk1/work/B3D809D6/w/C9020AAE/uploads/Reports/JIT.HardwareIntrinsics/X86/Aes/Aes_r/Aes_r.output.txt
        Raw output:
        BEGIN EXECUTION
        Test Harness Exitcode is : 1
        To run the test:
        > set CORE_ROOT=/datadisks/disk1/work/B3D809D6/p
        > /datadisks/disk1/work/B3D809D6/w/C9020AAE/e/JIT/HardwareIntrinsics/X86/Aes/Aes_r/Aes_r.sh
  Finished:    JIT.HardwareIntrinsics.XUnitWrapper
=== TEST EXECUTION SUMMARY ===

carlossanlop avatar Oct 04 '23 01:10 carlossanlop

My understanding was that some of these tests in WASM have a build portion that runs as part of the test run. The exception is being thrown under Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse. It's a decent suspicion currently that it's the same issue, and once the SDK used in the CI is updated to patched versions hopefully these kind of issues would disappear.

kouvel avatar Oct 04 '23 01:10 kouvel

~~Not sure what's happening to KnownBuildError today, but it's not tagging all the hits~~ (apparently it's just taking forever, but it works).

Here's another one from today, found in 6.0:

  • PR: https://github.com/dotnet/runtime/pull/93697
  • Queue: Build Browser wasm Release AllSubsets_Mono_RuntimeTests
  • Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=443151&view=logs&j=2296eecc-f5ab-523f-c15d-f45eef1bfdea&t=d328b091-66a6-5d96-5a21-3cf77f57f009&l=70
  • Log file: https://helixre107v0xd1eu3ibi6ka.blob.core.windows.net/dotnet-runtime-refs-pull-93697-merge-70fceb6d2d9d424093/JIT.Methodical.eE/1/console.35d20077.log?helixlogtype=result
  • Output:
  Discovering: JIT.Methodical.XUnitWrapper (method display = ClassAndMethod, method display options = None)
  Discovered:  JIT.Methodical.XUnitWrapper (found 113 of 695 test cases)
  Starting:    JIT.Methodical.XUnitWrapper (parallel test collections = on, max threads = 2)
    JIT/Methodical/explicit/rotate/_relrotarg_valref/_relrotarg_valref.sh [FAIL]
      System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
         at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
         at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
         at NuGet.Common.Migrations.MigrationRunner.Run()
         at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
         at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
         at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
         at Microsoft.DotNet.Cli.Program.Main(String[] args)
      
      Return code:      1
      Raw output file:      /datadisks/disk1/work/B49409A4/w/C50E0A37/uploads/Reports/JIT.Methodical/explicit/rotate/_relrotarg_valref/_relrotarg_valref.output.txt
      Raw output:
      BEGIN EXECUTION
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=/datadisks/disk1/work/B49409A4/p
      > /datadisks/disk1/work/B49409A4/w/C50E0A37/e/JIT/Methodical/explicit/rotate/_relrotarg_valref/_relrotarg_valref.sh
      Expected: True
      Actual:   False
      Stack Trace:
           at JIT_Methodical._explicit_rotate__relrotarg_valref__relrotarg_valref_._explicit_rotate__relrotarg_valref__relrotarg_valref_sh()
      Output:
        System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
           at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
           at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
           at NuGet.Common.Migrations.MigrationRunner.Run()
           at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
           at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
           at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
           at Microsoft.DotNet.Cli.Program.Main(String[] args)
        
        Return code:      1
        Raw output file:      /datadisks/disk1/work/B49409A4/w/C50E0A37/uploads/Reports/JIT.Methodical/explicit/rotate/_relrotarg_valref/_relrotarg_valref.output.txt
        Raw output:
        BEGIN EXECUTION
        Test Harness Exitcode is : 1
        To run the test:
        > set CORE_ROOT=/datadisks/disk1/work/B49409A4/p
        > /datadisks/disk1/work/B49409A4/w/C50E0A37/e/JIT/Methodical/explicit/rotate/_relrotarg_valref/_relrotarg_valref.sh
  Finished:    JIT.Methodical.XUnitWrapper
=== TEST EXECUTION SUMMARY ===
   JIT.Methodical.XUnitWrapper  Total: 113, Errors: 0, Failed: 1, Skipped: 0, Time: 103.139s

carlossanlop avatar Oct 19 '23 00:10 carlossanlop

That unfortunate. It seems the release/6.0 branch is currently using the latest runtime that would have the fix. The fix may not fix things if the permissions issue is retained, such as if this ran on a VM where an unfixed runtime was used, and would be unlikely if a container is being used (unless the permissions issue occurred during container setup). PR https://github.com/dotnet/runtime/pull/92603 added some additional diagnostics info, if this happens in .NET 9 CIs hopefully we'll get more info about what's happening.

kouvel avatar Oct 19 '23 18:10 kouvel

@kouvel One more hit in 6.0, now in the branding PR for 6.0.26:

  • PR: https://github.com/dotnet/runtime/pull/94482
  • Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=462335&view=results
  • Queue: Build Browser wasm Release AllSubsets_Mono_RuntimeTests
  • Job: https://dev.azure.com/dnceng-public/public/_build/results?buildId=462335&view=logs&j=2296eecc-f5ab-523f-c15d-f45eef1bfdea&t=d328b091-66a6-5d96-5a21-3cf77f57f009
  • Log file: https://helixre107v0xd1eu3ibi6ka.blob.core.windows.net/dotnet-runtime-refs-pull-94482-merge-fa96aba7885d4c37b2/JIT.Methodical.eE/1/console.940c0e2b.log?helixlogtype=result
  • Output:
    JIT/Methodical/explicit/basic/_il_relrefloc_r8/_il_relrefloc_r8.sh [FAIL]
      System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
         at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
         at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
         at NuGet.Common.Migrations.MigrationRunner.Run()
         at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
         at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
         at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
         at Microsoft.DotNet.Cli.Program.Main(String[] args)
      
      Return code:      1
      Raw output file:      /datadisks/disk1/work/B3750922/w/BC5D0A34/uploads/Reports/JIT.Methodical/explicit/basic/_il_relrefloc_r8/_il_relrefloc_r8.output.txt
      Raw output:
      BEGIN EXECUTION
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=/datadisks/disk1/work/B3750922/p
      > /datadisks/disk1/work/B3750922/w/BC5D0A34/e/JIT/Methodical/explicit/basic/_il_relrefloc_r8/_il_relrefloc_r8.sh
      Expected: True
      Actual:   False
      Stack Trace:
           at JIT_Methodical._explicit_basic__il_relrefloc_r8__il_relrefloc_r8_._explicit_basic__il_relrefloc_r8__il_relrefloc_r8_sh()
      Output:
        System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
           at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
           at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
           at NuGet.Common.Migrations.MigrationRunner.Run()
           at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
           at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
           at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
           at Microsoft.DotNet.Cli.Program.Main(String[] args)
        
        Return code:      1
        Raw output file:      /datadisks/disk1/work/B3750922/w/BC5D0A34/uploads/Reports/JIT.Methodical/explicit/basic/_il_relrefloc_r8/_il_relrefloc_r8.output.txt
        Raw output:

carlossanlop avatar Nov 07 '23 22:11 carlossanlop

Continues affecting 6.0. Example: https://github.com/dotnet/runtime/pull/99787

  • Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=603897
  • Queue: Build Browser wasm Release AllSubsets_Mono_RuntimeTests
  • Job result: https://dev.azure.com/dnceng-public/public/_build/results?buildId=603897&view=logs&j=2296eecc-f5ab-523f-c15d-f45eef1bfdea&t=d328b091-66a6-5d96-5a21-3cf77f57f009&l=69
  • Log file: https://helixre107v0xd1eu3ibi6ka.blob.core.windows.net/dotnet-runtime-refs-pull-99787-merge-72b2efd66b064faca7/JIT.Methodical.eE/1/console.13eabec1.log?helixlogtype=result
  • Output:
+ dotnet /datadisks/disk1/work/B8260A01/p/xunit/xunit.console.dll JIT/Methodical/JIT.Methodical.XUnitWrapper.dll -parallel collections -nocolor -noshadow -xml testResults.xml -trait TestGroup=JIT.Methodical.eE
Microsoft.DotNet.XUnitConsoleRunner v2.5.0 (64-bit .NET 6.0.27)
  Discovering: JIT.Methodical.XUnitWrapper (method display = ClassAndMethod, method display options = None)
  Discovered:  JIT.Methodical.XUnitWrapper (found 113 of 695 test cases)
  Starting:    JIT.Methodical.XUnitWrapper (parallel test collections = on, max threads = 2)
    JIT/Methodical/explicit/basic/_relrefarg_o/_relrefarg_o.sh [FAIL]
      System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
         at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
         at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
         at NuGet.Common.Migrations.MigrationRunner.Run()
         at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
         at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
         at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
         at Microsoft.DotNet.Cli.Program.Main(String[] args)
      
      Return code:      1
      Raw output file:      /datadisks/disk1/work/B8260A01/w/9FD208F8/uploads/Reports/JIT.Methodical/explicit/basic/_relrefarg_o/_relrefarg_o.output.txt
      Raw output:
      BEGIN EXECUTION
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=/datadisks/disk1/work/B8260A01/p
      > /datadisks/disk1/work/B8260A01/w/9FD208F8/e/JIT/Methodical/explicit/basic/_relrefarg_o/_relrefarg_o.sh
      Expected: True
      Actual:   False
      Stack Trace:
           at JIT_Methodical._explicit_basic__relrefarg_o__relrefarg_o_._explicit_basic__relrefarg_o__relrefarg_o_sh()
      Output:
        System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
           at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
           at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
           at NuGet.Common.Migrations.MigrationRunner.Run()
           at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
           at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
           at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
           at Microsoft.DotNet.Cli.Program.Main(String[] args)
        
        Return code:      1
        Raw output file:      /datadisks/disk1/work/B8260A01/w/9FD208F8/uploads/Reports/JIT.Methodical/explicit/basic/_relrefarg_o/_relrefarg_o.output.txt
        Raw output:
        BEGIN EXECUTION
        Test Harness Exitcode is : 1
        To run the test:
        > set CORE_ROOT=/datadisks/disk1/work/B8260A01/p
        > /datadisks/disk1/work/B8260A01/w/9FD208F8/e/JIT/Methodical/explicit/basic/_relrefarg_o/_relrefarg_o.sh
  Finished:    JIT.Methodical.XUnitWrapper

carlossanlop avatar Mar 14 '24 22:03 carlossanlop

@carlossanlop I'm facing the same issue with 8.0.2 do you know any workaround for this? thanks!

Namanl2001 avatar Mar 26 '24 19:03 Namanl2001

We're seeing

Running command in /home/runner/work/semmle-code/semmle-code/target/codeql-csharp-integration-tests/ql/csharp/ql/integration-tests/all-platforms/cshtml: [dotnet, build]
[2024-07-18 11:48:16] [build-stderr] System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
[2024-07-18 11:48:16] [build-stderr]    at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
[2024-07-18 11:48:16] [build-stderr]    at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
[2024-07-18 11:48:16] [build-stderr]    at NuGet.Common.Migrations.MigrationRunner.Run(String migrationsDirectory)
[2024-07-18 11:48:16] [build-stderr]    at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
[2024-07-18 11:48:16] [build-stderr]    at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
[2024-07-18 11:48:16] [build-stderr]    at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
[2024-07-18 11:48:16] [build-stderr]    at Microsoft.DotNet.Cli.Program.Main(String[] args)

with 8.0.101 on our CI (linux, ubuntu 22.04, GitHub actions). Is there any progress on this issue?

criemen avatar Jul 18 '24 12:07 criemen