23.05.1: PHP Fatal error: Uncaught TypeError: Unsupported operand types
-
@stephenw10 said in 23.05.1: PHP Fatal error: Uncaught TypeError: Unsupported operand types:
Does it happen when doing anything in particular? Can you trigger it on demand?
It happens when doing nothing in particular. It just happens in the background. I can wipe the crash report and accept the notification. And then the next day it will happen again. And no, can't trigger it, since I do not even know what part of the UI or job in the background triggers it.
Also, just noticed, there is an older report:Crash report begins. Anonymous machine information: amd64 14.0-CURRENT FreeBSD 14.0-CURRENT #1 plus-RELENG_23_05_1-n256108-459fc493a87: Wed Jun 28 04:26:04 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-23_05_1-main/obj/amd64/f2Em2w3l/var/jenkins/workspace/pfSense-Plus-snapshots-23_05_1-main/sources/ Crash report details: PHP Errors: [16-Jul-2023 19:44:14 Etc/UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2479 Stack trace: #0 /etc/inc/pfsense-utils.inc(2013): get_memory() #1 /etc/inc/filter.inc(510): pfsense_default_state_size() #2 /etc/rc.filter_configure_sync(32): filter_configure_sync() #3 {main} thrown in /etc/inc/util.inc on line 2479 [27-Jul-2023 21:20:37 Etc/UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2479 Stack trace: #0 /etc/inc/pfsense-utils.inc(2013): 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 2479 No FreeBSD crash data found.
-
-
@stephenw10 said in 23.05.1: PHP Fatal error: Uncaught TypeError: Unsupported operand types:
Checked with a friend of mine that runs similar device but has a clean setup with no migrations. From the looks of it, he used some old 2.7 beta and gone to latest plus version. No crashes there.
So I guess it has something to do with the imported config in between the two 23.01 instances and an upgrade to higher version. Altho how it leads to a non-numeric string being returned from sysctl is a mystery. -
Indeed there seems to be something unique in your config since there have been many thousands of successful upgrades from 23.01 that don't hit it. Including the many upgrades I've run myself.
-
@Suika, I'm curious what device you're running on? I get the same exact error on a new N305 device after importing a config from my old J4125 system.
I've been running my old device concurrent with the new one while I tried all sorts of things. It ran for a full 24 hours with nothing connected except the WAN. It had no issues, so I think I've ruled out general background processes. I connected it to my LAN switch tonight and I got the error within an hour. It's the same exact error as yours as far as I can tell.
PHP Errors: [14-Aug-2023 17:25:56 US/Central] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2479 Stack trace: #0 /etc/inc/pfsense-utils.inc(2013): 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 2479
I tried removing the system info widget from my dashboard in case it was something related to pulling memory usage, but that made no difference. The only constant is that it comes up after loading a config from the old device, but it doesn't seem to matter what version the backup was made on. I've made a backup from the 4125 system running 23.05.1 and loaded it onto the N305, also running 23.05.1, and it still creeps in.
I'm going to try the patch in the redmine mentioned above. Will follow up if I find any other clues.
-
Hello!
Maybe not following the patch correctly in util.inc .../* If both are invalid, something deeper is wrong */ if (!is_numericint($physmem) && is_numericint($realmem)) {
should be...
/* If both are invalid, something deeper is wrong */ if (!is_numericint($physmem) && !is_numericint($realmem)) {
???
John
-
You should ask that on the bug report: https://redmine.pfsense.org/issues/14648
-
I think I have the same issue.
Went from a i5 6500 to a J4025 and now (2 days ago) I got a asrock n100m....
From the i5 6500 to the J4025 no issues (but 2 cores was not enough, so now the new one)
But now I get this errors.Switched some hardware - still same issue.
Tryed reinstalling all packages - did not help. (now i'm rocking only Avahi)
But I figured out when I get the error - when the system is under heavy(long) load (downloading a big game).My 2 errors:
Now i'm thinking of reinstalling everything - fresh.
But aybe somebody else tried that already? -
Oke I did the redmine thing aswell - looks like its solve?
It was very scary for me, i'm a n00b at this (starded this year with pfsense - 9 out of 10 times I have no idea what i'm doing.
Also english is not my native language - so not easy hahahBut much awesome!
-
I have the same error and mine came with 23.01 and I upgraded to 23.05. It had and error before and 23.05 did not fix it.
Crash report begins. Anonymous machine information:
amd64
14.0-CURRENT
FreeBSD 14.0-CURRENT #1 plus-RELENG_23_05_1-n256108-459fc493a87: Wed Jun 28 04:26:04 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-23_05_1-main/obj/amd64/f2Em2w3l/var/jenkins/workspace/pfSense-Plus-snapshots-23_05_1-main/sources/Crash report details:
PHP Errors:
[19-Oct-2023 16:36:06 US/Pacific] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2479
Stack trace:
#0 /etc/inc/pfsense-utils.inc(2013): get_memory()
#1 /usr/local/www/includes/functions.inc.php(104): pfsense_default_state_size()
#2 /usr/local/www/includes/functions.inc.php(46): get_pfstate(true)
#3 /usr/local/www/getstats.php(40): get_stats(Array)
#4 {main}
thrown in /etc/inc/util.inc on line 2479
[20-Oct-2023 14:18:20 US/Pacific] PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /usr/local/www/includes/functions.inc.php:219
Stack trace:
#0 /usr/local/www/includes/functions.inc.php(33): mem_usage()
#1 /usr/local/www/getstats.php(40): get_stats(Array)
#2 {main}
thrown in /usr/local/www/includes/functions.inc.php on line 219No FreeBSD crash data found.
-
Did you try the patch on the bug report?: https://redmine.pfsense.org/issues/14648
What hardware is that?
Steve
-
Hmmmm I just update it to 23.05. I will need to setup how to apply a patch. The hardware is a MOGINSOK N100.
Steven V. Snead, MCSE, CCNA
-
23.05.1 is the current version. 23.09-beta is available.
However that is a known bug that we have not yet been able to replicate. It seems to affect only some devices. The patch on the bug report mitigates the issue.
Steve
-
Thanks for the info. This is my first time setting up a pfsense. I have been using Sonicwall for years. Site to Site VPN seems to work good with ipsec.
Steven V. Snead, MCSE, CCNA