Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 4, 2025

Backport of #118085 to release/9.0-staging

When we start the child process, we clear all signal handlers. When using vfork, on Android, this operation ends up clearing the signal handlers also for the parent process. Revert to just using fork for simplicity.

vfork usage was added back in dotnet/corefx#33289, seems like there were some potential concerns then.

Legacy Xamarin was using fork.

Fixes #97209.

Customer Impact

  • Customer reported
  • Found internally

Using System.Diagnostics.Process.Start breaks the signal handlers of the runtime. This api can also be used as part of some BCL functionality, for example System.Net.NetworkingInformation.Ping. One of the side effects of this is that NRE is no longer thrown when dereferencing a null pointer. This essentially means that the runtime is completely broken after using Process.Start. This impacts users migrating from legacy Xamarin to MAUI.

Regression

  • Yes
  • No

Regression compared to legacy Xamarin. It was always broken on MAUI however.

Testing

Tested locally with sample application.

Risk

Low. This commit simply reverts to using fork instead of vfork on android. This was the default on Xamarin. While fork is less optimized (it might make the process start a few milliseconds slower and use more memory), it is not used heavily in MAUI. This also won't impact users, because customers using Process.Start before would run into other completely breaking issues anyway.

When we start the child process, we clear all signal handlers. This operations ends up clearing the signal handlers also for the parent process. Revert to just using fork for simplicity.
@BrzVlad BrzVlad added area-System.Diagnostics.Process Servicing-consider Issue for next servicing release review labels Aug 4, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-diagnostics-process
See info in area-owners.md if you want to be subscribed.

@BrzVlad BrzVlad added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 5, 2025
@jeffschwMSFT jeffschwMSFT added this to the 9.0.10 milestone Aug 15, 2025
@steveisok steveisok self-requested a review September 3, 2025 15:50
@steveisok steveisok enabled auto-merge (squash) September 3, 2025 15:50
@steveisok
Copy link
Member

/ba-g Too generic of a timeout

@steveisok steveisok merged commit a10b790 into release/9.0-staging Sep 4, 2025
104 of 106 checks passed
@steveisok steveisok deleted the backport/pr-118085-to-release/9.0-staging branch September 4, 2025 10:57
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants