Bug 40875

Summary: EOFError when loading appcenter cache
Product: UCS Reporter: Florian Best <best>
Component: UMC - App-CenterAssignee: Florian Best <best>
Status: CLOSED FIXED QA Contact: Dirk Wiesenthal <wiesenthal>
Severity: normal    
Priority: P5    
Version: UCS 4.1   
Target Milestone: UCS 4.1-1-errata   
Hardware: Other   
OS: Linux   
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): Error handling, External feedback
Max CVSS v3 score:
Attachments: patch

Description Florian Best univentionstaff 2016-03-10 07:15:06 CET
Execution of command 'apps/get' has failed:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 283, in execute
    function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/apps/__init__.py", line 60, in get
    app = AppManager.find(application)
  File "%PY2.7%/univention/appcenter/app.py", line 1024, in find
    apps = cls.get_all_apps_with_id(app_id)
  File "%PY2.7%/univention/appcenter/app.py", line 1015, in get_all_apps_with_id
    for app in cls._get_every_single_app():
  File "%PY2.7%/univention/appcenter/app.py", line 970, in _get_every_single_app
    cls._cache = load(fd)
EOFError
Comment 1 Florian Best univentionstaff 2016-03-10 07:15:30 CET
4.1-1 errata125 (Vahr)
Comment 2 Florian Best univentionstaff 2016-03-10 07:16:42 CET
Maybe during upgrade of the appcenter package because the cache file is removed in the postinst?
Comment 3 Florian Best univentionstaff 2016-03-10 07:39:03 CET
Reproduce:
pkill -f appcenter; rm /var/cache/univention-appcenter/.apps.en.pkl; touch /var/cache/univention-appcenter/.apps.en.pkl;
Comment 4 Florian Best univentionstaff 2016-03-10 07:40:38 CET
Current workaround: rm /var/cache/univention-appcenter/.*.pkl
Comment 5 Florian Best univentionstaff 2016-03-10 08:02:21 CET
Created attachment 7525 [details]
patch
Comment 6 Florian Best univentionstaff 2016-03-11 06:53:54 CET
univention-appcenter (5.0.20-21):
r68034 | Bug #40875: fix EOFError if pickle cache file is empty

univention-appcenter.yaml:
r68036 | YAML Bug #40754 Bug #40875
Comment 7 Dirk Wiesenthal univentionstaff 2016-03-14 01:00:25 CET
I am able to reproduce it. With the latest version, it is gone. But the error seems to be Pickle related, this is not an issue with the new JSON cache.
Comment 8 Florian Best univentionstaff 2016-03-14 07:57:08 CET
Reported again, 4.1-1 errata126 (Vahr)
Comment 9 Philipp Hahn univentionstaff 2016-03-17 14:28:55 CET
<http://errata.software-univention.de/ucs/4.1/130.html>