Project

General

Profile

Actions

Bug #14648

open

Values obtained from ``sysctl`` are sometimes unexpectedly empty, leading to PHP and other math errors

Added by Steve Wheeler about 1 year ago. Updated 21 days ago.

Status:
Confirmed
Priority:
High
Assignee:
-
Category:
Operating System
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
25.01
Release Notes:
Default
Affected Version:
2.7.0
Affected Architecture:

Description

In 23.05.1:

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

The system hitting this reports those sysctls correctly;

[23.05.1-RELEASE][suika@pfSense.pfsense.lan]/home/suika: sysctl hw.physmem
hw.physmem: 8288366592
[23.05.1-RELEASE][suika@pfSense.pfsense.lan]/home/suika: sysctl hw.realmem
hw.realmem: 8589934592


Files


Related issues

Has duplicate Bug #14814: PHP erroDuplicate

Actions
Actions

Also available in: Atom PDF