Build/Test Issues

Test execution on grid nodes failing with "user-mapped section open" error

Started by stevewilliams on 1,446 views

In recent times, our grid nodes have started failing with this error:

[CIL Task ProcessorERROR: System.IO.IOException: The requested operation cannot be performed on a file with a user-mapped section open.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at nCrunch.Common.IO.FilePath.<>c__DisplayClass39_0.<WriteContent>b__0()
at nCrunch.Compiler.Cil.Manipulation.CilManipulatedFileContent.WriteToFile(FilePath outputFile)
at nCrunch.Compiler.Cil.Manipulation.CilManipulationOperation.WriteToFile()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly. . ()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly.Instrument(IInstrumentationFilter[] instrumentationFilters, PerfTracker perfTracker)
at nCrunch.Compiler.CilProcessingTasks.CilInstrumentationTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCi-73] ERROR: System.IO.IOException: The requested operation cannot be performed on a file with a user-mapped section open.

Any suggestions on possible causes would be much appreciated
Hi, thanks for sharing this issue.

Something is holding a file lock on one of your assemblies after its build has been completed.

This smells like a bad build step is involved. Are you running any custom build steps? Perhaps any Nuget packages that have additional build logic?
This post has been deleted.

Post a reply

Log in to reply.