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

    pkg-static consuming 100% cpu

    Scheduled Pinned Locked Moved General pfSense Questions
    43 Posts 19 Posters 8.2k 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.
    • V
      veriqster
      last edited by

      I bet all it takes to fix this is a couple of lines at the beginning of a certain file, something along the lines of " ping.......; if/while........; else "try again at another time when server is up and running".
      Wondering if this applies to community edition only or paid members are affected as well.

      1 Reply Last reply Reply Quote 0
      • X
        xtal
        last edited by

        It's probably even simpler than that, this is a symptom of a common oversight.

        1 Reply Last reply Reply Quote 0
        • A
          Artichost
          last edited by

          Just update the certificate and reboot the server. ;-)

          p1terP 1 Reply Last reply Reply Quote 1
          • p1terP
            p1ter @Artichost
            last edited by

            @artichost said in Pkg-Static 100% CPU:

            Just update the certificate and reboot the server. ;-)

            Sorry. I'm not shure I understand what you mean. Can you explain please?

            A 1 Reply Last reply Reply Quote 0
            • G
              gonace
              last edited by

              Kind of a big oversight that a failing update-server(s) can cause pfSense to hog a process at 100% ;)

              GrimsonG 1 Reply Last reply Reply Quote 0
              • GrimsonG
                Grimson Banned @gonace
                last edited by

                @gonace said in Pkg-Static 100% CPU:

                Kind of a big oversight that a failing update-server(s) can cause pfSense to hog a process at 100% ;)

                Well the pkg system is part of FreeBSD, feel free to create a bug report at: https://bugs.freebsd.org

                1 Reply Last reply Reply Quote 0
                • G
                  gonace
                  last edited by

                  @grimson said in Pkg-Static 100% CPU:

                  @gonace said in Pkg-Static 100% CPU:

                  Kind of a big oversight that a failing update-server(s) can cause pfSense to hog a process at 100% ;)

                  Well the pkg system is part of FreeBSD, feel free to create a bug report at: https://bugs.freebsd.org

                  I'm not sure since I've not confirmed it on multiple machines, but I can't reproduce it under FreeBSD 11.2 (clean install) so I'm not sure if it's a bug in FreeBSD rather than something specific when running pfSense.

                  But yeah, just tried to reproduce it on one virtual machine.

                  GrimsonG 1 Reply Last reply Reply Quote 0
                  • GrimsonG
                    Grimson Banned @gonace
                    last edited by

                    @gonace said in Pkg-Static 100% CPU:

                    I'm not sure since I've not confirmed it on multiple machines, but I can't reproduce it under FreeBSD 11.2 (clean install) so I'm not sure if it's a bug in FreeBSD rather than something specific when running pfSense.

                    Well the FreeBSD servers aren't down.

                    G 1 Reply Last reply Reply Quote 0
                    • G
                      gonace @Grimson
                      last edited by

                      @grimson said in Pkg-Static 100% CPU:

                      @gonace said in Pkg-Static 100% CPU:

                      I'm not sure since I've not confirmed it on multiple machines, but I can't reproduce it under FreeBSD 11.2 (clean install) so I'm not sure if it's a bug in FreeBSD rather than something specific when running pfSense.

                      Well the FreeBSD servers aren't down.

                      Well, I blocked traffic to them and even blocked access to the internet on FreeBSD 11.2 (clean install) and did the same with a clean install of pfSense and the problem only arises on the clean install of pfSense.

                      1 Reply Last reply Reply Quote 0
                      • A
                        Artichost @p1ter
                        last edited by

                        @p1ter It´s a handshake problem ;-)

                        p1terP 1 Reply Last reply Reply Quote 0
                        • V
                          veriqster
                          last edited by

                          The BSD servers might be up but blocking access to them upstream would be equivalent to them being down. Can someone try to do just that?
                          Definitely a very disturbing oversight, makes me wonder what other things received the same level of attention :)

                          GrimsonG 1 Reply Last reply Reply Quote 0
                          • p1terP
                            p1ter @Artichost
                            last edited by

                            @artichost Thank you. I mean can I fix it by myself?

                            1 Reply Last reply Reply Quote 0
                            • GrimsonG
                              Grimson Banned @veriqster
                              last edited by

                              @veriqster said in Pkg-Static 100% CPU:

                              The BSD servers might be up but blocking access to them upstream would be equivalent to them being down.

                              That would make them completely unreachable, it currently looks like the pfSense servers hang/are very slow during the SSL negotiation which is a different situation. If you want to see the difference do a traffic capture instead of fooling around.

                              1 Reply Last reply Reply Quote 0
                              • D
                                DougM
                                last edited by

                                Hello from Brazil. Same here, pkg-static-update 100% usage cpu but the system looks functional.

                                1 Reply Last reply Reply Quote 0
                                • M
                                  mikekoke
                                  last edited by

                                  Hello everyone,
                                  I have the same problem but also the process /usr/local/sbin/pkg-static search -r to 100%

                                  1 Reply Last reply Reply Quote 0
                                  • C
                                    chance
                                    last edited by

                                    I'm not an expert, but could one via ssh temporarily replace pkg-static with a shell script that basically does nothing? If so, can someone with more skills than myself show me the way?
                                    -Chance

                                    1 Reply Last reply Reply Quote 0
                                    • V
                                      veriqster
                                      last edited by

                                      then maybe someone should just pull the Ethernet plug out of them until things are sorted out instead of messing up with some systems that people depend on.
                                      Honestly I would have said "shit happens, maybe they can just fix it going forward" but his attitude of leaving the servers on knowing it causes issues like this makes me wonder what other things are deemed as acceptable by "the man in charge", things that a dumb user like me might not be able grasp even by looking at the code (which I have neither time nor desire to dedicate myself to)

                                      1 Reply Last reply Reply Quote 1
                                      • RicoR
                                        Rico LAYER 8 Rebel Alliance
                                        last edited by Rico

                                        Guys, just disable the dashboard automatic update check, the process will disappear after some time. No reboot or anything is needed.
                                        Yeah its annoying to eat one core after the update server broke, but not this dramatic.
                                        I'm sure the Devs will fix this issue in future.

                                        -Rico

                                        A 1 Reply Last reply Reply Quote 0
                                        • G
                                          gmjs
                                          last edited by

                                          Identical issue with my copy of the community version here (2.4.4-RELEASE-p2, upgraded three times since installation).

                                          I've killed off the pkg-static process with "kill" and disabled the "Dashboard Check" for updates. This seems to bring CPU usage back to normal, provided that I don't open the Update screen.

                                          1 Reply Last reply Reply Quote 0
                                          • C
                                            chance
                                            last edited by chance

                                            I've done the following and corrected (temporarily) the 100% CPU.

                                            Via ssh, I moved /usr/local/sbin/pkg-static to /usr/local/sbin/pkg-static.old and created /usr/local/sbin/pkg-static (a shell script) with the following contents.

                                            while :
                                            do
                                            sleep 5000
                                            done;

                                            don't forget to chmod +x /usr/local/sbin/pkg-static

                                            This has corrected my CPU usage until the servers are back up. I am not sure if this survives a reboot, but as such it's easy to implement.

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