Skip to content

sporadic build break due to contention on output of runtime.native.System.IO.Ports #57049

Description

@danmoseley

(using latest runtime-main in runtimelab, which closely matches runtime main)

https://dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_apis/build/builds/1282740/logs/50

2021-08-08T21:03:01.3591342Z D:\workspace\_work\1\s\.packages\microsoft.sourcelink.common\1.1.0-beta-20206-02\build\Microsoft.SourceLink.Common.targets(52,5): error : Error writing to source link file 'D:\workspace\_work\1\s\artifacts\obj\runtime.native.System.IO.Ports\netstandard2.0-Release\runtime.native.System.IO.Ports.sourcelink.json': The process cannot access the file 'D:\workspace\_work\1\s\artifacts\obj\runtime.native.System.IO.Ports\netstandard2.0-Release\runtime.native.System.IO.Ports.sourcelink.json' because it is being used by another process. [D:\workspace\_work\1\s\src\libraries\System.IO.Ports\pkg\runtime.native.System.IO.Ports.proj]
2021-08-08T21:03:01.3703075Z ##[error].packages\microsoft.sourcelink.common\1.1.0-beta-20206-02\build\Microsoft.SourceLink.Common.targets(52,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Error writing to source link file 'D:\workspace\_work\1\s\artifacts\obj\runtime.native.System.IO.Ports\netstandard2.0-Release\runtime.native.System.IO.Ports.sourcelink.json': The process cannot access the file 'D:\workspace\_work\1\s\artifacts\obj\runtime.native.System.IO.Ports\netstandard2.0-Release\runtime.native.System.IO.Ports.sourcelink.json' because it is being used by another process.
2021-08-08T21:03:01.3756133Z   runtime.native.System.IO.Ports -> 

Usually this means the project is building twice concurrently (ie., with different global properties)
In a working build,

Note this is the neutral architecture flavor, ie, there are:

artifacts\obj\runtime.linux-arm.runtime.native.System.IO.Ports
artifacts\obj\runtime.linux-arm64.runtime.native.System.IO.Ports
artifacts\obj\runtime.linux-x64.runtime.native.System.IO.Ports
artifacts\obj\runtime.native.System.IO.Ports
artifacts\obj\runtime.osx-x64.runtime.native.System.IO.Ports

Looking at the log from a successful OSX build, it appears the project is being built twice:

2021-08-08T20:59:53.6424340Z   runtime.native.System.IO.Ports -> 
2021-08-08T20:59:53.6951010Z   runtime.osx-x64.runtime.native.System.IO.Ports -> 
2021-08-08T20:59:58.8549420Z   runtime.linux-arm.runtime.native.System.IO.Ports -> 
2021-08-08T20:59:58.9744190Z   runtime.linux-arm64.runtime.native.System.IO.Ports -> 
2021-08-08T20:59:59.1130890Z   runtime.linux-x64.runtime.native.System.IO.Ports -> 
2021-08-08T20:59:59.3925740Z   runtime.osx-x64.runtime.native.System.IO.Ports -> 
2021-08-08T21:00:04.5208820Z   runtime.native.System.IO.Ports -> 

@ericstj any thoughts about where the issue might be? Ill try to get the bin log.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions