[Bug 1246245] Re: proftpd service fails to restart (including via logrotate)

Brian Morton rokclimb15 at gmail.com
Tue Feb 28 03:51:51 GMT 2017


bmorton at maui:~$ sudo apt-get install proftpd-basic/trusty-proposed
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '1.3.5~rc3-2.1ubuntu2.2' (Ubuntu:14.04/trusty-proposed [amd64]) for 'proftpd-basic'
Suggested packages:
  openbsd-inetd inet-superserver proftpd-doc proftpd-mod-ldap
  proftpd-mod-mysql proftpd-mod-odbc proftpd-mod-pgsql proftpd-mod-sqlite
  proftpd-mod-geoip
The following packages will be upgraded:
  proftpd-basic
1 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
Need to get 1,967 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-proposed/universe proftpd-basic amd64 1.3.5~rc3-2.1ubuntu2.2 [1,967 kB]
Fetched 1,967 kB in 3s (557 kB/s)
Preconfiguring packages ...
(Reading database ... 1144721 files and directories currently installed.)
Preparing to unpack .../proftpd-basic_1.3.5~rc3-2.1ubuntu2.2_amd64.deb ...
 * Stopping ftp server proftpd                                                                                                                                                                                                        [ OK ]
Unpacking proftpd-basic (1.3.5~rc3-2.1ubuntu2.2) over (1.3.5~rc3-2.1ubuntu2.1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up proftpd-basic (1.3.5~rc3-2.1ubuntu2.2) ...
Installing new version of config file /etc/init.d/proftpd ...
 * Starting ftp server proftpd                                                                                                                                                                                                        [ OK ]
Processing triggers for ureadahead (0.100.0-16) ...
bmorton at maui:~$ sudo nano /etc/apt/sources.list
bmorton at maui:~$ sudo service proftpd restart
 * Stopping ftp server proftpd                                                                                                                                                                                                        [ OK ]
 * Starting ftp server proftpd                                                                                                                                                                                                        [ OK ]
bmorton at maui:~$ sudo service proftpd status
ProFTPD is started in standalone mode, currently running.

** Tags removed: verification-needed
** Tags added: verification-done

-- 
You received this bug notification because you are a member of ProFTPD
Maintainance Team, which is subscribed to proftpd-dfsg in Ubuntu.
https://bugs.launchpad.net/bugs/1246245

Title:
  proftpd service fails to restart (including via logrotate)

Status in proftpd-dfsg package in Ubuntu:
  Fix Released
Status in proftpd-dfsg source package in Trusty:
  Fix Committed
Status in proftpd-dfsg package in Debian:
  Fix Released

Bug description:
  SRU request for Trusty

  [Impact]

   * ProFTPd exits with signal 15 when restarted via init script.
     Worse yet, init script returns success.

   * Since logrotate runs via cron and performs a restart, this causes
     FTP service to stop and results in unexpected service downtime.

   * Final version of upstream patch at https://anonscm.debian.org/git
  /pkg-proftpd/proftpd-
  dfsg.git/commit/?id=23c5e44b3c30a082a0e15279961c3c4c3d7393fd

   * Only trusty and prior are affected

  [Test Case]

   * bmorton at maui:~$ sudo service proftpd restart
     * Stopping ftp server proftpd                                           [ OK ]
     * Starting ftp server proftpd                                           [ OK ]
     bmorton at maui:~$ sudo service proftpd status
     ProFTPD is started in standalone mode, currently not running.

   * After a restart, status should say "currently running"

  [Regression Potential]

   * Failure to start/stop/restart proftpd service

   * Patched package currently running on production host without issues

  [Other Info]

   * This is a very old bug affecting a substantial number of users

   * Early AM nagios notifications about FTP service are undesirable

  -------------------------------------------------------------------------

  proftpd-basic 1.3.5~rc3-2 from Ubuntu 13.10
  proftpd-basic 1.3.5~rc3-2.1ubuntu2 from Ubuntu 14.04

  Init script from proftpd-basic package contains the BUG: when you run
  /etc/init.d/proftpd restart it fails because of there is the race
  between pidfile removal and start() which checks pidfile existency:

  ---
  ProFTPD is started in standalone mode, currently running.
  root at aa:~# /etc/init.d/proftpd restart
   * Stopping ftp server proftpd                                                                                                                                                                             [ OK ]
   * Starting ftp server proftpd                                                                                                                                                                             [ OK ]
  root at aa:~# /etc/init.d/proftpd status
  ProFTPD is started in standalone mode, currently not running.
  ---

  the next workaround helps:

  ---
  --- /etc/init.d/proftpd.orig    2013-10-30 13:52:46.791265726 +0400
  +++ /etc/init.d/proftpd 2013-10-30 13:52:57.456265698 +0400
  @@ -107,6 +107,7 @@
       fi
       if [ -f "$PIDFILE" ]; then
          start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"
  +       sleep 1
           if [ $? = 0 ]; then
                  log_end_msg 0
          else
  ---

  Please, fix.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/proftpd-dfsg/+bug/1246245/+subscriptions



More information about the Pkg-proftpd-maintainers mailing list