Proftpd upgrade hangs

Each time the proftpd package is upgraded it hangs forever, blocking the upgrade process, locking the apt DB and preventing any other package operation.

Here the trace of an apt dist-upgrade run manually showing the issue :

Setting up proftpd-basic (1.3.5b-4+deb9u3) ...
usermod: no changes
[....] Starting ftp server: proftpd2020-02-10 18:49:40,747 edhellond.cl.c-l.io proftpd[7660]: mod_dso/0.5: module 'mod_tls.c' already loaded
2020-02-10 18:49:40,748 edhellond.cl.c-l.io proftpd[7660]: mod_dso/0.5: module 'mod_sftp.c' already loaded
. ok

Here it blocks forever. When inspecting the running processes it shows there is a stale proftpd process locking the configure step of dpkg :

root     18267  0.0  0.3  64572 20544 pts/1    S+   18:44   0:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/proftpd-basic.postinst configure 1.3.5b-4+deb9u2
root     18273  0.0  0.0      0     0 pts/1    Z+   18:44   0:00 [proftpd-basic.p] <defunct>
proftpd  18335  0.0  0.0 122868  3756 ?        Ss   18:44   0:00 proftpd: (accepting connections)

Solution is then to shutdown the proftpd process from another terminal :  service proftpd stop

This allows the dkpg configure to complete and resume the upgrade process.

Now the issue lies down to a couple of duplicate module load in proftpd config. Both mod_tls and mod_sftp are loaded in 2 config files :

  • conf.d/virtualmin.conf
  • modules.conf

This causes a clash but it is only fatal in the upgrade context, under normal circumstances starting or restarting proftpd signals the issue but no harm comes from it. I trust the virtualmin.cong file should check if any module is already loaded before loading it.

Please ask if you need more details.

Status: 
Active

Comments

Ilia's picture
Submitted by Ilia on Tue, 02/11/2020 - 05:27

Hi,

Those mentioned modules are indeed loaded twice, however, it's not a big deal. It's simply ignored by the service (ProFTPd).

The source of the issue for you is that the following process:

root     18273  0.0  0.0      0     0 pts/1    Z+   18:44   0:00 [proftpd-basic.p]

.. turned to a defunct process (zombie state Z+). The are few reasons why this could happen. It might be due to the kernel or proftpd bug.

I don't believe we can help you on this front really.

For your information, I just ran successfully packages upgrade on my Debian 9, including proftpd-basic (1.3.5b-4+deb9u3) package, and all went well.

You might be interesting in reading more about zombie processes and why program becomes zombie.

Hi, a little follow-up about this issue which is sill present :( I just got stuck today even while I had commented out the duplicate lines in conf.d/virtualmin.conf so you were right, the problem is not the duplicate modules declaration.

It's weird you could not reproduce it because it does this in all of my systems with Virtualmin installed.

root     29171  0.0  0.4  61444 17428 pts/2    S+   11:52   0:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/proftpd-basic.postinst configure 1.3.5b-4+deb9u3
root     29177  0.0  0.0      0     0 pts/2    Z+   11:52   0:00 [proftpd-basic.p] <defunct>
proftpd  29234  0.0  0.0 124744  3716 ?        Ss   11:52   0:00 proftpd: (accepting connections)

PS : I very much well know about zombies and Unix sysadmin, I had already seen & fixed this as I had told you :) I'm only trying to get a real fix to stop this issue for good, Virtualmin conf is a good bet for the cause since it does not happen on pristine systems.

Ilia's picture
Submitted by Ilia on Wed, 04/29/2020 - 03:05

I'm only trying to get a real fix to stop this issue for good, Virtualmin conf is a good bet for the cause since it does not happen on pristine systems.

Above all things, we love fixing bugs! It's just not always clear what's happening on user machine. If we can reproduce it, then it's usually very easy to fix.

You mentioned Virtualmin being responsible for this bug - do you run upgrade from the console or from UI? In neither way, what makes you think that system packages upgrades, handled by apt command has anything to do with Virtualmin?

Are there more logs/status info you could provide?