The ProFTPD daemon on my Slackware Linux server occasionally failed when a user requested a long directory listing. The symptoms were an interrupted listing on the client side, and a stuck process consuming 100% CPU on the server.

A little bit of hunting was enough to identify the cause: the problem occurred inside a malloc() call, so strictly speaking, it is not a bug in ProFTPD, but inside the gcc libraries or the Linux kernel.

That said, I found a workaround that treats the symptom, if not the cause. I recompiled ProFTPD with a somewhat different set of compile-time options. Specifically, I used the following configure command:

CFLAGS="-O2 -DPR_TUNABLE_NEW_POOL_SIZE=8192 -DPR_TUNABLE_BUFFER_SIZE=4096 \
 -march=i486 -mcpu=i686" ./configure --prefix=/usr --sysconfdir=/etc \
 --enable-autoshadow --localstatedir=/var/run \
 --with-modules=mod_readme:mod_ratio:mod_tls i486-slackware-linux

Needless to say, this is treating the symptom, not the cause; the real solution is to install updated packages that solve the underlying problem.