Bug 31319 - atjobs.py is not EINTR-safe (errno 4)
atjobs.py is not EINTR-safe (errno 4)
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: univention-lib
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.2-3-errata
Assigned To: Alexander Kläser
Sönke Schwardt-Krummrich
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-08 15:03 CEST by Sönke Schwardt-Krummrich
Modified: 2014-11-18 15:05 CET (History)
3 users (show)

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:
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 2013-05-08 15:03:21 CEST
atjobs.py is not signal safe. Have a look at bug 31173 for further details.

> Traceback (most recent call last): 
>   File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute 
>     func( request ) 
>   File "/usr/lib/pymodules/python2.6/univention/management/console/modules/computerroom/__init__.py", line 598, in settings_set 
>     jobs = atjobs.list( extended = True ) 
>   File "/usr/lib/pymodules/python2.6/univention/lib/atjobs.py", line 110, in list 
>     for line in p.stdout: 
> IOError: [Errno 4] Unterbrechung während des Betriebssystemaufrufs 

Currently this seems to be no urgent problem but it should be fixed to avoid random tracebacks.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2014-07-16 09:57:05 CEST
This bug occurrs regulary in the ucs-test scripts for UCS@school.
Comment 2 Ammar Najjar univentionstaff 2014-07-21 12:46:02 CEST
This bug appears many times when trying to request ('computerroom/settings/get' or 'computerroom/settings/get') in Bug #35151.

A work around to ignore the test case where this bug appears was added for now, and need to be removed when this bug is fixed in function "essential.computerroom.check_room_settings()"
Comment 3 Alexander Kläser univentionstaff 2014-09-02 14:32:53 CEST
I checked for two things:
* subprocess.Popen() is called with stdout and stderr being piped.
* subprocess.communicate() is used (instead of iterating) as this will then be (together with point above) EINTR-safe.

The existing YAML 2014-08-28-univention-lib.yaml file has been extended.

univention-lib (3.0.26-66):
* Bug #31319: make sure that atjobs is EINTR-safe
Comment 4 Alexander Kläser univentionstaff 2014-09-04 10:36:06 CEST
Merged changes to 4.0 branch.

univention-lib (4.0.3-1):
* Bug #31319: make sure that atjobs is EINTR-safe
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2014-09-10 10:14:52 CEST
> I checked for two things:
> * subprocess.Popen() is called with stdout and stderr being piped.
→ OK
> * subprocess.communicate() is used (instead of iterating) as this will then
> be (together with point above) EINTR-safe.
→ OK

> The existing YAML 2014-08-28-univention-lib.yaml file has been extended.
→ OK

> univention-lib (3.0.26-66):
> * Bug #31319: make sure that atjobs is EINTR-safe
→ OK

> Merged changes to 4.0 branch.
> univention-lib (4.0.3-1):
> * Bug #31319: make sure that atjobs is EINTR-safe
→ OK

→ VERIFIED
Comment 6 Janek Walkenhorst univentionstaff 2014-09-10 17:35:49 CEST
http://errata.univention.de/ucs/3.2/191.html