Bug 35729 - App Center installation hangs sometimes
App Center installation hangs sometimes
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.2-3-errata
Assigned To: Philipp Hahn
Dirk Wiesenthal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-27 15:47 CEST by Dirk Wiesenthal
Modified: 2014-11-07 15:37 CET (History)
2 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
Daemonize the dpkg reading thread (4.23 KB, patch)
2014-08-27 15:51 CEST, Dirk Wiesenthal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2014-08-27 15:47:49 CEST
Noticed during Jenkins tests. Not sure how to really provoke this.

But the PackageManager seems to hang forever under unknown conditions. This is because of reading from a socket of another thread to get the dpkg-messages.
Comment 1 Dirk Wiesenthal univentionstaff 2014-08-27 15:48:19 CEST
Backport to 3.2-2
Comment 2 Dirk Wiesenthal univentionstaff 2014-08-27 15:51:53 CEST
Created attachment 6076 [details]
Daemonize the dpkg reading thread

Patch from Philipp
Comment 3 Philipp Hahn univentionstaff 2014-08-28 15:17:51 CEST
A stripped down version of the patch has been committed to 3.2-3:
r53120 | Bug #35729 lib: Fix stall in dpkg status pipe reading code

r53122 | Bug #35729 lib: Fix stall in dpkg status pipe reading code YAML
 branches/ucs-3.2/ucs-3.2-3/doc/errata/staging/2014-08-28-univention-lib.yaml

The patch probably needs back-porting to 3.2-2, but as those versions are the same, the YAML just lists the package for both -2 and -3 so far.

The patch needs forward-porting to 4.0-0 after successful QA.

WARNING: The patch will break the installation of "noctua", which starts several daemons which don't disconnect from the PIPE; those processes will terminate now when "univention-add-app" terminates. I've notified "init.at" about that issue.

QA: You could create and install a dummy app, which just forks a process during package installation, which keeps STDOUT or STDERR open.

dummy.postinst:
 #!/bin/sh
 # double-fork as minimal daemonize
 sh -c 'while [ ! -e /tmp/dummy_should_exit ]; do sleep 10; done &' &
Comment 4 Dirk Wiesenthal univentionstaff 2014-09-10 13:33:40 CEST
Changes are OK, everything works fine. Jenkins does not get stuck anymore.

Please revert the changes for now while init can look into the issues with the installation routines.

After that please apply the patch again against 3.2-3, 3.2-2, 4.0-0.
Comment 5 Philipp Hahn univentionstaff 2014-09-10 14:23:55 CEST
r53543 | Revert "Bug #35729 lib: Fix stall in dpkg status pipe reading code"
r53544 | Revert "Bug #35729 lib: Fix stall in dpkg status pipe reading code" YAML
Comment 6 Stefan Gohmann univentionstaff 2014-09-10 16:31:09 CEST
(In reply to Dirk Wiesenthal from comment #4)
> Please revert the changes for now while init can look into the issues with
> the installation routines.
> 
> After that please apply the patch again against 3.2-3, 3.2-2, 4.0-0.

Should be done next week.
Comment 7 Philipp Hahn univentionstaff 2014-09-16 18:08:26 CEST
r53712 | Bug #35729 lib: Fix stall in dpkg status pipe reading code
r53711 | Bug #35729 lib: Fix stall in dpkg status pipe reading code
r53710 | Bug #35729 lib: Fix stall in dpkg status pipe reading code

Package: univention-lib
Version: 3.0.26-68.278.201409161801
Branch: ucs_3.2-0
Scope: errata3.2-3

r53713 | Bug #35729 lib: Fix stall in dpkg status pipe reading code YAML

Package: univention-lib
Version: 4.0.3-2.279.201409161802
Branch: ucs_4.0-0

No changelog entry as this is a forward port of an errata.
Comment 8 Dirk Wiesenthal univentionstaff 2014-11-07 12:35:46 CET
Changeset: OK
YAML: OK
4.0-0: OK
Comment 9 Janek Walkenhorst univentionstaff 2014-11-07 15:37:11 CET
http://errata.univention.de/ucs/3.2/235.html