ProFTPD crashes with "Alarm clock!"

Hi there,

Two days ago there were several updates. For their dependencies proftpd was recompiled (own poudriere server). Since then proftpd does not start and generates this error message.
Code:
2014-12-11 09:30:35,893 XX proftpd[748] 192.168.100.159: ProFTPD 1.3.5 (stable) (built Tue Dec 9 2014 00:34:04 UTC) standalone mode STARTUP
2014-12-11 09:30:35,894 XX proftpd[748] 192.168.100.159: ROOT PRIVS at pidfile.c:47
2014-12-11 09:30:35,894 XX proftpd[748] 192.168.100.159: RELINQUISH PRIVS at pidfile.c:49
Alarm clock
Any help here?

Thanks
parcival
 
Ok,

Without these compile flags, proftpd works.
Code:
CPPFLAGS+=-DHAVE_OPENSSL -I${OPENSSLINC}
LIBS+=-lssl -lcrypto -L${OPENSSLLIB}

Were there any major changes in openssl, sslib?
 
I have to correct myself. After some tests I can say the following. Without
Code:
PCRE support
CPPFLAGS+=-DHAVE_OPENSSL -I${OPENSSLINC}
LIBS+=-lssl -lcrypto -L${OPENSSLLIB}
mod_sql_password
mod_sftp_*
mod_tls_*
proftpd works. Any help here?
 
I had the same issue, but only on an i386 system. An amd64 system runs fine with PCRE enabled in proftpd. On the i386 system, disabling PCRE was all that was needed. Of course, I leave compile flags alone, because that's inviting in misery.
 
I had the same issue, but only on an i386 system. An amd64 system runs fine with PCRE enabled in proftpd. On the i386 system, disabling PCRE was all that was needed. Of course, I leave compile flags alone, because that's inviting in misery.

On AMD, I recompiled without PCRE support and proftpd has been stable for an hour.

Code:
#cd /usr/ports/ftp/proftpd
#make;
#make deinstall && make reinstall clean;

System:
Code:
FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014
    root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
CPU: AMD Opteron(tm) Processor 6134 (2300.05-MHz K8-class CPU)

Proftpd Features:
Code:
 Features:
    - Autoshadow support
    + Controls support
    + curses support
    - Developer support
    + DSO support
    - IPv6 support
    + Largefile support
    - Lastlog support
    - Memcache support
    + ncursesw support
    + NLS support
    + OpenSSL support
    - PCRE support
    - POSIX ACL support
    - Shadow file suppport
    - Sendfile support
    + Trace support

Proftpd compile-time settings:
Code:
Compile-time Settings:
  Version: 1.3.5 (stable)
  Platform: FREEBSD10 (FREEBSD10_1) [FreeBSD 10.1-RELEASE amd64]
  Built: Fri Dec 12 2014 14:31:36 PST
  Built With:
    configure  '--localstatedir=/var/run' '--libexecdir=/usr/local/libexec/proftpd' '--with-pkgconfig=libdata/pkgconfig' '--sysconfdir=/usr/local/etc' '--enable-ctrls' '--enable-dso' '--disable-sendfile' '--disable-ipv6' '--enable-nls' '--disable-pcre' '--disable-memcache' '--with-shared=mod_ban:mod_copy:mod_ctrls_admin:mod_deflate:mod_dnsbl:mod_dynmasq:mod_exec:mod_ifsession:mod_ifversion:mod_qos:mod_quotatab:mod_quotatab_file:mod_quotatab_radius:mod_quotatab_sql:mod_radius:mod_ratio:mod_readme:mod_rewrite:mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_shaper:mod_site_misc:mod_snmp:mod_sql:mod_sql_passwd:mod_tls:mod_tls_shmcache:mod_unique_id:mod_wrap2:mod_wrap2_file:mod_wrap2_sql' '--with-includes=/usr/local/include' '--with-libraries=/usr/local/lib' 'ac_cv_lib_iconv_iconv_open=no' 'ac_cv_lib_iconv_libiconv_open=no' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd10.1' 'build_alias=amd64-portbld-freebsd10.1' 'CC=cc' 'CFLAGS=-O2 -pipe  -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing' 'LDFLAGS= -Wl,-rpath,/usr/lib:/usr/local/lib -fstack-protector' 'LIBS=-lssl -lcrypto -L/usr/lib' 'CPPFLAGS=-DHAVE_OPENSSL -I/usr/include -DLIBICONV_PLUG' 'CPP=cpp' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing  -DLIBICONV_PLUG'

  CFLAGS: -O2 -pipe  -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -Wall
  LDFLAGS: -L$(top_srcdir)/lib  -Wl,-rpath,/usr/lib:/usr/local/lib -fstack-protector -L/usr/local/lib
  LIBS: -lintl  -lssl -lcrypto -lpam -lsupp -lcrypt -lssl -lcrypto -L/usr/lib -lutil
 
I have to correct myself. After some tests I can say the following. Without
Code:
PCRE support
CPPFLAGS+=-DHAVE_OPENSSL -I${OPENSSLINC}
LIBS+=-lssl -lcrypto -L${OPENSSLLIB}
mod_sql_password
mod_sftp_*
mod_tls_*
proftpd works. Any help here?

I have the same issue as everyone else has described, but disabling PCRE did not work for me.

I disabled everything parcival disabled with the exception of mod_sftp as I'm using that, and it still blew up.

Then I finally disabled mod_sftp and it works, albeit without sftp support which I do use.

I don't know if this a FreeBSD issue or an issue to take up with the proftpd folks.

edit:

Code:
FreeBSD XX 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274726: Wed Nov 19 16:35:01 MST 2014
 
Adding -pthread to the Makefile sorted it out for me.

According to a bug referenced in PR 195921, http://bugs.proftpd.org/show_bug.cgi?id=3795

It looks like the configure script is checking the output of openssl version -f to see if it contains -pthread

When I run it, I just get

Code:
compiler: cc

Which doesn't contain any of the CFLAGS I imagine it was built with, including -pthread.

Perhaps it's an issue for the OpenSSL folks? or is there a better way to detect that OpenSSL was built with threading?
 
I ran into this as well, after the update from 10.1-RELEASE to 10.1-RELEASE-p1.
Recompiling without PCRE didn't fix the issue for me.
I do have WITH_OPENSSL_PORT="YES" set in my /etc/make.conf file.

These ports were also Upgraded after the O/S update.
Code:
Upgrade of pkg-1.3.8_3 to pkg-1.4.0
Upgrade of vim-lite-7.4.518 to vim-lite-7.4.542
Upgrade of expat-2.1.0_1 to expat-2.1.0_2
Upgrade of pcre-8.35_1 to pcre-8.35_2
Upgrade of bind-tools-9.10.1_3 to bind-tools-9.10.1P1
Upgrade of mutt-lite-1.5.23_6 to mutt-lite-1.5.23_7
Upgrade of proftpd-1.3.5_3 to proftpd-1.3.5_4
Upgrade of squid-3.4.9_1 to squid-3.4.10

Perhaps the there is a need to rebuild openssl, after the update or something. I didn't do a full port rebuild, as generally its not needed for the minor ports. I rolled the system back to the old 10.1-RELEASE build to get the service back up. Hoping to have time tomorrow to bring the new version back up in a test jail environment instead of the production one to test further options at fixing it.

By the way, with the above mentioned OpenSSL pthread option check, the ported openssl does show -pthread with a -f, whereas the bundled FreeBSD doesn't.

O/S bundled openssl:
Code:
/usr/bin/openssl version -f
compiler: cc

Port Version:
Code:
/usr/local/bin/openssl version -f
compiler: cc -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -pthread -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIOS -O3 -Wall -O2 -pipe  -fstack-protector -fno-strict-aliasing -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
 
Code:
# uname -a
FreeBSD indigo.spectrumcs.net 10.0-RELEASE-p12 FreeBSD 10.0-RELEASE-p12 #0: Tue Nov  4 05:07:17 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
Code:
# pkg version | grep proftpd
proftpd-1.3.5_4
proftpd-mod_sql_mysql-1.3.5_4
Code:
# openssl version
OpenSSL 1.0.1e-freebsd 11 Feb 2013
I too have noticed today that proftpd was crashing about 10 seconds after starting.

Taking on broad some of the previous comments I recompiled without the PCRE option, leaving only DOCS, IPV6 and NLS enabled and proftpd has now been up about 15 minutes.

Hope this helps someone else.
 
Just today I have noticed that proftpd crashed shortly after starting and a little later I luckily stumbled across this thread. It tunrs out that after disabling PCRE and rebuilding with portmaster my proftpd is reliably back again - for more than one hour. I am on amd64.
 
Code:
root@ftp1:/# proftpd -c /usr/local/etc/proftpd.conf -n -d20
2014-12-21 08:35:54,811 ftp1.domain.net proftpd[95524]: using PCRE 8.35 2014-04-04
2014-12-21 08:35:54,817 ftp1.domain.net proftpd[95524]: using TCP receive buffer size of 65536 bytes
2014-12-21 08:35:54,817 ftp1.domain.net proftpd[95524]: using TCP send buffer size of 32768 bytes
2014-12-21 08:35:54,817 ftp1.domain.net proftpd[95524]: testing Unix domain socket using S_ISFIFO
2014-12-21 08:35:54,817 ftp1.domain.net proftpd[95524]: testing Unix domain socket using S_ISSOCK
2014-12-21 08:35:54,817 ftp1.domain.net proftpd[95524]: using S_ISSOCK macro for Unix domain socket detection
2014-12-21 08:35:54,821 ftp1.domain.net proftpd[95524]: using 'US-ASCII' as local charset for UTF-8 conversion
2014-12-21 08:35:54,828 ftp1.domain.net proftpd[95524]: setting default addresses to xx.xx.xx.xx
2014-12-21 08:35:54,829 ftp1.domain.net proftpd[95524]: retrieved UID 65534 for user 'nobody'
2014-12-21 08:35:54,830 ftp1.domain.net proftpd[95524]: retrieved GID 65533 for group 'nogroup'
2014-12-21 08:35:54,831 ftp1.domain.net proftpd[95524]: <Directory incoming/*>: adding section for resolved path '/incoming/*'
2014-12-21 08:35:54,832 ftp1.domain.net proftpd[95524] ftp1:
2014-12-21 08:35:54,832 ftp1.domain.net proftpd[95524] ftp1: Config for ProFTPD Default Installation:
2014-12-21 08:35:54,832 ftp1.domain.net proftpd[95524] ftp1: ~ftp/
2014-12-21 08:35:54,832 ftp1.domain.net proftpd[95524] ftp1:  /incoming/*
2014-12-21 08:35:54,832 ftp1.domain.net proftpd[95524] ftp1:  Limit
2014-12-21 08:35:54,832 ftp1.domain.net proftpd[95524] ftp1:  AllowAll
2014-12-21 08:35:54,832 ftp1.domain.net proftpd[95524] ftp1:  Limit
2014-12-21 08:35:54,832 ftp1.domain.net proftpd[95524] ftp1:  DenyAll
2014-12-21 08:35:54,832 ftp1.domain.net proftpd[95524] ftp1:  HideUser
2014-12-21 08:35:54,832 ftp1.domain.net proftpd[95524] ftp1:  MaxClients
2014-12-21 08:35:54,832 ftp1.domain.net proftpd[95524] ftp1:  DisplayLogin
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  DisplayChdir
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  AllowForeignAddress
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  Umask
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  AllowOverwrite
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  Limit
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  DenyAll
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  Limit
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  AllowAll
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  UserName
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  GroupName
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  HideUser
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  HideUser
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  UserAlias
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  MaxClients
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  DisplayLogin
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  DisplayChdir
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  AllowForeignAddress
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  Umask
2014-12-21 08:35:54,833 ftp1.domain.net proftpd[95524] ftp1:  AllowOverwrite
2014-12-21 08:35:54,834 ftp1.domain.net proftpd[95524] ftp1: DefaultServer
2014-12-21 08:35:54,834 ftp1.domain.net proftpd[95524] ftp1: ServerAlias
2014-12-21 08:35:54,834 ftp1.domain.net proftpd[95524] ftp1: PassivePorts
2014-12-21 08:35:54,834 ftp1.domain.net proftpd[95524] ftp1: AllowForeignAddress
2014-12-21 08:35:54,834 ftp1.domain.net proftpd[95524] ftp1: Umask
2014-12-21 08:35:54,834 ftp1.domain.net proftpd[95524] ftp1: CommandBufferSize
2014-12-21 08:35:54,834 ftp1.domain.net proftpd[95524] ftp1: UserID
2014-12-21 08:35:54,834 ftp1.domain.net proftpd[95524] ftp1: UserName
2014-12-21 08:35:54,834 ftp1.domain.net proftpd[95524] ftp1: GroupID
2014-12-21 08:35:54,834 ftp1.domain.net proftpd[95524] ftp1: GroupName
2014-12-21 08:35:54,834 ftp1.domain.net proftpd[95524] ftp1: DefaultRoot
2014-12-21 08:35:54,834 ftp1.domain.net proftpd[95524] ftp1: AllowOverwrite
2014-12-21 08:35:54,835 ftp1.domain.net proftpd[95524] ftp1: AllowForeignAddress
2014-12-21 08:35:54,835 ftp1.domain.net proftpd[95524] ftp1: PassivePorts
2014-12-21 08:35:54,835 ftp1.domain.net proftpd[95524] ftp1: mod_lang/1.0: binding to text domain 'proftpd' using locale path '/usr/local/share/locale'
2014-12-21 08:35:54,835 ftp1.domain.net proftpd[95524] ftp1: mod_lang/1.0: using locale files in '/usr/local/share/locale'
2014-12-21 08:35:54,840 ftp1.domain.net proftpd[95524] ftp1: mod_lang/1.0: added the following supported languages: zh_CN.UTF-8, zh_CN, zh_TW.UTF-8, zh_TW, bg_BG.UTF-8, bg_BG, en_US.UTF-8, en_US, es_ES.UTF-8, es_ES, it_IT.UTF-8, it_IT, ja_JP.UTF-8, ja_JP, ru_RU.UTF-8, ru_RU, fr_FR.UTF-8, fr_FR, ko_KR.UTF-8, ko_KR
2014-12-21 08:35:54,840 ftp1.domain.net proftpd[95524] ftp1: ROOT PRIVS at mod_ctrls.c:1187
2014-12-21 08:35:54,844 ftp1.domain.net proftpd[95524] ftp1: RELINQUISH PRIVS at mod_ctrls.c:1189
2014-12-21 08:35:54,844 ftp1.domain.net proftpd[95524] ftp1: ROOT PRIVS at mod_delay.c:441
2014-12-21 08:35:54,845 ftp1.domain.net proftpd[95524] ftp1: RELINQUISH PRIVS at mod_delay.c:444
2014-12-21 08:35:54,845 ftp1.domain.net proftpd[95524] ftp1: ROOT PRIVS at mod_rlimit.c:541
2014-12-21 08:35:54,846 ftp1.domain.net proftpd[95524] ftp1: RELINQUISH PRIVS at mod_rlimit.c:544
2014-12-21 08:35:54,846 ftp1.domain.net proftpd[95524] ftp1: set core resource limits for daemon
2014-12-21 08:35:54,849 ftp1.domain.net proftpd[95524] ftp1: retrieved group ID: 65534
2014-12-21 08:35:54,849 ftp1.domain.net proftpd[95524] ftp1: setting group ID: 65534
2014-12-21 08:35:54,849 ftp1.domain.net proftpd[95524] ftp1: SETUP PRIVS at main.c:3014
2014-12-21 08:35:54,849 ftp1.domain.net proftpd[95524] ftp1: ROOT PRIVS at main.c:2351
2014-12-21 08:35:54,849 ftp1.domain.net proftpd[95524] ftp1: deleting existing scoreboard '/var/run/proftpd/proftpd.scoreboard'
2014-12-21 08:35:54,850 ftp1.domain.net proftpd[95524] ftp1: opening scoreboard '/var/run/proftpd/proftpd.scoreboard'
2014-12-21 08:35:54,851 ftp1.domain.net proftpd[95524] ftp1: RELINQUISH PRIVS at main.c:2378
2014-12-21 08:35:54,851 ftp1.domain.net proftpd[95524] ftp1: ROOT PRIVS at inet.c:247
2014-12-21 08:35:54,851 ftp1.domain.net proftpd[95524] ftp1: RELINQUISH PRIVS at inet.c:270
2014-12-21 08:35:54,851 ftp1.domain.net proftpd[95524] ftp1: ROOT PRIVS at inet.c:373
2014-12-21 08:35:54,851 ftp1.domain.net proftpd[95524] ftp1: RELINQUISH PRIVS at inet.c:447
2014-12-21 08:35:54,851 ftp1.domain.net proftpd[95524] ftp1: ProFTPD 1.3.5 (stable) (built Wed Dec 17 2014 04:37:59 UTC) standalone mode STARTUP
2014-12-21 08:35:54,852 ftp1.domain.net proftpd[95524] ftp1: ROOT PRIVS at pidfile.c:47
2014-12-21 08:35:54,852 ftp1.domain.net proftpd[95524] ftp1: RELINQUISH PRIVS at pidfile.c:49
Alarm clock

It has been doing this few days last time it worked properly was arround December 17th, .. it just came to my attention, it has been crashing, ..

It's running within a jailed FreeBSD. FreeBSD 10.1-RELEASE-p2.

Those that run on FreeBSD 10.0-RELEASE-p13 don't seem to have this issue with about the same configuration.
 
Last edited by a moderator:
I am running into the same "Alarm clock" error with the proftpd I installed using pkg. This is a fresh FreeBSD 10.1 install from the ministick img that has been updated with freebsd-update. Other threads seem to indicate this has to do with how proftpd was compiled, but I'd rather avoid going down that road. The only other package I installed was samba36 and its dependencies and fusefs-ext4fuse. Any suggestions?

Code:
root@x:/usr/local/etc/rc.d # freebsd-version
10.1-RELEASE-p3
root@x:/usr/local/etc/rc.d # uname -a
FreeBSD x 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014  root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 
I compiled it from ports too. Same issue, and yes I've reinstalled FreeBSD yesterday same issue, with new 10.1 release FreeBSD 10.1-RELEASE-p3.
 
What port are you connecting to? Because mine by default was set to 22 for secure FTP. I'm on 10.1 and its running fine.
 
Port 22 is ssh!? That's probably the ssh (sftp) which you're connecting to and yes that runs just fine. That's not proftpd, proftpd by default runs on port 21.
 
I punched out of proftpd and installed vsftpd-ext using pkg. I'm a lot more familiar with vsftpd-ext anyway from my RHEL/CentOS days.
 
Does anyone have any kind of solution aside from deinstalling proftpd and installing something else.
 
Does anyone have any kind of solution aside from deinstalling proftpd and installing something else.

For me and most other users here, you need to recompile ProFTPD without PCRE support.
So:
cd /usr/ports/ftp/proftpd
make config
Deselect PCRE
make deinstall
make reinstall

That fixed it for me on 4 servers running a mix of 9.x and 10.x
 
Doesn't work for me. Only jailed systems seem to have this issue (FreeBSD 10.1-p3). All non-jailed systems (FreeBSD 10-p13) work just fine.
 
Dang, if I didn't come back here after attempting to update again. It appears if I am following everything that the issue only occurs in a jail and using mod_sftp. Doesn't it figure that I am running this in a jail using mod_sftp to do secure EDI communications.
Anyone have any ideas on options to test with, debugging input I can gather to help find a solution, coming up on next scan date for our PCI compliance and need to get updates installed soon to keep from failing the scans.
Or is my best option going to be to spool up another VM and install this outside of a jail on a server by iteslf, and use the firewall to NAT the port I use for the sftp to the new server?
 
Think I have found a work around. After seeing other references to OpenSSL and pthread support, I got an idea, my /etc/make.conf file was already set to user OpenSSL from ports.
Code:
WITH_OPENSSL_PORT="YES"
So I changed my security/openssl port to not use threads
/var/db/ports/seecurity_openssl
Code:
# This file is auto-generated by 'make config'.
# Options for openssl-1.0.1_17
_OPTIONS_READ=openssl-1.0.1_17
_FILE_COMPLETE_OPTIONS_LIST=SHARED THREADS I386 SSE2 ASM PADLOCK ZLIB GMP SCTP SSL2 SSL3 RFC3779 MD2 RC5 EXPCIPHERS DOCS EC
OPTIONS_FILE_SET+=SHARED
OPTIONS_FILE_UNSET+=THREADS
OPTIONS_FILE_UNSET+=I386
OPTIONS_FILE_SET+=SSE2
OPTIONS_FILE_SET+=ASM
OPTIONS_FILE_UNSET+=PADLOCK
OPTIONS_FILE_UNSET+=ZLIB
OPTIONS_FILE_UNSET+=GMP
OPTIONS_FILE_SET+=SCTP
OPTIONS_FILE_SET+=SSL2
OPTIONS_FILE_SET+=SSL3
OPTIONS_FILE_UNSET+=RFC3779
OPTIONS_FILE_SET+=MD2
OPTIONS_FILE_UNSET+=RC5
OPTIONS_FILE_UNSET+=EXPCIPHERS
OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_SET+=EC
Used portmaster to rebuild OpenSSL and all ports dependent on it.
portmaster -r openssl-1.0.1_17
It does appear to now be staying up, at least in my test environment, the test environment was also updated to 10.1-RELEASE-p4. The ftp/proftpd still had the issue after the p4 update prior to the security/openssl change.
 
Back
Top