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: mod_dso/0.5: module 'mod_tls.c' already loaded
2020-02-10 18:49:40,748 edhellond.cl.c-l.io proftpd: mod_dso/0.5: module 'mod_sftp.c' already loaded
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 :
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.