Bug 1479740 - import psutil fails frequently
Summary: import psutil fails frequently
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-psutil
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-09 10:05 UTC by Xavier Bachelot
Modified: 2020-11-30 15:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-30 15:57:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Xavier Bachelot 2017-08-09 10:05:17 UTC
Description of problem:
We are using the python-psutil package on EL6 and are frequently encountering the following error :

Traceback (most recent call last):
File "/tmp/ansible_6ujUs4/ansible_module_wait_for.py", line 34, in
import psutil
File "/usr/lib64/python2.6/site-packages/psutil/__init__.py", line 64, in
import psutil._pslinux as _psplatform
File "/usr/lib64/python2.6/site-packages/psutil/_pslinux.py", line 86, in
_TERMINAL_MAP = _psposix._get_terminal_map()
File "/usr/lib64/python2.6/site-packages/psutil/_psposix.py", line 116, in _get_terminal_map
ret[os.stat(name).st_rdev] = name
OSError: [Errno 2] No such file or directory: '/dev/pts/0'


Version-Release number of selected component (if applicable):
python-psutil-0.6.1-1.el6

How reproducible:
Not always, but very frequently.


I've taken a look at upstream bug tracker and it seems to be :
https://github.com/giampaolo/psutil/issues/341
which is fixed in this commit :
https://github.com/giampaolo/psutil/commit/5b50df569558456bccde708ee478681673701dae
so I believe this is fixed in psutil 0.7.0

In order to try and fix the bug on our side, I rebuilt an rpm based on the epel7 branch, which currently ships python-psutil 2.2.1.
This cured the bug for us.

So, could you please update the el6 branch to match what's in the epel7 branch ?

Regards,
Xavier

Comment 1 Xavier Bachelot 2017-11-28 11:39:10 UTC
gentle ping. We've been using the locally updated python-psutil 2.2.1 package on EL6 with no issue for several months.

Comment 2 Fedora Update System 2017-11-30 21:37:02 UTC
python-psutil-2.2.1-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1290b498a8

Comment 3 Fedora Update System 2017-12-02 08:31:43 UTC
python-psutil-2.2.1-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1290b498a8

Comment 4 Vincent Brillault 2017-12-08 13:20:36 UTC
python-psutil 2.2.1 is a huge (incompatible) jump in version from 0.6.1, in particular with regard to the Process.{,set_}{,io}nice API:
* In 0.6.1, Process.{,io}nice are deprecated properties and Process.{get,set}_{,io}nice should be used to get and change the {,io}nice
* In 2.2.1, Process.{,io}nice are methods and Process.{get,set}_{,io}nice are deprecated and raise a warning

Here are two reproducers:
```
python -c "import os;import psutil; p = psutil.Process(os.getpid()); p.set_nice(18); p.set_ionice(psutil.IOPRIO_CLASS_BE, 6)"
python -c "import os;import psutil; p = psutil.Process(os.getpid()); p.nice(18); p.ionice(psutil.IOPRIO_CLASS_BE, 6)"
```

* When using 0.6.1, the 1st works properly and the 2nd results in:
```
-c:1: DeprecationWarning: this property is deprecated; use Process.get_nice() method instead
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: 'int' object is not callable
```

* When using 2.2.1, the 2nd works properly and the 1st results in:
```
-c:1: DeprecationWarning: set_nice() is deprecated; use nice() instead
-c:1: DeprecationWarning: set_ionice() is deprecated; use ionice() instead
```

Comment 5 Ben Cotton 2020-11-05 16:49:24 UTC
This message is a reminder that EPEL 6 is nearing its end of life. Fedora will stop maintaining and issuing updates for EPEL 6 on 2020-11-30. It is our policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of 'el6'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later EPEL version.

Thank you for reporting this issue and we are sorry that we were not able to fix it before EPEL 6 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged  change the 'version' to a later Fedora version prior this bug is closed as described in the policy above.

Comment 6 Ben Cotton 2020-11-30 15:57:33 UTC
EPEL el6 changed to end-of-life (EOL) status on 2020-11-30. EPEL el6 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
EPEL please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.