Bug 35003 - Traceback in stopped_notifier() if any process dies
Traceback in stopped_notifier() if any process dies
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Ucsschool-lib
UCS@school 3.2 R2
Other Linux
: P5 normal (vote)
: UCS@school 3.2 R2 Errata
Assigned To: Florian Best
Dirk Wiesenthal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-28 08:34 CEST by Sönke Schwardt-Krummrich
Modified: 2014-08-27 17:01 CEST (History)
0 users

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2014-05-28 08:34:26 CEST
A ucs-test script throwed the following traceback. Looks like a process died at the moment, stopped_notifier() was trying to determine if the notifier is running.

Traceback (most recent call last):
  File "/usr/share/ucs-school-import/scripts/create_ou", line 3176, in <module>
    with stopped_notifier():
  File "/usr/lib/python2.6/contextlib.py", line 16, in __enter__
    return self.gen.next()
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/utils.py", line 156, in stopped_notifier
    if process.name == service_name:
  File "/usr/lib/pymodules/python2.6/psutil/__init__.py", line 205, in name
    self.deproxy()
  File "/usr/lib/pymodules/python2.6/psutil/__init__.py", line 180, in deproxy
    self._procinfo = ProcessInfo(*_platform_impl.get_process_info(self._procinfo.pid))
  File "/usr/lib/pymodules/python2.6/psutil/_pslinux.py", line 108, in wrapper
    return method(self, pid, *args, **kwargs)
  File "/usr/lib/pymodules/python2.6/psutil/_pslinux.py", line 123, in wrapper
    return callable(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/psutil/_pslinux.py", line 162, in get_process_info
    cmdline = [x for x in f.read().split('\x00') if x]
IOError: [Errno 3] No such process

Maybe a try-except around "if process.name == service_name:" is already sufficient as fix.
Comment 1 Florian Best univentionstaff 2014-08-18 14:59:29 CEST
The suggested solution is reasonable and has been implemented.
Changelog added.
Comment 2 Dirk Wiesenthal univentionstaff 2014-08-21 23:46:59 CEST
Changelog: Ok
Changeset: Ok
Tested and worked
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2014-08-27 17:01:40 CEST
UCS@school 3.2 R2 v2 has been released:
http://docs.univention.de/release-notes-ucsschool-3.2R2v2-de.html

If this error occurs again, please use "Clone This Bug".