Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
danmoseley opened this issue Aug 8, 2021 · 5 comments

Comments

@danmoseley
Copy link
Member

(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.

@ghost
Copy link

ghost commented Aug 8, 2021

Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

(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.

Author: danmoseley
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Aug 8, 2021
@safern
Copy link
Member

safern commented Aug 9, 2021

@ViktorHofer could it be related to the change of not having pkgproj's anymore?

@ViktorHofer
Copy link
Member

It most definitely is related to my change as before those files didn't exist. There's an offline Teams thread about this in which I commented that I will look into the issue. Haven't had time for it yet though.

@ViktorHofer ViktorHofer added this to the 6.0.0 milestone Aug 10, 2021
@ViktorHofer ViktorHofer removed the untriaged New issue has not been triaged by the area owner label Aug 10, 2021
@ViktorHofer
Copy link
Member

The binlog was overwritten by the second attempt :(

@ViktorHofer
Copy link
Member

Should be fixed by #57118. The runtime.native.System.IO.Ports.proj project was indeed overbuilding. That said, without a binlog I can't figure out why global properties differed.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants