Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904501 - Setting PORTAGE_SCHEDULING_POLICY to "idle" in make.conf breaks emerge in Hardened Musl
Summary: Setting PORTAGE_SCHEDULING_POLICY to "idle" in make.conf breaks emerge in Har...
Status: RESOLVED DUPLICATE of bug 904502
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-18 06:44 UTC by Franco Gutiérrez
Modified: 2023-04-18 06:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Franco Gutiérrez 2023-04-18 06:44:09 UTC
When setting the PORTAGE_SCHEDULING_POLICY="idle" variable in make.conf, attempting to run emerge --info (or any other emerge command) results in an error. Specifically, the following traceback is thrown:

```
# emerge --info
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.10/emerge", line 58, in <module>
    retval = emerge_main()
  File "/usr/lib/python3.10/site-packages/_emerge/main.py", line 1294, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib/python3.10/site-packages/_emerge/actions.py", line 3527, in run_action
    apply_priorities(emerge_config.target_config.settings)
  File "/usr/lib/python3.10/site-packages/_emerge/actions.py", line 3073, in apply_priorities
    set_scheduling_policy(settings)
  File "/usr/lib/python3.10/site-packages/_emerge/actions.py", line 3154, in set_scheduling_policy
    os.sched_setscheduler(portage.getpid(), policy, os.sched_param(scheduling_priority))
  File "/usr/lib/python3.10/site-packages/portage/__init__.py", line 281, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 38] Function not implemented
```


This error appears to indicate that the sched_setscheduler function is not implemented, likely due to some issue with the PORTAGE_SCHEDULING_POLICY setting.

# TECHNICAL INFORMATION
# Steps to reproduce:
Set PORTAGE_SCHEDULING_POLICY="idle" in make.conf.
Run emerge --info command.

# Expected behavior:
emerge --info should run successfully with the PORTAGE_SCHEDULING_POLICY="idle" setting in make.conf.

# Actual behavior:
The command fails with an OSError: [Errno 38] Function not implemented.

# Workaround:
Unset the PORTAGE_SCHEDULING_POLICY="idle" setting in make.conf.

# Additional information:
Gentoo Hardened Musl

Thank you for your attention to this issue.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-18 06:47:14 UTC

*** This bug has been marked as a duplicate of bug 904502 ***