Skip to content

SunOS process and thread support #105403

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

SunOS process and thread support #105403

wants to merge 2 commits into from

Conversation

gwr
Copy link
Contributor

@gwr gwr commented Jul 24, 2024

Read binary psinfo for System.Diagnostic.Process on SunOS (Solaris or illumos).
No failures in System.Diagnostic.Process.Tests (but lots of skip)

BTW, I tried rebasing on main from Mon. this week and ran into problems downloading stuff.
Not sure why, but it didn't seem to have anything to do with my changes.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jul 24, 2024
@am11
Copy link
Member

am11 commented Jul 24, 2024

Lets drop the changes which are already submitted in other PRs.

@am11
Copy link
Member

am11 commented Jul 24, 2024

Good start! I've left initial feedback, which I anticipate the maintainers will point out. :)

@am11 am11 added the os-SunOS SunOS, currently not officially supported label Jul 24, 2024
@gwr
Copy link
Contributor Author

gwr commented Jul 24, 2024

Good start! I've left initial feedback, which I anticipate the maintainers will point out. :)

Thanks. I had not yet seen #105207 when I opened this. I think @AustinWise and I should figure out how to get the prerequisite fixes shown there (and here) all integrated, and then I'll rebase the last parts of this onto that.

@gwr
Copy link
Contributor Author

gwr commented Jul 24, 2024

Lets drop the changes which are already submitted in other PRs.

I'd love to, but I do not see a way to do "stacked" PRs, where one PR targets the branch of another PR.
If I drop the prerequisite changes then things break. Suggestions welcome.

@am11
Copy link
Member

am11 commented Jul 24, 2024

Create a local branch feature/illumos-port with all the miscellaneous changes. Then keep this branch only for System.Diagnostics.Port changes. You can git cherry-pick <spaces-separated commit hashes> across the branches.

@am11 am11 added port labels Jun 26, 2025
@am11
Copy link
Member

am11 commented Jun 27, 2025

That commit is here a well because without that the code in this PR will not build. Once #117023 integrates I can rebase this and remove that commit.

You can have a separate local branch with mixed changes for testing. As far as pull request is concerned, anything unrelated to Port System.Diagnostics.Process to illumos should go into a separate PR. That’s not a “prerequisite”, it’s ongoing maintenance, which is expected in an active repo without CI for illumos. You don’t need to wait on issues that cropped up later or happened in parallel on main. When you opened this PR a year ago, main branch was building fine on illumos. Just keep this focused and moving forward, otherwise it's a never ending chore.

@gwr
Copy link
Contributor Author

gwr commented Jun 28, 2025

I updated this to use src/native/libs/System.Native C functions, which means we don't need to replicate the two procfs.h structures in the C# platform code. It should also be a bit more efficient. This works as well for me as the previous version I had in this PR.

I also got rid of the changes in other PR(s), but note that this doesn't build for illumos without the changes in #117023

@gwr
Copy link
Contributor Author

gwr commented Jul 2, 2025

Needs approvers. @am11 ?

@am11
Copy link
Member

am11 commented Jul 2, 2025

@dotnet/area-system-diagnostics-process, @janvorli, PTAL; this is a port of System.Diagnostis.Process to SunOS-like platforms.

@gwr
Copy link
Contributor Author

gwr commented Jul 8, 2025

What's the easiest way to get my SDK build onto my test system?
I copy the runtime over like this:

scp ${srv}:$dir/artifacts/packages/Debug/Shipping/dotnet-runtime-10.0.0-dev-illumos-x64.tar.gz .
gtar -xz -f dotnet-runtime-10.0.0-dev-illumos-x64.tar.gz

but I don't see any tar.gz files for the SDK. Just nuget files.
The runtime "dotnet --list-sdks" shows nothing.
I realize I can unzip them, but which *.nuget files? and where?
The docs suggest maybe dotnet on my test system can fetch and install them?
Thanks

@risc-vv
Copy link

risc-vv commented Jul 8, 2025

@dotnet/samsung Could you please take a look? These changes may be related to riscv64.

@risc-vv
Copy link

risc-vv commented Jul 8, 2025

RISC-V Release-CLR-QEMU: 9080 / 9110 (99.67%)
=======================
      passed: 9080
      failed: 2
     skipped: 599
      killed: 28
------------------------
 TOTAL tests: 9709
VIRTUAL time: 37h 31min 40s 282ms
   REAL time: 38min 18s 7ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V Release-CLR-VF2: 9081 / 9111 (99.67%)
=======================
      passed: 9081
      failed: 2
     skipped: 599
      killed: 28
------------------------
 TOTAL tests: 9710
VIRTUAL time: 11h 4min 34s 912ms
   REAL time: 45min 7s 506ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V Release-FX-QEMU: 281789 / 282868 (99.62%)
=======================
      passed: 281789
      failed: 1071
     skipped: 39
      killed: 8
------------------------
 TOTAL tests: 282907
VIRTUAL time: 31h 24min 10s 90ms
   REAL time: 1h 10min 51s 932ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

Build information and commands

GIT: 50e7a6d9adc71d22d142b7e338bdde62c9c2d75b
CI: 78e142fd33020d1c98d51294d2e82d7c5be9fbf2
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

am11 and others added 2 commits July 10, 2025 10:44
Update eng/Subsets.props

Co-authored-by: Adeel Mujahid <[email protected]>
Read /proc (binary) psinfo for System.Diagnostic.Process
using src/native/libs/System.Native C functions.

Add native/libs/System.Native/pal_io.c etc.
Add src/libraries/Common/src/Interop/SunOS/procfs
Add src/libraries/System.Diagnostics.Process

Co-authored-by: Austin Wise <[email protected]>
Co-authored-by: Adeel Mujahid <[email protected]>
@risc-vv
Copy link

risc-vv commented Jul 10, 2025

RISC-V Release-CLR-QEMU: 9082 / 9112 (99.67%)
=======================
      passed: 9082
      failed: 2
     skipped: 597
      killed: 28
------------------------
 TOTAL tests: 9709
VIRTUAL time: 37h 26min 40s 438ms
   REAL time: 38min 9s 841ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V Release-CLR-VF2: 9083 / 9113 (99.67%)
=======================
      passed: 9083
      failed: 2
     skipped: 597
      killed: 28
------------------------
 TOTAL tests: 9710
VIRTUAL time: 11h 43min 10s 548ms
   REAL time: 47min 22s 50ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V Release-FX-QEMU: 278604 / 279696 (99.61%)
=======================
      passed: 278604
      failed: 1083
     skipped: 39
      killed: 9
------------------------
 TOTAL tests: 279735
VIRTUAL time: 29h 11min 36s 714ms
   REAL time: 1h 11min 4s 97ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V Release-FX-VF2: 309598 / 311334 (99.44%)
=======================
      passed: 309598
      failed: 1729
     skipped: 39
      killed: 7
------------------------
 TOTAL tests: 311373
VIRTUAL time: 21h 13min 12s 292ms
   REAL time: 2h 17min 0s 803ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

Build information and commands

GIT: 3a905a16032b7a90d59d66c343b51123cb3e9f29
CI: d6c9c1ab3a7411819463edc05ded301e89ba586a
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Diagnostics.Process community-contribution Indicates that the PR has been added by a community member os-SunOS SunOS, currently not officially supported port
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants