Skip to content

Skip robust mutexes on OpenHarmony - #135321

Merged
jkotas merged 2 commits into
dotnet:mainfrom
springmin:pr/ohos-named-mutex
Oct 7, 2026
Merged

jkotas merged 2 commits into
dotnet:mainfrom
springmin:pr/ohos-named-mutex

Conversation

@springmin

Copy link
Copy Markdown
Contributor

The OpenHarmony musl sysroot does not provide the robust mutex APIs (pthread_mutexattr_setrobust / pthread_mutex_consistent), so named mutexes need to use the shared-memory-backed implementation there, mirroring the existing OpenBSD/Haiku/Apple guards. The check uses the internal OperatingSystem.IsOpenHarmony() helper that landed with #134670; there is no behavior change on any other platform.

This is the named-mutex half of #132827, split out as suggested by @jkotas: the shared-memory/TMPDIR portion and its test updates stay in #132827, pending the in-progress shared-memory design changes.

The OpenHarmony musl sysroot does not provide the robust mutex APIs
(pthread_mutexattr_setrobust / pthread_mutex_consistent), so named mutexes
must use the shared-memory-backed implementation there, mirroring the existing
OpenBSD/Haiku/Apple guards. The check uses the internal
OperatingSystem.IsOpenHarmony() helper; no behavior change elsewhere.

This is the named-mutex half of dotnet#132827, split out as suggested by @jkotas;
the shared-memory/TMPDIR portion stays in dotnet#132827 pending the in-progress
shared-memory design changes.
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Oct 7, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

springmin added a commit to springmin/runtime-ohos that referenced this pull request Oct 7, 2026
The split (only NamedMutex.Unix.cs, +3/-1, based on fresh main b08c345)
landed as dotnet#135321; during the split the MutexTests hunk turned out to be
shared-memory directory work and stays in dotnet#132827, which now holds only the
parked shared-memory/TMPDIR portion. The notify-comment draft for dotnet#132827 is
ready and awaits permission.
springmin added a commit to springmin/runtime-ohos that referenced this pull request Oct 7, 2026
issuecomment-6029025699 points the original PR thread at the split dotnet#135321 and
records that what remains (shared-memory TMPDIR handling + tests) stays parked
until the design work lands.
Comment thread src/libraries/System.Private.CoreLib/src/System/Threading/NamedMutex.Unix.cs Outdated
Comment thread src/libraries/System.Private.CoreLib/src/System/Threading/NamedMutex.Unix.cs Outdated
Merge the OpenHarmony note into the OpenBSD comment line and drop the separate
comment, as suggested by jkotas.
springmin added a commit to springmin/runtime-ohos that referenced this pull request Oct 7, 2026
The split PR was approved 23 minutes after creation (02:01Z), his two comment
suggestions are applied and pushed (net diff 2 lines); the push reset the
approval per repo policy, so it now waits for the re-approval/merge with CI
re-running. The timing evaluation gains the empirical datapoint: splitting
independent parts into clean small PRs is the proven fast lane.
@jkotas

jkotas commented Oct 7, 2026

Copy link
Copy Markdown
Member

/ba-g failure is known issue #135348

@jkotas
jkotas merged commit 5b3285f into dotnet:main Oct 7, 2026
141 of 143 checks passed
springmin added a commit to springmin/runtime-ohos that referenced this pull request Oct 7, 2026
The named-mutex split from dotnet#132827 was re-approved by jkotas and merged about
18.6 hours after creation (net diff 2 lines); his note records the Build
Analysis failure as the known issue dotnet#135348. The upstream state, the findings
register and the fast-lane datapoint are all updated.
springmin added a commit to springmin/runtime-ohos that referenced this pull request Oct 7, 2026
…netcore +10)

- runtime 14e8bce: merge-tree 34/40 CLEAN, same 6 CONFLICT as 10-05
  (Directory.Build.props; union resolution re-verified, byte-identical to
  the 10-05 fix); rebase 17/22 CLEAN, 3 CONFLICT unchanged; upstream
  dotnet#135321 landed named-mutex -> that ref is redundant (drop), sandbox-fixes
  deduped to TMPDIR + MutexTests
- sdk e4ea7d5ffa: 2/2 merge-tree CLEAN, 2/2 rebase SAME
- aspnetcore 851622243f: new eng/Dependencies.props delete/modify (dotnet#69631);
  resolution ported 4 RID lines to Directory.Packages.props and verified
  CLEAN(resolved), 5 files/21+/4- unchanged
- playbook section 5 (drift/results) + sections 6/7 (conflict status)
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Threading community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants