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

    Every morning I have a "crash report" why?

    Scheduled Pinned Locked Moved pfBlockerNG
    14 Posts 2 Posters 1.3k 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.
    • BlueCoffeeB
      BlueCoffee @Gertjan
      last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • BlueCoffeeB
        BlueCoffee @Gertjan
        last edited by BlueCoffee

        @Gertjan Thanks ive done it and the logs are huge, but I don't see anything bad myself

        logs.txt

        GertjanG 1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan @BlueCoffee
          last edited by

          @BlueCoffee

          Not huge, it just contains the update date process, by the cron or manually, for the last several days.
          Yours start at around 09/1/23 21:00:12

          Your latest update is from just now : UPDATE PROCESS ENDED [ 09/4/23 09:13:12 ]

          But the log line didn't log - the offending code wasn't executed. So no PHP error.

          Let's wait until next morning ^^
          You should be able to find this text "CHECK ME" in the log, as it is a unique text sequence.

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          BlueCoffeeB 1 Reply Last reply Reply Quote 1
          • BlueCoffeeB
            BlueCoffee @Gertjan
            last edited by

            @Gertjan said in Every morning I have a "crash report" why?:

            @BlueCoffee

            Not huge, it just contains the update date process, by the cron or manually, for the last several days.
            Yours start at around 09/1/23 21:00:12

            Your latest update is from just now : UPDATE PROCESS ENDED [ 09/4/23 09:13:12 ]

            But the log line didn't log - the offending code wasn't executed. So no PHP error.

            Let's wait until next morning ^^
            You should be able to find this text "CHECK ME" in the log, as it is a unique text sequence.

            I will look out for it thanks Gertjan

            BlueCoffeeB 1 Reply Last reply Reply Quote 0
            • BlueCoffeeB
              BlueCoffee @BlueCoffee
              last edited by

              @BlueCoffee So I got it today but its differant this time around?

              Crash report begins.  Anonymous machine information:
              
              amd64
              14.0-CURRENT
              FreeBSD 14.0-CURRENT #1 RELENG_2_7_0-n255866-686c8d3c1f0: Wed Jun 28 04:21:19 UTC 2023     root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-2_7_0-main/obj/amd64/LwYAddCr/var/jenkins/workspace/pfSense-CE-snapshots-2_7_0-main/sources/FreeBSD-src-REL
              
              Crash report details:
              
              PHP Errors:
              [08-Sep-2023 14:23:40 Europe/London] PHP Fatal error:  Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2409
              Stack trace:
              #0 /etc/inc/pfsense-utils.inc(1902): get_memory()
              #1 /usr/local/www/includes/functions.inc.php(104): pfsense_default_state_size()
              #2 /usr/local/www/includes/functions.inc.php(35): get_pfstate()
              #3 /usr/local/www/getstats.php(40): get_stats(Array)
              #4 {main}
                thrown in /etc/inc/util.inc on line 2409
              
              GertjanG 1 Reply Last reply Reply Quote 0
              • GertjanG
                Gertjan @BlueCoffee
                last edited by

                @BlueCoffee said in Every morning I have a "crash report" why?:

                /etc/inc/util.inc:2409

                Can you show that exact line on your pfSense ?

                It's not https://github.com/pfsense/pfsense/blob/94eaa720e7f8c3c3106b3702ca0d16a519bf5b2e/src/etc/inc/util.inc#L2409C2-L2409C2 so you probably are using the System patches package, so lines are a bit different.

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                BlueCoffeeB 1 Reply Last reply Reply Quote 0
                • BlueCoffeeB
                  BlueCoffee @Gertjan
                  last edited by BlueCoffee

                  @Gertjan

                  This is what I have on that line

                  	return array(($physmem/1048576), ($realmem/1048576));
                  

                  The whole function is

                  function get_memory() {
                  	$physmem = get_single_sysctl("hw.physmem");
                  	$realmem = get_single_sysctl("hw.realmem");
                  	/* convert from bytes to megabytes */
                  	return array(($physmem/1048576), ($realmem/1048576));
                  
                  GertjanG 1 Reply Last reply Reply Quote 0
                  • GertjanG
                    Gertjan @BlueCoffee
                    last edited by Gertjan

                    @BlueCoffee said in Every morning I have a "crash report" why?:

                    return array(($physmem/1048576), ($realmem/1048576));

                    Ok, thanks.
                    For some reason, "$realmem" a PHP variable, didn't contain something that looks like an 'integer', but a text string like an error message ? or a null == "" string, which was in the past, after a implicit cast to a value integer '0', and now, with PHP 8,x, which uses far stronger type checking, it fails.
                    Take note : thinking out loud here.

                    "$realmem" should of course contain something like "4194304" which is 4 Mbytes for a 4 Mbytes system.
                    On your system, something else is return.
                    And that makes PHP fail .....

                    edit : or $physmem

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

                    BlueCoffeeB 1 Reply Last reply Reply Quote 0
                    • BlueCoffeeB
                      BlueCoffee @Gertjan
                      last edited by

                      @Gertjan said in Every morning I have a "crash report" why?:

                      @BlueCoffee said in Every morning I have a "crash report" why?:

                      return array(($physmem/1048576), ($realmem/1048576));

                      Ok, thanks.
                      For some reason, "$realmem" a PHP variable, didn't contain something that looks like an 'integer', but a text string like an error message ? or a null == "" string, which was in the past, after a implicit cast to a value integer '0', and now, with PHP 8,x, which uses far stronger type checking, it fails.
                      Take note : thinking out loud here.

                      "$realmem" should of course contain something like "4194304" which is 4 Mbytes for a 4 Mbytes system.
                      On your system, something else is return.
                      And that makes PHP fail .....

                      edit : or $physmem

                      All that seems way over my head pal im no coder :) I never had any errors on my old PFsense box. after I moved to this little box errors seem to be poping up all over.

                      Should I post this error ina new thread do you think?

                      GertjanG 1 Reply Last reply Reply Quote 0
                      • GertjanG
                        Gertjan @BlueCoffee
                        last edited by

                        @BlueCoffee said in Every morning I have a "crash report" why?:

                        Should I post this error ina new thread do you think?

                        We'll leave that to the forum admins ^^

                        here :

                        	log_error(sprintf('hw.physmem = "%s" - hw.realmem = "%s"', $physmem, $realmem));
                        

                        Do you think you can manage to edit the file, make it look like this :

                        94fe540a-dade-4d6a-ae39-38e1097877ae-image.png

                        Now go to the pfSense GUI dashboard.
                        And then to the location where the answers are : the logs :

                        a63f8325-f7e6-4617-8d64-9d2e7040762b-image.png

                        You saw I what I have. Both are probably strings that can easily be converted to integer numbers.
                        Now : your turn.

                        @BlueCoffee said in Every morning I have a "crash report" why?:

                        I moved to this little box

                        What little box ?

                        No "help me" PM's please. Use the forum, the community will thank you.
                        Edit : and where are the logs ??

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