-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
base: main
Are you sure you want to change the base?
SunOS process and thread support #105403
Conversation
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process |
Lets drop the changes which are already submitted in other PRs. |
src/libraries/Common/src/Interop/SunOS/procfs/Interop.ProcFsStat.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.SunOS.cs
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.BSD.cs
Outdated
Show resolved
Hide resolved
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. |
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.SunOS.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.SunOS.cs
Outdated
Show resolved
Hide resolved
I'd love to, but I do not see a way to do "stacked" PRs, where one PR targets the branch of another PR. |
Create a local branch |
Hi all, I've rebased this and have been trying to rebuild (after being away from it for a while) and my Ubuntu 22.04 system can't seem to get dotnet-runtime-10 etc. I have things setup as described in the README for this repo. but that seems to be out of date. Can anyone point me to more up-to-date instructions? Actually, maybe it's some other sort of chicken/egg problem. I see: Here is the detailed error output:
|
Yes, the build process has changed for community platforms: https://github.com/dotnet/runtime/blob/f0168ee80ba9aca18a7e7140b2bb436defda623c/docs/workflow/building/coreclr/cross-building.md#building-coreclr-with-bootstrapping Old: $ ./build.sh clr+libs --cross --os illumos New: $ ./build.sh clr+libs --cross --os illumos --bootstrap For rebuild (incremental changes), replace |
Thanks. I fixed a bunch of things. Here's what I get now when I try to build:
More hints? Oh, I tried this, and it helped:
though I assume that's a temporary work-around because that's the version of dotnet 10 I can easily get on my build system. |
You need to first build with The desired SDK version is automatically downloaded at Revert global.json, |
Still failing in a clean repo.
|
@am11 please see the latest commit on this branch, with my attempt to add support for platforms where !HAVE_DIRENT_D_TYPE (eg. illumos). This builds for me now. Thanks again for the help. |
2dd616d
to
f7d1a1d
Compare
I could use help figuring out what's causing all the automated test failures. |
Those are build failures, not test failures. You can click one of them to and follow Azure DevOps link to see the details. |
c71e167
to
40cb08a
Compare
Trying the commits in a different order. |
dotnet/runtime/src/native/minipal/debugger.c:127:5: error: implicit declaration of function 'snprintf' [-Werror=implicit-function-declaration] 127 | snprintf(statusFilename, sizeof(statusFilename), "/proc/%d/status", getpid()); | ^~~~~~~~
src/native/minipal/thread.h:73:23: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 73 | tid = (size_t)(void*)pthread_self(); | ^~~~~~~~~~~~~~~~~~~~~
/home/gwr/dotnet/runtime/src/coreclr/pal/src/thread/thread.cpp:1367:5: error: 'cid' was not declared in this scope 1367 | cid = CLOCK_THREAD_CPUTIME_ID; | ^~~
src/native/libs/System.Native/pal_mount.c:164:38: error: 'struct statvfs' has no member named 'f_type' 164 | *formatType = (int64_t)(stats.f_type); | ^
src/coreclr/vm/appdomain.hpp:1934:40: error: declaration of 'constexpr SystemDomain** const cdac_data<SystemDomain>::SystemDomain' changes meaning of 'SystemDomain' [-Wchanges-meaning] 1934 | static constexpr PTR_SystemDomain* SystemDomain = &SystemDomain::m_pSystemDomain; | ^~~~~~~~~~~~ src/coreclr/vm/appdomain.hpp:1934:56: note: used here to mean 'class SystemDomain' 1934 | static constexpr PTR_SystemDomain* SystemDomain = &SystemDomain::m_pSystemDomain; | ^~~~~~~~~~~~ src/coreclr/vm/appdomain.hpp:1629:7: note: declared here 1629 | class SystemDomain final | ^~~~~~~~~~~~
coreclr/runtime/amd64/AllocFast.S: Assembler messages: coreclr/runtime/amd64/AllocFast.S:237: Error: missing ')'
/runtime/src/coreclr/tools/superpmi/mcs/verbmerge.cpp: In static member function 'static bool verbMerge::DirectoryFilterDirectories(FilterArgType*)': /runtime/src/coreclr/tools/superpmi/mcs/verbmerge.cpp:188:19: error: 'verbMerge::FilterArgType' {aka 'struct dirent'} has no member named 'd_type' 188 | if (findData->d_type == DT_DIR) | ^~~~~~ and similar a few other places in this file
Read binary psinfo for System.Diagnostic.Process on SunOS Thanks for initial prototype help from: Austin Wise <[email protected]> Add Try prefix to SunOS Interop functions Get rid of unsafe for procfs get methods Fix Copilot error in System/Diagnostics/ProcessManager.SunOS.cs Co-authored-by: Copilot <[email protected]>
Building on top of the workaround am11@427f679 |
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.