Gentoo Archives: gentoo-user

From: Andreas Fink <finkandreas@×××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] emerge stuck after dovecot upgrade
Date: Thu, 21 May 2020 04:44:57
Message-Id: 1MN6FV-1jJGju46on-00Iyw8@smtp.web.de
1 Hello,
2 recently emerge started to get stuck after an upgrade of dovecot, and it is somehow
3 related to my /etc/portage/bashrc, which has the following content:
4 function post_pkg_postinst() {
5 if test "$CATEGORY/$PN" = "dev-db/mariadb"; then
6 /etc/init.d/mysql status && /etc/init.d/mysql restart
7 elif test "$CATEGORY/$PN" = "www-servers/apache"; then
8 /etc/init.d/apache2 status && /etc/init.d/apache2 restart
9 elif test "$CATEGORY/$PN" = "net-mail/dovecot"; then
10 /etc/init.d/dovecot status && /etc/init.d/dovecot restart
11 echo 'going to sleep'
12 sleep 5
13 echo 'finished sleeping'
14 elif test "$CATEGORY/$PN" = "mail-mta/postfix"; then
15 /etc/init.d/postfix status && /etc/init.d/postfix restart
16 elif test "$CATEGORY/$PN" = "net-misc/openssh"; then
17 /etc/init.d/sshd status && /etc/init.d/sshd restart
18 fi
19 }
20
21
22 I restart dovecot after an upgrade, in the same way as I restart e.g. postfix. However
23 for dovecot emerge gets stuck and does not continue and is sitting there quietly
24 (killable only via `pkill -9 emerge`). These are the last lines in my /var/log/emerge.log:
25 1590023821: === (17 of 26) Post-Build Cleaning (net-dns/bind-tools-9.16.3::/usr/portage/net-dns/bind-tools/bind-tools-9.16.3.ebuild)
26 1590023821: ::: completed emerge (17 of 26) net-dns/bind-tools-9.16.3 to /
27 1590023821: >>> emerge (18 of 26) net-mail/dovecot-2.3.10.1 to /
28 1590023821: === (18 of 26) Cleaning (net-mail/dovecot-2.3.10.1::/usr/portage/net-mail/dovecot/dovecot-2.3.10.1.ebuild)
29 1590023821: === (18 of 26) Compiling/Packaging (net-mail/dovecot-2.3.10.1::/usr/portage/net-mail/dovecot/dovecot-2.3.10.1.ebuild)
30 1590024325: === (18 of 26) Merging (net-mail/dovecot-2.3.10.1::/usr/portage/net-mail/dovecot/dovecot-2.3.10.1.ebuild)
31 1590024331: >>> AUTOCLEAN: net-mail/dovecot:0
32 1590024331: === Unmerging... (net-mail/dovecot-2.3.10)
33 1590024334: >>> unmerge success: net-mail/dovecot-2.3.10
34
35 So it is missing the "Post-Build Cleaning" and the "completed emerge" line for dovecot.
36 Lokking into the temporary build directory of portage I can see see only a single file
37 being left (PORTAGE_TMPDIR="/home/portage/tmp):
38 /home/portage/tmp/portage/net-mail/.dovecot-2.3.10.1.portage_lockfile
39 There are no build artifacts left, it's clean and empty, only the lockfile is still there.
40
41 Restarting the upgrade process with `emerge -auvDN @world` wouldn't retry to upgrade
42 dovecot, so I guess it actually got merged and registered as being successfully merged.
43
44 I'm kind of lost, why upgrading dovecot gets emerge stuck, but upgrading e.g. openssh or
45 postfix works correctly and the services are being restarted the same way as dovecot in
46 /etc/portage/bashrc.
47
48 One last note, doing the merge manually with the commands
49 ebuild /path/to/dovecot.ebuild compile
50 ebuild /path/to/dovecot.ebuild install
51 ebuild /path/to/dovecot.ebuild qmerge
52 will get stuck in the qmerge step, but it is killable with a regular SIGINT/SIGTERM.
53
54 Any ideas how I can debug this any further? I assume that emerge is waiting for some
55 children and the forking in dovecot is different than in openssh, but I'm unsure how I
56 can debug this. I even tried to background everything like this:
57 /etc/init.d/dovecot status && ( ( bash -c '/etc/init.d/dovecot restart &' ) & )
58
59 The last successful full upgrade of dovecot was
60 2020-03-21T14:06:21 >>> net-mail/dovecot-2.3.10: 7 minutes, 15 seconds
61 The first failed full merge was on April 30th and last night again.
62
63 After that portage has been updated to these versions:
64 2020-03-21T11:15:55 >>> sys-apps/portage-2.3.94: 48 seconds
65 2020-03-23T18:30:34 >>> sys-apps/portage-2.3.95: 56 seconds
66 2020-03-26T05:37:17 >>> sys-apps/portage-2.3.96-r1: 47 seconds
67 2020-03-28T04:23:23 >>> sys-apps/portage-2.3.96-r1: 43 seconds
68 2020-04-09T10:00:41 >>> sys-apps/portage-2.3.97: 48 seconds
69 2020-04-11T09:39:30 >>> sys-apps/portage-2.3.98-r1: 43 seconds
70 2020-04-13T07:05:40 >>> sys-apps/portage-2.3.99-r1: 48 seconds
71 2020-04-22T03:15:44 >>> sys-apps/portage-2.3.99-r2: 44 seconds
72 2020-05-01T03:50:56 >>> sys-apps/portage-2.3.99-r2: 57 seconds
73 2020-05-07T13:44:14 >>> sys-apps/portage-2.3.99-r2: 42 seconds
74
75 Any help is appreciated :)
76 Cheers
77 Andreas

Replies

Subject Author
Re: [gentoo-user] emerge stuck after dovecot upgrade Neil Bothwick <neil@××××××××××.uk>