[squid-users] Squid on Freebsd
Alex Rousskov
rousskov at measurement-factory.com
Tue Jul 23 19:22:59 UTC 2024
On 2024-07-23 13:34, Anton Kornexl wrote:
> Squid starts, shows a segmentation fault and continues working normally.
> Squid forks a worker child and probably this child works, but the parent
> process dies with segmentation fault. There is no sign of this
> segmention fault in the cache log.
You may catch parent Squid in the act of crashing if you start Squid
from gdb, but telling gdb which process to watch may not be trivial, and
I would leave that experiment for later and focus on an easier target first:
> The segmentation fault occurs even when calling squid -k parse.
>
> Should i try to produce a coredump of a squid -k parse run?
Yes, please: `gdb --args squid -k parse ...` or a similar command may
work to tell gdb how to start Squid. After that, inside gdb, a "run"
command should start Squid and produce a stack trace we need to triage
this problem further.
Alternatively, enable coredump file generation in your OS (if needed)
and examine the dump file using gdb as detailed on the same page that
Francesco has referenced earlier:
https://wiki.squid-cache.org/SquidFaq/BugReporting#crashes-and-core-dumps
HTH,
Alex.
> Am 23.07.2024 09:03 schrieb Francesco Chemolli <gkinkie at gmail.com>:
>
> Hi Anton,
> no, segmentation fault shouldn't happen at any time.
> Could you try to follow the instructions at
> https://wiki.squid-cache.org/SquidFaq/BugReporting#crashes-and-core-dumps
> ?
> What are the last lines in the cache.log when the segmentation fault
> happens?
> Thanks
>
> On Tue, Jul 23, 2024 at 3:12 AM Anton Kornexl
> <anton.kornexl at miex.cc> wrote:
> >
> > Hello,
> >
> > I have tested the two installations further
> >
> > Opnsense 23.x with squid 6.6 on freebsd 13.2-Release-p9 produces the
> > same segmentation fault, but it does not popup as red window in the
> > dashboard.
> >
> > I have set "debug_options ALL,5" in squid.conf:
> >
> > I have found the following lines in cache.log (grep _suid cache.log)
> >
> > 2024/07/22 17:26:52.186 kid1| 21,3| tools.cc(625) enter_suid:
> > enter_suid: PID 29145 taking root privileges
> > 2024/07/22 17:26:52.186 kid1| 21,31 tools.cc(629) enter_suid:
> > enter_suid: setresuid failed: (1) Operation not permitted
> > 2024/07/22 17:26:52.186 kid1| 21,3| tools.cc(561) leave suid: leave
> > suid: PID 29145 called
> > 2024/07/22 17:26:52.187 kid1| 21,31 tools.cc(625) enter_suid:
> > enter_suid: PID 29145 taking root privileges
> > 2024/07/22 17:26:52.187 kid1| 21,3| tools.cc(629) enter_suid:
> > enter_suid: setresuid failed: (1) Operation not permitted
> > 2024/07/22 17:26:52.187 kid1| 21,31 tools.cc(561) leave_suid: leave
> > suid: PID 29145 called
> > 2024/07/22 17:26:52.187 kid1| 21,31 tools.cc(625) enter_suid:
> > enter_suid: PID 29145 taking root privileges
> > 2024/07/22 17:26:52.187 kid1l 21,31 tools.cc(629) enter_suid:
> > enter_suid: setresuid failed: (1) Operation not permitted
> > 2024/07/22 17:26:52.187 kid1| 21,31 tools.cc(561) leave_suid: leave
> > suid: PID 29145 called
> > 2024/07/22 17:26:52.187 kid1l 21,31 tools.cc(561) leave_suid:
> > leave_suid: PID 29648 called
> > 2024/07/22 17:26:52.187 kid1l 21,31 tools.cc(651) no_suid:
> no_suid: PID
> > 29648 giving up root privileges forever
> >
> > maybe this is the cause of the "segmentation fault".
> >
> > The difference between the installations 23.x and 24.x is the
> alerting
> > of this segmentaion fault in the dashboard of opnsense.
> >
> > But what ist the cause of this "Operation not permitted"
> >
> > yours
> >
> > Anton Kornexl
> >
> > Am 22.07.2024 um 11:03 schrieb Anton Kornexl:
> > > Hello
> > >
> > > i try to use squid (6.10) with opnsense 24.x on freebsd
> > > 13-2-Release-p11.
> > >
> > > It produces a "segmentation fault" at start and restart but the
> > > process runs.
> > >
> > > The "segmentation fault" occurs even with squid -k parse.
> > >
> > > A "service squid reload" runs OK, but a "service squid restart"
> > > produces this Segmentation fault.
> > >
> > > The problem did not exist with opnsense 23.x and an older squid.
> > >
> > > How can I debug this error probably in the parse part?
> > >
> > > yours
> > >
> > > Anton Kornexl
More information about the squid-users
mailing list