Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Don't oversubscribe cores for framework crossgen on macOS; raise single-assembly timeout - #130261

#130261
Merged
jtschuster merged 1 commit into
dotnet:maindotnet/runtime:mainfrom
jtschuster:jtschuster-crossgen2-parallelism-testjtschuster/runtime:jtschuster-crossgen2-parallelism-testCopy head branch name to clipboard
Jul 7, 2026
Merged

Don't oversubscribe cores for framework crossgen on macOS; raise single-assembly timeout#130261
jtschuster merged 1 commit into
dotnet:maindotnet/runtime:mainfrom
jtschuster:jtschuster-crossgen2-parallelism-testjtschuster/runtime:jtschuster-crossgen2-parallelism-testCopy head branch name to clipboard

Conversation

@jtschuster

@jtschuster jtschuster commented Jul 6, 2026

Copy link
Copy Markdown
Member

The Generate CORE_ROOT step compiles each framework assembly with a separate single-threaded crossgen2 process (-dop N --crossgen2-parallelism 1). On macOS the process count was cores+1, which oversubscribes and steals cycles from the critical-path System.Private.CoreLib compile, slowing the whole step. This uses exactly the core count instead.

Also raises the non-composite compilation timeout from 10 to 15 minutes so System.Private.CoreLib stops timing out on slower Mac CI machines.

Note

This PR was generated with the assistance of GitHub Copilot.

…le-assembly timeout

The Generate CORE_ROOT step compiles each framework assembly with a
separate single-threaded crossgen2 process (-dop N --crossgen2-parallelism 1).
On macOS the process count was cores+1, which oversubscribes and steals
cycles from the critical-path System.Private.CoreLib compile, slowing the
whole step. Use exactly the core count instead.

Also raise the non-composite compilation timeout from 10 to 15 minutes so
System.Private.CoreLib stops timing out on slower CI machines.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 6, 2026 20:12
@github-actions github-actions Bot added the area-crossgen2-coreclr only use for closed issues label Jul 6, 2026
@jtschuster jtschuster added area-ReadyToRun and removed area-crossgen2-coreclr only use for closed issues labels Jul 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts framework crossgen2 orchestration used by src/tests/build.sh to avoid oversubscribing CPU cores on macOS and reduces spurious failures by increasing the default single-assembly compilation timeout used by the r2rtest process runner.

Changes:

  • Update macOS processor-count detection to use the online core count exactly (removes the historical +1).
  • Increase r2rtest’s default non-composite compilation timeout from 10 to 15 minutes and document the rationale.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/tests/build.sh Use getconf _NPROCESSORS_ONLN (no +1) for macOS when computing NUMBER_OF_PROCESSORS passed to build.proj / crossgen2 -dop.
src/coreclr/tools/r2rtest/ProcessRunner.cs Raise DefaultIlcTimeout to 15 minutes and add explanatory comment for large single-assembly compiles.

@jtschuster
jtschuster merged commit d40dd13 into dotnet:main Jul 7, 2026
126 of 129 checks passed
@github-project-automation github-project-automation Bot moved this to Done in AppModel Jul 7, 2026
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 8, 2026
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
…le-assembly timeout (#130261)

The Generate CORE_ROOT step compiles each framework assembly with a
separate single-threaded crossgen2 process (`-dop N
--crossgen2-parallelism 1`). On macOS the process count was `cores+1`,
which oversubscribes and steals cycles from the critical-path
`System.Private.CoreLib` compile, slowing the whole step. This uses
exactly the core count instead.

Also raises the non-composite compilation timeout from 10 to 15 minutes
so `System.Private.CoreLib` stops timing out on slower Mac CI machines.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.