graygnuorg / pound

Light-weight reverse proxy, load balancer and HTTPS front-end for Web servers.
GNU General Public License v3.0
48 stars 13 forks source link

pound on FreeBSD exits on signal 11 and reports out of memory #31

Closed amuso closed 2 months ago

amuso commented 3 months ago

I've been running pound for months and regularly daily see the following kernel messages on FreeBSD 13.2-RELEASE-p11 on amd64.

Aug 2 02:58:20 webproxy kernel: pid 61930 (pound), jid 0, uid 80: exited on signal 11 Aug 2 02:58:20 webproxy pound[656]: got signal 20 Aug 2 02:58:20 webproxy pound[656]: child terminated on signal 11 Aug 2 06:10:48 webproxy kernel: pid 62161 (pound), jid 0, uid 80: exited on signal 11 Aug 2 06:10:48 webproxy pound[656]: got signal 20 Aug 2 06:10:48 webproxy pound[656]: child terminated on signal 11 Aug 2 13:07:34 webproxy kernel: pid 62854 (pound), jid 0, uid 80: exited on signal 11 Aug 2 13:07:34 webproxy pound[656]: got signal 20 Aug 2 13:07:34 webproxy pound[656]: child terminated on signal 11 Aug 3 01:05:43 webproxy kernel: pid 63329 (pound), jid 0, uid 80: exited on signal 11 Aug 3 01:05:44 webproxy pound[656]: got signal 20 Aug 3 01:05:44 webproxy pound[656]: child terminated on signal 11 Aug 3 01:26:33 webproxy kernel: pid 64153 (pound), jid 0, uid 80: exited on signal 11 Aug 3 01:26:33 webproxy pound[656]: got signal 20 Aug 3 01:26:33 webproxy pound[656]: child terminated on signal 11

I also see some daily occurrences of memory messages.

Aug 1 00:18:02 webproxy pound[59725]: out of memory Aug 1 01:21:44 webproxy pound[59725]: out of memory Aug 1 02:32:25 webproxy pound[59725]: out of memory Aug 1 03:12:29 webproxy pound[60276]: out of memory Aug 1 08:54:09 webproxy pound[60512]: out of memory Aug 1 09:10:01 webproxy pound[60512]: out of memory Aug 1 17:03:38 webproxy pound[61021]: out of memory Aug 1 21:29:26 webproxy pound[61773]: out of memory Aug 3 02:41:59 webproxy pound[64176]: out of memory Aug 3 14:26:25 webproxy pound[64176]: out of memory Aug 3 22:14:00 webproxy pound[64176]: out of memory

The machine has 8GB of RAM and swap space available, and is not under significant load. It only runs the pound service.

CPU: 0.2% user, 0.0% nice, 0.2% system, 0.0% interrupt, 99.6% idle Mem: 7864K Active, 169M Inact, 677M Wired, 516M Buf, 7065M Free Swap: 8191M Total, 8191M Free

PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 64176 www 8 20 0 50M 14M sigwai 0 0:15 0.00% pound 656 www 1 20 0 18M 6564K sigwai 1 0:00 0.00% pound

I'm aware that 13.2 is end of life as of June 30th this year so I'll try and deploy a new setup with 14.1-RELEASE and see if the issue still persists there.

Installed version via packages is the latest on this OS: pound-4.11_1 HTTP/HTTPS reverse-proxy and load-balancer

Let me know if I can supply any further information to investigate if this is an issue.

graygnuorg commented 3 months ago

Hi Odd-Jarle. Thanks for reporting. Can you try the following patch: https://github.com/graygnuorg/pound/commit/046afa537273fd8ab0aa31a88fe625c196f23474.patch

amuso commented 3 months ago

I have upgraded to 14.1-RELEASE and pound 4.11_1 though, so we'll see if the messages occur there as well. Give me some time to spin up a server and build from sources to try the patch. I'll report back. Thanks!

graygnuorg commented 3 months ago

The reason pound segfaults is the libpcre2 library (see https://github.com/graygnuorg/pound/issues/33 for details). Please, recompile pound with the --disable-pcreposix option.

amuso commented 3 months ago

Thanks. I'll notify the FreeBSD maintainer for the package about this compile option. Under FreeBSD 14.1-RELEASE I saw different messages using Pound 4.11

Aug 10 01:33:06 webproxy kernel: pid 8889 (pound), jid 0, uid 80: exited on signal 11 (no core dump - bad address) Aug 10 17:37:00 webproxy kernel: pid 9294 (pound), jid 0, uid 80: exited on signal 11 (no core dump - bad address) Aug 10 22:53:44 webproxy kernel: pid 11026 (pound), jid 0, uid 80: exited on signal 11 (no core dump - bad address) Aug 11 05:01:16 webproxy kernel: pid 11380 (pound), jid 0, uid 80: exited on signal 11 (no core dump - bad address) Aug 11 06:58:05 webproxy kernel: pid 12297 (pound), jid 0, uid 80: exited on signal 11 (no core dump - bad address) Aug 11 21:50:49 webproxy kernel: pid 12425 (pound), jid 0, uid 80: exited on signal 11 (no core dump - bad address) Aug 13 20:23:42 webproxy kernel: pid 17648 (pound), jid 0, uid 80: exited on signal 11 (no core dump - bad address)

I'm running a compiled version with the patch you supplied now under 13.2-RELEASE for the next day or so before I revert back to FreeBSD 14.1 and the precompiled package version.

Thanks for your great work!

graygnuorg commented 2 months ago

Please update to pound version 4.13.