Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 75072 - Proftpd possible segfault on amd64 with mod_delay on
Summary: Proftpd possible segfault on amd64 with mod_delay on
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gustavo Felisberto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-20 10:07 UTC by Phattanon Duangdara
Modified: 2005-03-02 15:11 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to skip mod_delay and delaytable if mod_delay is off (proftpd-1.2.10-mod-delay-delaytable-fix.patch,465 bytes, patch)
2005-01-06 22:25 UTC, Phattanon Duangdara
Details | Diff
proftpd-1.2.10-r3.ebuild (proftpd-1.2.10-r3.ebuild,4.20 KB, text/plain)
2005-02-17 12:44 UTC, Gustavo Felisberto (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phattanon Duangdara 2004-12-20 10:07:08 UTC
I got segfault with proftpd-1.2.10-r1 (and also -r2) when server was up a few hour. I try to remerge or use lastest version and still caught segfault.

I didn't try on x86. But I wonder it may got same results.


Reproducible: Sometimes
Steps to Reproduce:
1. Use proftpd on amd64 with mod_delay on (default)
2. login into any account
3. 

Actual Results:  
*** proftpd will crash later and still crash anytime after first crashed, even
restart proftpd.

*** I try to turn mod_delay off in proftpd.conf and I didn't get segfault after
restart server (mod_delay is on by default).

-----

I try to use proftpd -n -d9 to see debug information and it show that after
processing mod_delay after user login, it crash.

dekdoi.64hosting.com - FS: using system lstat()
dekdoi.64hosting.com - FS: using system lstat()
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching PRE_CMD command 'USER
anonymous' to mod_tls
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching PRE_CMD command 'USER
anonymous' to mod_core
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching PRE_CMD command 'USER
anonymous' to mod_core
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching PRE_CMD command 'USER
anonymous' to mod_delay
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching PRE_CMD command 'USER
anonymous' to mod_auth
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching auth request
"endpwent" to module mod_sql
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching auth request
"endpwent" to module mod_auth_file
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching auth request
"endpwent" to module mod_auth_unix
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching auth request
"endgrent" to module mod_sql
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching auth request
"endgrent" to module mod_auth_file
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching auth request
"endgrent" to module mod_auth_unix
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching CMD command 'USER
anonymous' to mod_ratio
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching CMD command 'USER
anonymous' to mod_auth
dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching POST_CMD command 'USER
anonymous' to mod_sql
HERE >> dekdoi.64hosting.com (localhost[127.0.0.1]) - dispatching POST_CMD
command 'USER anonymous' to mod_delay
HERE >> dekdoi.64hosting.com (localhost[127.0.0.1]) - ProFTPD terminating
(signal 11)
dekdoi.64hosting.com (localhost[127.0.0.1]) - FTP session closed.
dekdoi.64hosting.com - FS: using system lstat()
dekdoi.64hosting.com - ROOT PRIVS at mod_ctrls.c:1153
dekdoi.64hosting.com - RELINQUISH PRIVS at mod_ctrls.c:1157
dekdoi.64hosting.com - FS: using system lstat()

-----

This is error from other console i trying to login.

dekdoi proftpd # ftp -d -v
ftp> open localhost
Connected to localhost.
220 ProFTPD 1.2.10 Server (64Hosting.com Proftpd services) [127.0.0.1]
Name (localhost:root): anonymous
---> AUTH SSL
500 AUTH not understood
SSL not available
---> USER anonymous
421 Service not available, remote server has closed connection
Login failed.
---> SYST
No control connection for command: No such file or directory
ftp>

-----

Some kernel output

proftpd[21394]: segfault at 000000329556c058 rip 0000000000463622 rsp
0000007fbfffe9c0 error 4
proftpd[21831]: segfault at 000000329556c058 rip 0000000000463622 rsp
0000007fbfffe9c0 error 4


Expected Results:  
Able to login, no problems and segfault.

dekdoi proftpd # emerge info
Portage 2.0.51-r3 (gcc34-amd64-2004.1, gcc-3.4.3, glibc-2.3.4.20040808-r1,
2.6.9-gentoo-r9 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r9 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.7
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=k8 -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=k8 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks"
GENTOO_MIRRORS="http://gentoo.scphost.com  http://gentoo.osuosl.org"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://mirrors2.mirrors.scphost.com/gentoo-portage"
USE="X acpi amd64 apache2 apm arts avi berkdb bitmap-fonts crypt encode esd f77
foomaticdb fortran gd gdbm gif gnome gpm gtk gtk2 imap imlib ipv6 java jpeg kde
libg++ libwww mikmod motif mpeg msn multilib mysql ncurses nls nptl odbc
oggvorbis opengl oss pam pdflib perl perlsuid png python quicktime readline
samba sasl sdl slang snmp socks5 spell ssl tcltk tcpd threads truetype usb
vhosts xml xml2 xmms xv zlib"


If I need to post KERNEL_CONFIG please tell me.
Comment 1 Phattanon Duangdara 2004-12-29 09:52:30 UTC
Is may caused by unexists of /var/run/proftpd/proftpd.delay 

dekdoi.64hosting.com (ppp-61.91.71.33.revip.asianet.co.th[61.91.71.33]) - ROOT PRIVS at main.c:1011
dekdoi.64hosting.com (ppp-61.91.71.33.revip.asianet.co.th[61.91.71.33]) - SETUP PRIVS at main.c:1016
dekdoi.64hosting.com (ppp-61.91.71.33.revip.asianet.co.th[61.91.71.33]) - FTP session requested from unknown class
dekdoi.64hosting.com (ppp-61.91.71.33.revip.asianet.co.th[61.91.71.33]) - performing module session initializations
dekdoi.64hosting.com (ppp-61.91.71.33.revip.asianet.co.th[61.91.71.33]) - mod_delay/0.4: opening DelayTable '/var/run/proftpd/proftpd.delay'
dekdoi.64hosting.com (ppp-61.91.71.33.revip.asianet.co.th[61.91.71.33]) - ROOT PRIVS at mod_delay.c:655
dekdoi.64hosting.com (ppp-61.91.71.33.revip.asianet.co.th[61.91.71.33]) - FS: using system open()
dekdoi.64hosting.com (ppp-61.91.71.33.revip.asianet.co.th[61.91.71.33]) - RELINQUISH PRIVS at mod_delay.c:657
dekdoi.64hosting.com (ppp-61.91.71.33.revip.asianet.co.th[61.91.71.33]) - mod_delay/0.4: warning: unable to open DelayTable '/var/run/proftpd/proftpd.delay': No such file or directory
dekdoi.64hosting.com (ppp-61.91.71.33.revip.asianet.co.th[61.91.71.33]) - ProFTPD terminating (signal 11)
dekdoi.64hosting.com (ppp-61.91.71.33.revip.asianet.co.th[61.91.71.33]) - FTP session closed.
Comment 2 Phattanon Duangdara 2004-12-29 10:58:44 UTC
Problems cause with mod_delay. Reporting to upstream.

http://bugs.proftpd.org/show_bug.cgi?id=2540

Need to update very soon if i get patch and i will post here.
Comment 3 Gustavo Felisberto (RETIRED) gentoo-dev 2004-12-29 15:05:06 UTC
There seems to be two bugs here. One related to mod_delay on amd64 and the other due to no /var/run/proftpd/proftpd.delay. I have a question. If you deactivate mod_delay the server will start ok right?

I tested on a x86 system with mod_delay activated and even if i delete the scoreboard file it will be created by the server on startup.
Comment 4 Phattanon Duangdara 2005-01-03 02:42:01 UTC
After I test sometimes later. Deactivate mod_delay using 'DelayEngine off' not cause anything to change. There are still have problems when proftpd.delay not exists.

It seems to be bugs of mod_delay, NOT amd64 platform.
(I don't have time to do strace)

I know that patch was submitted to proftpd CVS. Proftpd ebuilds should update soon.
Comment 5 Kirk Lowery 2005-01-05 11:26:25 UTC
I experienced the exact problem of the bug reporter (using the -r1 ebuild), also on amd64 (dual Opterons), right down to the segfault kernel messages.

When I moved /var/run/proftpd/proftpd.delay out of the way and restarted the server, everything came back up normally, including a newly created .delay file. I'm waiting to see if the problem reoccurs after running a few hours.
Comment 6 Phattanon Duangdara 2005-01-06 22:25:45 UTC
Created attachment 47806 [details, diff]
Patch to skip mod_delay and delaytable if mod_delay is off
Comment 7 Phattanon Duangdara 2005-01-06 22:26:37 UTC
Comment on attachment 47806 [details, diff]
Patch to skip mod_delay and delaytable if mod_delay is off 

Patch from proftpd bugs #2540 (Already committed to proftpd CVS)
Comment 8 Phattanon Duangdara 2005-01-14 08:19:50 UTC
I later found What cause sometimes unproduceable bugs here after I try stracing proftpd with DelayEngine On. I think mod_delay have no bugs here but kernel mmap.

I don't know why this unsafe and cause Segfault, so It cannot lock proftpd.delay and segfault.

4167  clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2a96476ca0) = 4207
4167  close(1 <unfinished ...>
4207  rt_sigprocmask(SIG_UNBLOCK, [USR1 USR2 TERM CHLD],  <unfinished ...>
4167  <... close resumed> )             = 0
4207  <... rt_sigprocmask resumed> NULL, 8) = 0
4167  close(7 <unfinished ...>
4207  close(4 <unfinished ...>
4167  <... close resumed> )             = 0
4207  <... close resumed> )             = 0
4167  rt_sigprocmask(SIG_UNBLOCK, [USR1 USR2 TERM CHLD],  <unfinished ...>
4207  close(0 <unfinished ...>
4167  <... rt_sigprocmask resumed> NULL, 8) = 0
4207  <... close resumed> )             = 0
4167  fcntl(0, F_GETFL <unfinished ...>
4207  rt_sigaction(SIGUSR1, {0x408690, [USR1], SA_RESTART|0x4000000},  <unfinished ...>
4167  <... fcntl resumed> )             = 0x802 (flags O_RDWR|O_NONBLOCK|O_LARGEFILE)
4207  <... rt_sigaction resumed> {SIG_DFL}, 8) = 0
4167  fcntl(0, F_SETFL, O_RDWR)         = 0
4167  lstat("/etc/shutmsg", 0x7fbfffeb10) = -1 ENOENT (No such file or directory)
4167  select(5, [0 4], NULL, NULL, {30, 0} <unfinished ...>
4207  rt_sigaction(SIGUSR2, {0x408670, [USR2], SA_RESTART|0x4000000}, {0x408670, [USR2], SA_RESTART|0x4000000}, 8) = 0
4207  rt_sigaction(SIGCHLD, {SIG_DFL}, {0x408830, [CHLD], SA_RESTART|0x4000000}, 8) = 0
4207  rt_sigaction(SIGHUP, {SIG_IGN}, {0x408650, [HUP], SA_RESTART|0x4000000}, 8) = 0
4207  close(4294967295)                 = -1 EBADF (Bad file descriptor)
4207  getsockname(1, {sa_family=AF_INET, sin_port=htons(21), sin_addr=inet_addr("127.0.0.1")}, [42949672976]) = 0
4207  getpeername(1, {sa_family=AF_INET, sin_port=htons(37857), sin_addr=inet_addr("127.0.0.1")}, [42949672976]) = 0
4207  dup2(1, 0)                        = 0
4207  setsockopt(1, SOL_SOCKET, SO_KEEPALIVE, [26866497905229824], 4) = 0
4207  getsockopt(1, SOL_SOCKET, SO_SNDBUF, [17179919884], [4]) = 0
4207  setsockopt(0, SOL_SOCKET, SO_KEEPALIVE, [26866497905229824], 4) = 0
4207  getsockopt(0, SOL_SOCKET, SO_RCVBUF, [87520], [4]) = 0
4207  fcntl(0, F_GETFL)                 = 0x2 (flags O_RDWR|O_LARGEFILE)
4207  fcntl(0, F_SETFL, O_RDWR)         = 0
4207  fcntl(1, F_GETFL)                 = 0x2 (flags O_RDWR|O_LARGEFILE)
4207  fcntl(1, F_SETFL, O_RDWR)         = 0
4207  rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0
4207  setresuid(4294967295, 0, 4294967295) = 0
4207  setresgid(4294967295, 0, 4294967295) = 0
4207  close(4294967295)                 = -1 EBADF (Bad file descriptor)
4207  socket(PF_FILE, SOCK_DGRAM, 0)    = 4
4207  fcntl(4, F_SETFD, FD_CLOEXEC)     = 0
4207  connect(4, {sa_family=AF_FILE, path="/dev/log"}, 16) = -1 EPROTOTYPE (Protocol wrong type for socket)
4207  close(4)                          = 0
4207  socket(PF_FILE, SOCK_STREAM, 0)   = 4
4207  fcntl(4, F_SETFD, FD_CLOEXEC)     = 0
4207  connect(4, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0
4207  geteuid()                         = 0
4207  setresgid(4294967295, 410, 4294967295) = 0
4207  setresuid(4294967295, 1033, 4294967295) = 0
4207  rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0
4207  setsockopt(1, SOL_TCP, TCP_NODELAY, [1], 4) = 0
4207  setsockopt(0, SOL_TCP, TCP_NODELAY, [1], 4) = 0
4207  setsockopt(1, SOL_IP, IP_TOS, [16], 4) = 0
4207  setsockopt(0, SOL_IP, IP_TOS, [16], 4) = 0
4207  close(7 <unfinished ...>
4167  <... select resumed> )            = 1 (in [4], left {29, 999000})
4207  <... close resumed> )             = 0
4167  close(4)                          = 0
4167  lstat("/etc/shutmsg", 0x7fbfffeb10) = -1 ENOENT (No such file or directory)
4167  select(1, [0], NULL, NULL, {30, 0} <unfinished ...>
4207  open("/etc/hosts", O_RDONLY)      = 7
4207  fcntl(7, F_GETFD)                 = 0
4207  fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
4207  fstat(7, {st_mode=S_IFREG|0644, st_size=855, ...}) = 0
4207  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95570000
4207  read(7, "# /etc/hosts:  This file describ"..., 4096) = 855
4207  close(7)                          = 0
4207  munmap(0x2a95570000, 4096)        = 0
4207  open("/etc/hosts", O_RDONLY)      = 7
4207  fcntl(7, F_GETFD)                 = 0
4207  fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
4207  fstat(7, {st_mode=S_IFREG|0644, st_size=855, ...}) = 0
4207  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95570000
4207  read(7, "# /etc/hosts:  This file describ"..., 4096) = 855
4207  close(7)                          = 0
4207  munmap(0x2a95570000, 4096)        = 0
4207  geteuid()                         = 1033
4207  getegid()                         = 410
4207  setresuid(4294967295, 0, 4294967295) = 0
4207  setresgid(4294967295, 0, 4294967295) = 0
4207  getuid()                          = 0
4207  getuid()                          = 0
4207  setuid(0)                         = 0
4207  setgid(410)                       = 0
4207  setresuid(4294967295, 1033, 4294967295) = 0
4207  rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0
4207  rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0
4207  setresuid(4294967295, 0, 4294967295) = 0
4207  setresgid(4294967295, 0, 4294967295) = 0
4207  open("/var/run/proftpd/proftpd.delay", O_RDWR) = 7
4207  geteuid()                         = 0
4207  setresgid(4294967295, 410, 4294967295) = 0
4207  setresuid(4294967295, 1033, 4294967295) = 0
4207  alarm(0)                          = 0
4207  alarm(25)                         = 0
4207  rt_sigaction(SIGALRM, {0x40d9b0, [], SA_INTERRUPT|0x4000000}, NULL, 8) = 0
4207  rt_sigaction(SIGALRM, NULL, {0x40d9b0, [], SA_INTERRUPT|0x4000000}, 8) = 0
4207  rt_sigaction(SIGALRM, {0x40d9b0, [], SA_INTERRUPT|0x4000000}, NULL, 8) = 0
4207  alarm(0)                          = 25
4207  alarm(25)                         = 0
4207  setresuid(4294967295, 0, 4294967295) = 0
4207  setresgid(4294967295, 0, 4294967295) = 0
4207  open("/var/run/proftpd/proftpd.scoreboard", O_RDWR|O_CREAT, 0644) = 8
4207  fchmod(8, 0644)                   = 0
4207  fstat(8, {st_mode=S_IFREG|0644, st_size=32, ...}) = 0
4207  rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0
4207  read(8, "\357\276\255\336\0\0\0\0\2\0\4\1\0\0\0\0G\20\0\0\0\0\0"..., 32) = 32
4207  rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0
4207  geteuid()                         = 0
4207  setresgid(4294967295, 410, 4294967295) = 0
4207  setresuid(4294967295, 1033, 4294967295) = 0
4207  fcntl(8, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
4207  rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0
4207  read(8, "", 536)                  = 0
4207  lseek(8, 0, SEEK_CUR)             = 32
4207  geteuid()                         = 1033
4207  getegid()                         = 410
4207  lseek(8, 32, SEEK_SET)            = 32
4207  write(8, "o\20\0\0\t\4\0\0\232\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 536) = 536
4207  lseek(8, 32, SEEK_SET)            = 32
4207  rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT BUS USR1 ALRM TERM CHLD IO], NULL, 8) = 0
4207  fcntl(8, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
4207  fcntl(8, F_SETLKW, {type=F_WRLCK, whence=SEEK_CUR, start=32, len=536}) = 0
4207  lseek(8, 32, SEEK_SET)            = 32
4207  write(8, "o\20\0\0\t\4\0\0\232\1\0\0(none)\0\0\0\0\0\0\0\0\0\0\0"..., 536) = 536
4207  lseek(8, 32, SEEK_SET)            = 32
4207  fcntl(8, F_SETLKW, {type=F_UNLCK, whence=SEEK_CUR, start=32, len=536}) = 0
4207  lseek(8, 0, SEEK_CUR)             = 32
4207  lseek(8, 32, SEEK_SET)            = 32
4207  fcntl(8, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
4207  read(8, "o\20\0\0\t\4\0\0\232\1\0\0(none)\0\0\0\0\0\0\0\0\0\0\0"..., 536) = 536
4207  fcntl(8, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
4207  fcntl(8, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
4207  read(8, "", 536)                  = 0
4207  fcntl(8, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
4207  lseek(8, 32, SEEK_SET)            = 32
4207  rt_sigaction(SIGALRM, {0x40d9b0, [], SA_INTERRUPT|0x4000000}, NULL, 8) = 0
4207  rt_sigaction(SIGALRM, NULL, {0x40d9b0, [], SA_INTERRUPT|0x4000000}, 8) = 0
4207  rt_sigaction(SIGALRM, {0x40d9b0, [], SA_INTERRUPT|0x4000000}, NULL, 8) = 0
4207  alarm(0)                          = 25
4207  alarm(25)                         = 0
4207  alarm(0)                          = 25
4207  alarm(120)                        = 0
4207  open("/etc/services", O_RDONLY)   = 9
4207  fcntl(9, F_GETFD)                 = 0
4207  fcntl(9, F_SETFD, FD_CLOEXEC)     = 0
4207  fstat(9, {st_mode=S_IFREG|0644, st_size=28741, ...}) = 0
4207  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95570000
4207  read(9, "# /etc/services:\n# $Id: services"..., 4096) = 4096
4207  read(9, "tore\ndeos\t\t76/udp\n# private\t77/t"..., 4096) = 4096
4207  close(9)                          = 0
4207  munmap(0x2a95570000, 4096)        = 0
4207  rt_sigaction(SIGALRM, {0x40d9b0, [], SA_INTERRUPT|0x4000000}, NULL, 8) = 0
4207  rt_sigaction(SIGALRM, NULL, {0x40d9b0, [], SA_INTERRUPT|0x4000000}, 8) = 0
4207  rt_sigaction(SIGALRM, {0x40d9b0, [], SA_INTERRUPT|0x4000000}, NULL, 8) = 0
4207  alarm(0)                          = 120
4207  alarm(10)                         = 0
4207  socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 9
4207  setsockopt(9, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
4207  bind(9, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
4207  getsockname(9, {sa_family=AF_INET, sin_port=htons(37858), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
4207  connect(9, {sa_family=AF_INET, sin_port=htons(113), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused)
4207  alarm(0)                          = 10
4207  alarm(120)                        = 0
4207  close(9)                          = 0
4207  setsockopt(0, SOL_SOCKET, SO_OOBINLINE, [18458824545402881], 4) = 0
4207  setsockopt(1, SOL_SOCKET, SO_OOBINLINE, [18458858905141249], 4) = 0
4207  fcntl(0, F_SETOWN, 4207)          = 0
4207  fcntl(1, F_SETOWN, 4207)          = 0
4207  rt_sigaction(SIGALRM, {0x40d9b0, [], SA_INTERRUPT|0x4000000}, NULL, 8) = 0
4207  rt_sigaction(SIGALRM, NULL, {0x40d9b0, [], SA_INTERRUPT|0x4000000}, 8) = 0
4207  rt_sigaction(SIGALRM, {0x40d9b0, [], SA_INTERRUPT|0x4000000}, NULL, 8) = 0
4207  alarm(0)                          = 120
4207  alarm(120)                        = 0
4207  select(2, [], [1], NULL, {60, 0}) = 1 (out [1], left {60, 0})
4207  write(1, "220 ProFTPD 1.2.10 Server (64Hos"..., 72) = 72
4207  write(2, "dekdoi.64hosting.com (localhost["..., 66) = 66
4207  select(1, [0], [], NULL, {60, 0}) = 1 (in [0], left {60, 0})
4207  read(0, "USER anonymous\r\n", 1022) = 16
4207  alarm(0)                          = 120
4207  alarm(120)                        = 0
4207  close(5)                          = 0
4207  munmap(0x2a9556c000, 4096)        = 0
4207  close(6)                          = 0
4207  munmap(0x2a9556d000, 4096)        = 0
4207  mmap(NULL, 4288, PROT_READ|PROT_WRITE, MAP_SHARED, 7, 0) = 0x2a9556c000
4207  fcntl(7, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=2144}) = 0
4207  --- SIGSEGV (Segmentation fault) @ 0 (0) ---
4207  fcntl(8, F_SETLKW, {type=F_WRLCK, whence=SEEK_CUR, start=32, len=536}) = 0
4207  lseek(8, 32, SEEK_SET)            = 32
4207  write(8, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 536) = 536
4207  lseek(8, 32, SEEK_SET)            = 32
4207  fcntl(8, F_SETLKW, {type=F_UNLCK, whence=SEEK_CUR, start=32, len=536}) = 0
4207  write(2, "dekdoi.64hosting.com (localhost["..., 78) = 78
4207  write(2, "dekdoi.64hosting.com (localhost["..., 66) = 66
4207  rt_sigaction(SIGSEGV, {SIG_DFL}, {0x408700, [SEGV], SA_RESTART|0x4000000}, 8) = 0
4207  rt_sigreturn(0xb)                 = 4294967295
4207  --- SIGSEGV (Segmentation fault) @ 0 (0) ---
4167  <... select resumed> )            = ? ERESTARTNOHAND (To be restarted)
4167  --- SIGCHLD (Child exited) @ 0 (0) ---
4167  rt_sigprocmask(SIG_BLOCK, [TERM CHLD], NULL, 8) = 0
4167  wait4(-1, NULL, WNOHANG, NULL)    = 4207
4167  wait4(-1, NULL, WNOHANG, NULL)    = -1 ECHILD (No child processes)
Comment 9 FieldySnuts 2005-02-17 08:43:04 UTC
I am having the same problems though on ~x86.

Trying to turn mod_delay off via DelayEngine off results in mod_delay still looking for the DelayTable file, even if you point it somewhere else. Any client connecting immediately has their session terminated, and that session of proftpd segfaults (sig 11).

This is in 1.2.10-r1 on ~x86 again, but I figured this info would be useful.
Comment 10 FieldySnuts 2005-02-17 10:03:31 UTC
This is likely related to this bug:

http://bugs.proftpd.org/show_bug.cgi?id=2540

I had to edit the 1.2.10-r2 ebuild to not attempt to build mod_delay to get around the problem. Disabling mod_delay according to the instructions will not work.

Again, I am ~x86 but I bet this applies to any arch.
Comment 11 Gustavo Felisberto (RETIRED) gentoo-dev 2005-02-17 12:44:24 UTC
Created attachment 51465 [details]
proftpd-1.2.10-r3.ebuild

Can you please test this version? After talking alot to upstream i decided it
is no god to try to backport the new mod_delay to 1.2.10 as the new versions
are being developed against the proftpd cvs, so i decided to remove mod_delay
Comment 12 FieldySnuts 2005-02-17 13:28:41 UTC
Wish I could assist, however that machine is production and it has to stay up.

Pretty sure all I did was remove :mod_delay somwhere in there, (not at work now).
Comment 13 Gustavo Felisberto (RETIRED) gentoo-dev 2005-03-02 15:11:40 UTC
In portage now