Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Enable core file dumps when an application crashes or segmentation faults

    Scheduled Pinned Locked Moved General pfSense Questions
    37 Posts 2 Posters 2.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      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) 
      
      JonathanLeeJ 2 Replies Last reply Reply Quote 1
      • JonathanLeeJ
        JonathanLee @stephenw10
        last edited by JonathanLee

        @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?

        Make sure to upvote

        1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          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.

          JonathanLeeJ 2 Replies Last reply Reply Quote 1
          • JonathanLeeJ
            JonathanLee @stephenw10
            last edited by

            @stephenw10 I bet it is like field of dreams for code, if you code it developers will come…

            Make sure to upvote

            1 Reply Last reply Reply Quote 0
            • JonathanLeeJ
              JonathanLee @stephenw10
              last edited by

              @stephenw10

              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

              Make sure to upvote

              stephenw10S 1 Reply Last reply Reply Quote 0
              • JonathanLeeJ
                JonathanLee @stephenw10
                last edited by

                @stephenw10 try to put it in quotes like this

                coredump_dir "/var/squid/logs"

                Make sure to upvote

                1 Reply Last reply Reply Quote 0
                • JonathanLeeJ
                  JonathanLee
                  last edited by JonathanLee

                  Screenshot 2024-06-12 at 12.24.15.png

                  could this be my issue with it not even trying?

                  Screenshot 2024-06-12 at 12.25.52.png

                  Make sure to upvote

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator @JonathanLee
                    last edited by

                    @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 or kill -11 against the PID rather than all 'squid' processes.

                    JonathanLeeJ 1 Reply Last reply Reply Quote 1
                    • JonathanLeeJ
                      JonathanLee @stephenw10
                      last edited by

                      @stephenw10

                      
                      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
                      

                      Make sure to upvote

                      1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        Hmm, are you testing this on your 2100? In 23.09.1?

                        JonathanLeeJ 2 Replies Last reply Reply Quote 0
                        • JonathanLeeJ
                          JonathanLee @stephenw10
                          last edited by

                          @stephenw10 No that version disabled my crypt chip I am still on 23.05.01 it is the only version that works for everything I need

                          Make sure to upvote

                          1 Reply Last reply Reply Quote 0
                          • JonathanLeeJ
                            JonathanLee @stephenw10
                            last edited by

                            @stephenw10 squids uid is squid and we are running commands as root does that matter?

                            Make sure to upvote

                            1 Reply Last reply Reply Quote 0
                            • stephenw10S
                              stephenw10 Netgate Administrator
                              last edited by

                              Nope that should be fine. This isn't a Squid specific issue, applies to any process I've tested this with. So far.

                              1 Reply Last reply Reply Quote 0
                              • stephenw10S
                                stephenw10 Netgate Administrator
                                last edited by

                                Hmm, maybe not. This does seem to be a permissions issue. Processes run as root will coredump as expected. Or at least try, some fail with lack of space for me.

                                Most services run as separate users though and cannot.

                                [24.08-DEVELOPMENT][admin@6100.stevew.lan]/root: ps aux | grep apc
                                root     2546   0.0  0.1   25796   5420  -  Ss   14:13    0:00.16 /usr/local/sbin/apcupsd
                                root    67005   0.0  0.0   13040   2664  0  S+   14:32    0:00.00 grep apc
                                [24.08-DEVELOPMENT][admin@6100.stevew.lan]/root: kill -11 2546
                                [24.08-DEVELOPMENT][admin@6100.stevew.lan]/root: ls -ls
                                total 421
                                  5 -rw-r--r--  2 root wheel     1011 Jun 11 10:33 .cshrc
                                  1 -rw-r--r--  1 root wheel        0 Jun 13 14:13 .hushlogin
                                  1 -rw-r--r--  1 root wheel       66 Jun 11 10:33 .k5login
                                  5 -rw-r--r--  1 root wheel      316 Jun 11 10:33 .login
                                  5 -rw-r--r--  2 root wheel     1199 Jun 13 14:13 .profile
                                  5 -rw-r--r--  1 root wheel     2135 Jun 13 14:13 .shrc
                                  1 drwx------  2 root wheel        3 Oct 20  2023 .ssh
                                  5 -rw-r--r--  1 root wheel     3402 Jun 13 14:13 .tcshrc
                                397 -rw-------  1 root wheel 22425600 Jun 13 14:32 apcupsd.core
                                  1 drwxr-xr-x  2 root wheel        2 Oct 20  2023 backup
                                
                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  Though the main Squid process runs as root... 🤔

                                  JonathanLeeJ 2 Replies Last reply Reply Quote 0
                                  • JonathanLeeJ
                                    JonathanLee @stephenw10
                                    last edited by

                                    @stephenw10 weird right it should core dump

                                    Make sure to upvote

                                    1 Reply Last reply Reply Quote 0
                                    • JonathanLeeJ
                                      JonathanLee @stephenw10
                                      last edited by

                                      @stephenw10

                                      https://redmine.pfsense.org/issues/15555#change-73638

                                      It’s for all of them Steve wheeler said, it’s a bug.

                                      Make sure to upvote

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        @JonathanLee said in Enable core file dumps when an application crashes or segmentation faults:

                                        https://redmine.pfsense.org/issues/15555#change-73638

                                        Yeah it appeared to be only non-root processes but the main Squid process is run as root (which is bad!) and still fails to create the core dump.

                                        JonathanLeeJ 1 Reply Last reply Reply Quote 1
                                        • JonathanLeeJ
                                          JonathanLee @stephenw10
                                          last edited by

                                          @stephenw10 we should still get core dumps right if it’s enabled. We found a 🐞, it’s not just squid.

                                          Make sure to upvote

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.