OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: schnipp on January 30, 2025, 06:18:07 PM

Title: Squid: segmentation fault
Post by: schnipp on January 30, 2025, 06:18:07 PM
Since Opnsense 24.7.x (I don't exactly know) I observed that the squid proxy does not automatically start after booting up the firewall. The current Opnsense version 24.7.12_2 has the same issue. I tried to investigate via command line with the following result

Starting the proxy manually often works but raises segfault. Communication from the clients to the proxy is possible:

root@host:~ # configctl proxy start
Segmentation fault
Starting squid.
__ok__


Stopping the proxy works:

root@host:~ # configctl proxy stop
OK


Restarting the proxy using the "restart" command often leads to that communication from the clients to the proxy is not possible. It also raises segfaults:

root@host:~ # configctl proxy restart
Segmentation fault
Performing sanity check on squid configuration.
2025/01/30 17:52:32| Processing Configuration File: /usr/local/etc/squid/squid.conf (depth 0)
2025/01/30 17:52:37| Processing Configuration File: /usr/local/etc/squid/pre-auth/40-snmp.conf (depth 1)
2025/01/30 17:52:37| Processing Configuration File: /usr/local/etc/squid/pre-auth/dummy.conf (depth 1)
2025/01/30 17:52:37| Processing Configuration File: /usr/local/etc/squid/pre-auth/ipv4_fallback.conf (depth 1)
2025/01/30 17:52:37| Processing Configuration File: /usr/local/etc/squid/pre-auth/parentproxy.conf (depth 1)
2025/01/30 17:52:37| Processing Configuration File: /usr/local/etc/squid/pre-auth/rfc1918.conf (depth 1)
2025/01/30 17:52:37| Processing Configuration File: /usr/local/etc/squid/auth/dummy.conf (depth 1)
2025/01/30 17:52:37| Processing Configuration File: /usr/local/etc/squid/post-auth/dummy.conf (depth 1)
2025/01/30 17:52:37| WARNING: HTTP requires the use of Via
2025/01/30 17:52:37| Set Current Directory to /var/squid/cache
Segmentation fault
root@host:~ #


The system log shows that there could be a problem with binding the socket.

<13>1 2025-01-30T17:52:26+01:00 xxxxxxxxx.com opnsense 50236 - [meta sequenceId="1"] /usr/local/sbin/pluginctl: plugins_configure webproxy (1,restart)
<13>1 2025-01-30T17:52:32+01:00 xxxxxxxxx.com kernel - - [meta sequenceId="2"] <6>pid 64359 (squid), jid 0, uid 100: exited on signal 11 (no core dump - bad address)
<13>1 2025-01-30T17:52:37+01:00 xxxxxxxxx.com kernel - - [meta sequenceId="3"] <6>pid 66993 (squid), jid 0, uid 100: exited on signal 11 (no core dump - bad address)

But I don't have a clue where the segfaults come from. Has anybody observed similar issues or can give me a hint to investigate further (maybe I have overlooked an option to increase debug logging)?
Title: Re: Squid: segmentation fault
Post by: schnipp on February 04, 2025, 06:11:41 PM
Does anybody has an idea or observed a similar issue?
Title: Re: Squid: segmentation fault
Post by: glasi on February 05, 2025, 07:27:19 PM
Same issue here.

Segmentation fault also popping up when verifying configuration file with the -k parse option.
squid -k parse
Title: Re: Squid: segmentation fault
Post by: nicholaswkc on February 12, 2025, 07:34:07 AM
Try reinstall.
Title: Re: Squid: segmentation fault
Post by: franco on February 12, 2025, 08:11:30 AM
https://github.com/opnsense/plugins/issues/4500
Title: Re: Squid: segmentation fault
Post by: schnipp on February 16, 2025, 06:27:58 PM
Can anyone confirm that this issue is not causing Squid web proxy to malfunction in Opnsense version 25.1.1?
Title: Re: Squid: segmentation fault
Post by: schnipp on February 19, 2025, 06:27:55 PM
Further discussion in forum of version 25.1.1 (link (https://forum.opnsense.org/index.php?topic=45943.0))