Enable core file dumps when an application crashes or segmentation faults
-
n 11 10:29:15 kernel pid 4993 (squid), jid 0, uid 100: exited on signal 6
Jun 11 10:29:15 (squid-1) 4993 FATAL: Received Segment Violation...dying. listening port: 127.0.0.1:3128
Jun 11 10:23:13 kernel pid 43536 (squid), jid 0, uid 100: exited on signal 6
Jun 11 10:23:05 (squid-1) 43536 FATAL: Received Segment Violation...dying. connection: conn749025 local=192.168.1.1:3128 remote=192.168.1.5:59502 flags=1
Jun 11 10:19:00 sshguard 98282This is the error it is a segment fault right?
-
Oh, yes you need Squid to listen on localhost to see the stats from it. That's how it is queried.
-
@stephenw10 so that solved my error, normally would that generate a corefile? Squid developers said I can manually generate a core dump also to get the stack
For example, if you want to abort a Squid worker process that has OS process ID (PID) 12345, you may do something like this: sudo kill -SIGABRT 12345 You can use "ps" or "top" commands to learn PIDs of processes you want to signal.
When I did this it also showed no core file.
-
@stephenw10 that swap file it creates is not readable it’s compiled information also. Just a side note
-
If a process aborts and creates a core file you should see something like:
Mar 19 23:14:22 kernel pid 76582 (php-fpm), jid 0, uid 0: exited on signal 11 (core dumped)
May 7 15:15:47 fw1 kernel: pid 65129 (pftop), jid 0, uid 0: exited on signal 6 (core dumped)
-
@stephenw10 do you know how or what commands are used to manually trigger it for squid?
-
Nope not something I've ever tried. Did you try the command they gave you?
-
@JonathanLee said in Enable core file dumps when an application crashes or segmentation faults:
coredump_dir /root
Where did you set that?
-
@stephenw10 yes it showed blank from command input in GUI it killed the process but no core file it didn’t generate one when I used that command
I am going to try this one recommend by a freeBSD forum user
killall -11 squid worked for me (as root)
-
@stephenw10 advanced options on squid configure gui area, it takes when I run squid -k parse also
-
It tries to dump the core for both the main and child squid processes here but fails with:
Jun 12 19:02:08 kernel pid 80887 (squid), jid 0, uid 0: exited on signal 6 (no core dump - bad address) Jun 12 19:01:48 kernel pid 33418 (squid), jid 0, uid 100: exited on signal 6 (no core dump - bad address)
-
@stephenw10 that looks like a permissions issue with Squid I wonder if we set it to squid logs location if that would work? Bad address? Does it mean path?
-
Yes I assume it's trying to dump somewhere it can't or has nothing configured.
I don't expect to set that value in the Squid config. It shows the same for other processes. Seems like a FreeBSD env value missing.
-
@stephenw10 I bet it is like field of dreams for code, if you code it developers will come…
-
killall -11 squid
mine shows no information on core anything...
Jun 12 12:11:40 kernel pid 84728 (squid), jid 0, uid 100: exited on signal 6
Jun 12 12:11:40 kernel pid 84677 (squid), jid 0, uid 0: exited on signal 11 -
@stephenw10 try to put it in quotes like this
coredump_dir "/var/squid/logs"
-
could this be my issue with it not even trying?
-
@JonathanLee said in Enable core file dumps when an application crashes or segmentation faults:
killall -11 squid
mine shows no information on core anything...
Try using
kill -6
orkill -11
against the PID rather than all 'squid' processes. -
Jun 12 13:40:58 kernel pid 88818 (squid), jid 0, uid 100: exited on signal 6 Jun 12 13:40:58 (squid-1) 88818 FATAL: Received Segment Violation...dying. listening port: 192.168.1.1:3128 Jun 12 13:39:43 kernel pid 51752 (squid), jid 0, uid 100: exited on signal 6 Jun 12 13:39:43 (squid-1) 51752 FATAL: Received Segment Violation...dying. Jun 12 13:39:11 kernel pid 17654 (squid), jid 0, uid 100: exited on signal 6 Jun 12 13:38:05 check_reload_status 480 Reloading filter
-
Hmm, are you testing this on your 2100? In 23.09.1?