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.