Skip to content
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

InternalSetThreadPriority fails if raising priority on illumos #104276

Closed
gwr opened this issue Jul 2, 2024 · 1 comment · Fixed by #104278
Closed

InternalSetThreadPriority fails if raising priority on illumos #104276

gwr opened this issue Jul 2, 2024 · 1 comment · Fixed by #104278
Labels
area-PAL-coreclr in-pr There is an active PR which will close this issue when it is merged os-SunOS SunOS, currently not officially supported

Comments

@gwr
Copy link

gwr commented Jul 2, 2024

Description

Some tests (eg. helloworld) fail with this message:

Hello, World!
ASSERT [THREAD ] at .../src/coreclr/pal/src/thread/thread.cpp.1196:
Unable to set thread priority to 8 (error 1)
Abort (core dumped)

That error (1) is EPERM, and happens because on illumos, setting thread priority to a higher value requires privileges. We should take this code path on illumos:

#if SET_SCHEDPARAM_NEEDS_PRIVS
...

Reproduction Steps

Run helloworld on illumos

Expected behavior

Should function normally

Actual behavior

abort as shown avoce.

Regression?

not a regression

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 2, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jul 2, 2024
gwr added a commit to gwr/dotnet-runtime that referenced this issue Jul 2, 2024
…t#104276)

Need SET_SCHEDPARAM_NEEDS_PRIVS behavior on illumos

While here, fix up misguided sys/proc.h include
Applictions on illumos should either include just <procfs.h>
or if they must use <sys/procfs.h> then they need to
define _STRUCTURED_PROC = 1 as described in sys/procfs.h
gwr added a commit to gwr/dotnet-runtime that referenced this issue Jul 2, 2024
…t#104276)

Need SET_SCHEDPARAM_NEEDS_PRIVS behavior on illumos

While here, fix up misguided sys/proc.h include
Applictions on illumos should either include just <procfs.h>
or if they must use <sys/procfs.h> then they need to
define _STRUCTURED_PROC = 1 as described in sys/procfs.h
gwr added a commit to gwr/dotnet-runtime that referenced this issue Jul 2, 2024
@gwr
Copy link
Author

gwr commented Jul 2, 2024

@am11 could you please label this for illumos etc? Thanks

@am11 am11 added area-PAL-coreclr os-SunOS SunOS, currently not officially supported in-pr There is an active PR which will close this issue when it is merged and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jul 2, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-PAL-coreclr in-pr There is an active PR which will close this issue when it is merged os-SunOS SunOS, currently not officially supported
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants