Bug 31282 - Appcenter module died during app update
Appcenter module died during app update
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 3.1
Other Linux
: P3 normal (vote)
: UCS 3.1-1-errata
Assigned To: Dirk Wiesenthal
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-05 12:45 CEST by Sönke Schwardt-Krummrich
Modified: 2013-05-22 16:10 CEST (History)
5 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:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
gdb traceback appcenter module (44.19 KB, text/plain)
2013-05-06 12:47 CEST, Sönke Schwardt-Krummrich
Details
core file of crashed appcenter module (7.00 MB, application/octet-stream)
2013-05-07 09:39 CEST, Sönke Schwardt-Krummrich
Details

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-05 12:45:59 CEST
The appcenter module died during updating an app. DC master with UCS 3.1-0err85 (before the update!) The app update seems to have completed successfully but the progress bar is frozen at 50%.
Pressing F5 in browser reloads the UMC and the update is shown as complete. apt-get dist-upgrade shows no problems.

---[management-console-server.log]---
29.04.13 15:19:33.598  MAIN        ( WARN    ) : Client: _recv: error on socket: [Errno 104] Die Verbindung wurde vom Kommunikationspartner zur?ckgesetzt
29.04.13 15:19:33.598  MAIN        ( WARN    ) : Socket died (module=appcenter)
29.04.13 15:19:33.598  MAIN        ( WARN    ) : Module process appcenter died (pid: 32128, exit status: -1, signal: -1)
29.04.13 15:19:33.598  MAIN        ( WARN    ) : Cleaning up requests
29.04.13 15:19:33.598  MAIN        ( WARN    ) : Invalidating all pending requests 136724157337001-547
29.04.13 15:19:33.598  MAIN        ( WARN    ) : Remove inactivity timer
29.04.13 15:19:33.608  MAIN        ( PROCESS ) : ModuleProcess: child died
29.04.13 15:19:33.608  MAIN        ( WARN    ) : Module process appcenter died (pid: 32128, exit status: -1, signal: 6)
29.04.13 15:20:13.480  MAIN        ( PROCESS ) : running: ['/usr/sbin/univention-management-console-module', '-m', 'appcenter', '-s', '/var/run/univention-management-console/31792-1367241613479.socket', '-d', '2', '-l', 'de_DE.UTF-8']

---[management-console-module-appcenter.log]---
29.04.13 15:19:30.329  MODULE      ( PROCESS ) : Trigger für python-support werden verarbeitet ...
29.04.13 15:19:30.329  MODULE      ( PROCESS ) : Aufruf des Nach-Installations-Triggers python-support
29.04.13 15:20:13.564  DEBUG_INIT
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2013-05-06 12:47:25 CEST
Created attachment 5211 [details]
gdb traceback appcenter module

Seems to be reproducible. Crash happens in python-apt. gdb traceback has been attached.
Comment 2 Alexander Kläser univentionstaff 2013-05-06 15:33:12 CEST
Would be interesting to know what happens with an updated python-apt package. We have 0.7.100, wheezy ships with 0.8.8.2:

  http://packages.debian.org/source/wheezy/python-apt
Comment 3 Stefan Gohmann univentionstaff 2013-05-07 07:26:41 CEST
(In reply to comment #1)
> Created an attachment (id=5211) [details]
> gdb traceback appcenter module
> 
> Seems to be reproducible. Crash happens in python-apt. gdb traceback has been
> attached.

Could you append the core file?
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2013-05-07 09:39:34 CEST
Created attachment 5214 [details]
core file of crashed appcenter module
Comment 5 Dirk Wiesenthal univentionstaff 2013-05-07 10:12:18 CEST
(In reply to comment #2)
> Would be interesting to know what happens with an updated python-apt package.
> We have 0.7.100, wheezy ships with 0.8.8.2:
> 
>   http://packages.debian.org/source/wheezy/python-apt

Yes, but I did not manage to get this working:

root@master120:~# apt-get install python-apt univention-server-master
[...]
 python-apt : Depends: python (>= 2.6.6-7~) but 2.6.6-3.22.201205211619 is to be installed
Comment 6 Dirk Wiesenthal univentionstaff 2013-05-07 11:44:45 CEST
This only happens when app.install_dry_run() adds the component and does not remove it afterwards and app.install() does not add the component (because install_dry_run already did that). This was done to save one ucr commit on the repository files as they may be time consuming.

But also if app.install() does not add its own repository, it does remove the old ones. After this step, no package_manager.reopen_cache() is done. So the install routine is then working with an outdated cache and installs packages with it. A reopen_cache() afterwards causes the segfault.

A reopen_cache() before installation prevents it:

Index: umc/python/appcenter/app_center.py
===================================================================
--- umc/python/appcenter/app_center.py  (Revision 40242)
+++ umc/python/appcenter/app_center.py  (Arbeitskopie)
@@ -869,6 +869,7 @@
                                # dont remove yourself (if already added)
                                if iapp is not self:
                                        component_manager.remove_app(iapp)
+                       package_manager.reopen_cache()
 
                        # add the new repository component for the app
                        if add_component:
Comment 7 Dirk Wiesenthal univentionstaff 2013-05-07 12:11:27 CEST
Fixed in 3.1-2:
  univention-management-console-module-appcenter 2.0.147-1.132.201305071153
and 3.1-1:
  univention-management-console-module-appcenter 2.0.139-9.131.201305071151

I still do not understand why this happens only with certain apps/repositories.

YAML, changelog updated.
Comment 8 Felix Botner univentionstaff 2013-05-14 17:39:10 CEST
reproducible when updating UCS 3.1-1 with OX 6.2 to OX 7.2 via appcenter.

OK - errata3.1-1
OK - YAML

OK - ucs3.1-2
OK - Changelog
Comment 9 Moritz Muehlenhoff univentionstaff 2013-05-22 16:10:25 CEST
http://errata.univention.de/ucs/3.1/102.html