Overview: On FreeBSD 10.1-RELEASE-i386 crash proftpd after a few seconds. Steps to Reproduce: build with own poudriere server (latest devel version) or local via "make, make install" in the ports tree. Actual Results: proftpd chrash after a few seconds with error message "Alarm clock" ./proftpd -n -d 10 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 Additional Information: * Even when i compile proftpd "without" following options. - PCRE support - CPPFLAGS+=-DHAVE_OPENSSL -I${OPENSSLINC} - LIBS+=-lssl -lcrypto -L${OPENSSLLIB} - mod_sql_password - mod_sftp_* - mod_tls_* proftpd will works again Reference thread: http://forums.freebsd.org/threads/proftpd-crashes-with-alarm-clock.49445/ https://forums.proftpd.org/smf/index.php/topic,11657.0.html The first time seen on 10/12/2014, proftpd was recompiled on new / missing dependencies.
Auto-assigned to maintainer mm@FreeBSD.org
This has happened previously, see: http://bugs.proftpd.org/show_bug.cgi?id=3815 and http://bugs.proftpd.org/show_bug.cgi?id=3795 Looks like the same issue.
It appears the proftpd configure script runs openssl version -f and checks to see if the output contains -pthread However, when I run that command I just get compiler: cc Which seems to be lacking in any of the CFLAGS it was built with, including -pthread That in turn causes the proftpd configure to fail. I don't know if this is the preferred way to check for pthread? If so I guess it would be more of an OpenSSL issue?
indeed, a workaround to make it compile & run is to add: LDFLAGS+= -pthread to the port Makefile. I'm not sure who needs to look at it though.
I've noticed the same behavior on FreeBSD 9.3 and FreeBSD 10.1 in a recent port update. The presence of SIGALRM is normal; proftpd uses an alarm clock to periodically check for the presence of /etc/shutmsg. However, right now, proftpd just exits after that. Can confirm that adding the following to Makefile is a workaround: LDFLAGS+= -pthread
Well I have the same issue, but will add I use the ports version of openssl, if I run this command it shows -pthread correctly. /usr/local/bin/openssl version -f So the first obvious problem is the openssl check is using the wrong binary when openssl port is enabled. I assume fiddling with the path env and prioritising so /usr/local/bin is used before /bin and /usr/bin then the compile would work properly. But this isn't recommended practice.
Workaround with "LDFLAGS+= -pthread" in Makefile works.
Sorry I forgot to confirm it works for me, it does. But we need it patched so no workarounds needed.
Hello, This also affacets me: FreeBSD boromir.uznam.net.pl 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 root@boromir:/usr/ports/ftp/proftpd # pkg info proftpd proftpd-1.3.5_4 Name : proftpd Version : 1.3.5_4 Installed on : Fri Jan 16 13:38:53 CET 2015 Origin : ftp/proftpd Architecture : freebsd:10:x86:64 Prefix : /usr/local Categories : ftp Licenses : GPLv2 Maintainer : mm@FreeBSD.org WWW : http://www.proftpd.org/ Comment : Highly configurable FTP daemon Options : DOCS : on HTMLDOCS : off IPV6 : on MEMCACHE : off NLS : on PCRE : off Shared Libs required: libintl.so.8 Annotations : Flat size : 6.40MiB This works fine,but if I enable PCRE (same as in binary PKG) it crashes after first connection.
A commit references this bug: Author: mm Date: Sun Feb 1 22:25:51 UTC 2015 New revision: 378282 URL: https://svnweb.freebsd.org/changeset/ports/378282 Log: Fix mirror sites [1] Compile with -pthread if using base OpenSSL [2] Fix rc script [3] PR: 191011 [1], 195921 [2], 196635 [3] Changes: head/ftp/proftpd/Makefile head/ftp/proftpd/files/proftpd.in
This will remain broken when the openssl port is installed, I am using the openssl port and it was broken. you didnt commit a change that when the openssl port is in use to make the port use the port binary, so your change will fix it when port is not installed but remain broken when not installed.
I meant remain broken when openssl port is installed.
A commit references this bug: Author: mm Date: Mon Feb 2 10:32:27 UTC 2015 New revision: 378300 URL: https://svnweb.freebsd.org/changeset/ports/378300 Log: Change -pthread to -lpthread PR: 195921 Reported by: John Marino Changes: head/ftp/proftpd/Makefile
This patch does not work with me, proftpd crash after a few seconds. Without the "if" option (OPENSSL_PORT), everything is OK again. does not work: CPPFLAGS+= -DHAVE_OPENSSL -I${OPENSSLINC} LIBS+= -lssl -lcrypto -L${OPENSSLLIB} . if !defined(WITH_OPENSSL_PORT) LDFLAGS+= -pthread . endif .endif works: CPPFLAGS+= -DHAVE_OPENSSL -I${OPENSSLINC} LIBS+= -lssl -lcrypto -L${OPENSSLLIB} # . if !defined(WITH_OPENSSL_PORT) LDFLAGS+= -pthread # . endif .endif
I can confirm proftpd-1.3.5_6 works with me. (In reply to commit-hook from comment #13)