Bug 31319

Summary: atjobs.py is not EINTR-safe (errno 4)
Product: UCS Reporter: Sönke Schwardt-Krummrich <schwardt>
Component: univention-libAssignee: Alexander Kläser <klaeser>
Status: CLOSED FIXED QA Contact: Sönke Schwardt-Krummrich <schwardt>
Severity: normal    
Priority: P5 CC: gohmann, najjar, walkenhorst
Version: UCS 3.1   
Target Milestone: UCS 3.2-3-errata   
Hardware: Other   
OS: Linux   
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=36809
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:

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