Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Crash and restart: 'failed to get priority' #433

Closed
LinuxOnTheDesktop opened this issue Oct 23, 2021 · 2 comments · Fixed by #434
Closed

Crash and restart: 'failed to get priority' #433

LinuxOnTheDesktop opened this issue Oct 23, 2021 · 2 comments · Fixed by #434

Comments

@LinuxOnTheDesktop
Copy link

LinuxOnTheDesktop commented Oct 23, 2021

My system

Ananicy version: unknown - I can't find a way to get the program to report its version, and/but the version that I have is a fairly recent git version.

OS: Mint Cinnamon 20.2.

Problem

$ journalctl -efu ananicy.service
-- Logs begin at Wed 2021-10-20 04:39:20 BST. --
Oct 23 00:59:36 x1 systemd[1]: Starting Ananicy - ANother Auto NICe daemon...
Oct 23 00:59:36 x1 sysctl[1209137]: kernel.sched_autogroup_enabled = 0
Oct 23 00:59:36 x1 systemd[1]: Started Ananicy - ANother Auto NICe daemon.
Oct 23 14:50:53 x1 ananicy[1707820]: renice: failed to get priority for 1707784 (process ID): No such process
Oct 23 16:58:12 x1 ananicy[1826009]: ionice: ioprio_set failed: No such process
Oct 23 17:05:50 x1 ananicy[1209146]: Error:
Oct 23 17:05:50 x1 ananicy[1209146]: Error:
Oct 23 17:05:50 x1 ananicy[1209146]: Traceback (most recent call last):
Oct 23 17:05:50 x1 ananicy[1209146]:   File "/usr/bin/ananicy", line 841, in <module>
Oct 23 17:05:50 x1 ananicy[1209146]:     main(sys.argv)
Oct 23 17:05:50 x1 ananicy[1209146]:   File "/usr/bin/ananicy", line 820, in main
Oct 23 17:05:50 x1 ananicy[1209146]:     daemon.run()
Oct 23 17:05:50 x1 ananicy[1209146]:   File "/usr/bin/ananicy", line 714, in run
Oct 23 17:05:50 x1 ananicy[1209146]:     for tpid in self.proc_map_update():
Oct 23 17:05:50 x1 ananicy[1209146]:   File "/usr/bin/ananicy", line 678, in proc_map_update
Oct 23 17:05:50 x1 ananicy[1209146]:     for tpid in self.__proc_tpids():
Oct 23 17:05:50 x1 ananicy[1209146]:   File "/usr/bin/ananicy", line 673, in __proc_tpids
Oct 23 17:05:50 x1 ananicy[1209146]:     yield TPID(int(pid), int(tpid), verbose_opts=self.verbose)
Oct 23 17:05:50 x1 ananicy[1209146]:   File "/usr/bin/ananicy", line 71, in __init__
Oct 23 17:05:50 x1 ananicy[1209146]:     self.exe = os.path.realpath("/proc/{}/exe".format(pid))
Oct 23 17:05:50 x1 ananicy[1209146]:   File "/usr/lib/python3.8/posixpath.py", line 391, in realpath
Oct 23 17:05:50 x1 ananicy[1209146]:     path, ok = _joinrealpath(filename[:0], filename, {})
Oct 23 17:05:50 x1 ananicy[1209146]:   File "/usr/lib/python3.8/posixpath.py", line 439, in _joinrealpath
Oct 23 17:05:50 x1 ananicy[1209146]:     path, ok = _joinrealpath(path, os.readlink(newpath), seen)
Oct 23 17:05:50 x1 ananicy[1209146]: FileNotFoundError: [Errno 2] No such file or directory: '/proc/1847849/exe'
Oct 23 17:05:50 x1 systemd[1]: ananicy.service: Main process exited, code=exited, status=1/FAILURE
Oct 23 17:05:50 x1 sysctl[1849741]: kernel.sched_autogroup_enabled = 1
Oct 23 17:05:50 x1 systemd[1]: ananicy.service: Failed with result 'exit-code'.
Oct 23 17:05:50 x1 systemd[1]: ananicy.service: Consumed 2min 17.394s CPU time.
Oct 23 17:05:50 x1 systemd[1]: ananicy.service: Scheduled restart job, restart counter is at 1.
Oct 23 17:05:50 x1 systemd[1]: Stopped Ananicy - ANother Auto NICe daemon.
Oct 23 17:05:50 x1 systemd[1]: ananicy.service: Consumed 2min 17.394s CPU time.
Oct 23 17:05:50 x1 systemd[1]: Starting Ananicy - ANother Auto NICe daemon...
Oct 23 17:05:50 x1 sysctl[1849758]: kernel.sched_autogroup_enabled = 0
Oct 23 17:05:50 x1 systemd[1]: Started Ananicy - ANother Auto NICe daemon.
Oct 23 17:14:57 x1 systemd[1]: Stopping Ananicy - ANother Auto NICe daemon...
Oct 23 17:14:57 x1 sysctl[1879956]: kernel.sched_autogroup_enabled = 1
Oct 23 17:14:57 x1 systemd[1]: ananicy.service: Succeeded.
Oct 23 17:14:57 x1 systemd[1]: Stopped Ananicy - ANother Auto NICe daemon.
Oct 23 17:14:57 x1 systemd[1]: ananicy.service: Consumed 8.719s CPU time.
Oct 23 17:15:23 x1 systemd[1]: Starting Ananicy - ANother Auto NICe daemon...
Oct 23 17:15:23 x1 sysctl[1881540]: kernel.sched_autogroup_enabled = 0
Oct 23 17:15:23 x1 systemd[1]: Started Ananicy - ANother Auto NICe daemon.
^C
$ systemctl status ananicy
● ananicy.service - Ananicy - ANother Auto NICe daemon
     Loaded: loaded (/lib/systemd/system/ananicy.service; disabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-10-23 17:15:23 BST; 5min ago
    Process: 1881540 ExecStartPre=/sbin/sysctl -e kernel.sched_autogroup_enabled=0 (code=exited, status=0/SUCCESS)
   Main PID: 1881541 (python3)
      Tasks: 1 (limit: 18987)
     Memory: 11.9M (high: 16.0M max: 64.0M)
        CPU: 4.700s
     CGroup: /system.slice/ananicy.service
             └─1881541 python3 /usr/bin/ananicy start

Oct 23 17:15:23 x1 systemd[1]: Starting Ananicy - ANother Auto NICe daemon...
Oct 23 17:15:23 x1 sysctl[1881540]: kernel.sched_autogroup_enabled = 0
Oct 23 17:15:23 x1 systemd[1]: Started Ananicy - ANother Auto NICe daemon.

Thoughts

Recently, in order to fix something in my OS, I had to reinstall - using apt - various python3- packages. Could that be the cause?

@izissise
Copy link
Contributor

I made a PR that sould fix your issue

@LinuxOnTheDesktop
Copy link
Author

That's good! I await a merge and a release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants