Netgate 7100 24.03-RC 50x error when modifying interfaces
-
When I try to modify/save interface changes via UI, I get 50x error.
Here are from system log:
... ... Apr 21 06:55:04 pfsim php-fpm[429]: /interfaces.php: PHP ERROR: Type: 1, File: /etc/inc/util.inc, Line: 3723, Message: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Apr 21 06:55:04 pfsim php-fpm[429]: Stack trace: Apr 21 06:55:04 pfsim php-fpm[429]: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'lan/ifcfg', Array) Apr 21 06:55:04 pfsim php-fpm[429]: #1 {main} Apr 21 06:55:04 pfsim php-fpm[429]: thrown Apr 21 06:55:04 pfsim php-fpm[429]: /interfaces.php: New alert found: PHP ERROR: Type: 1, File: /etc/inc/util.inc, Line: 3723, Message: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Apr 21 06:55:04 pfsim php-fpm[429]: Stack trace: Apr 21 06:55:04 pfsim php-fpm[429]: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'lan/ifcfg', Array) Apr 21 06:55:04 pfsim php-fpm[429]: #1 {main} Apr 21 06:55:04 pfsim php-fpm[429]: thrown
Here is from the crash report:
Crash report begins. Anonymous machine information: amd64 15.0-CURRENT FreeBSD 15.0-CURRENT #0 plus-RELENG_24_03-n256311-e71f834dd81: Tue Apr 16 00:38:18 UTC 2024 root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-24_03-main/obj/amd64/dyNDzqbt/var/jenkins/workspace/pfSense-Plus-snapshots-24_03-main/sources/FreeBS Crash report details: PHP Errors: [21-Apr-2024 04:39:37 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Stack trace: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'opt3/ifcfg', Array) #1 {main} thrown in /etc/inc/util.inc on line 3723 [21-Apr-2024 04:42:33 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Stack trace: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'opt3/ifcfg', Array) #1 {main} thrown in /etc/inc/util.inc on line 3723 [21-Apr-2024 04:42:45 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Stack trace: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'opt3/ifcfg', Array) #1 {main} thrown in /etc/inc/util.inc on line 3723 [21-Apr-2024 05:06:52 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Stack trace: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'wan/ifcfg', Array) #1 {main} thrown in /etc/inc/util.inc on line 3723 [21-Apr-2024 05:13:34 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Stack trace: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'lan/ifcfg', Array) #1 {main} thrown in /etc/inc/util.inc on line 3723 [21-Apr-2024 05:26:33 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Stack trace: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'lan/ifcfg', Array) #1 {main} thrown in /etc/inc/util.inc on line 3723 [21-Apr-2024 05:42:57 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Stack trace: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'lan/ifcfg', Array) #1 {main} thrown in /etc/inc/util.inc on line 3723 [21-Apr-2024 06:52:23 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Stack trace: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'wan/ifcfg', Array) #1 {main} thrown in /etc/inc/util.inc on line 3723 [21-Apr-2024 06:53:45 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Stack trace: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'wan/ifcfg', Array) #1 {main} thrown in /etc/inc/util.inc on line 3723 [21-Apr-2024 06:54:09 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Stack trace: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'lan/ifcfg', Array) #1 {main} thrown in /etc/inc/util.inc on line 3723 [21-Apr-2024 06:55:04 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_set_path(): Argument #1 ($arr) must be of type array, false given, called in /usr/local/www/interfaces.php on line 1781 and defined in /etc/inc/util.inc:3723 Stack trace: #0 /usr/local/www/interfaces.php(1781): array_set_path(false, 'lan/ifcfg', Array) #1 {main} thrown in /etc/inc/util.inc on line 3723 No FreeBSD crash data found.
-
Do you maybe have a file
/tmp/.interfaces.apply
which has invalid/bad content?If so, try removing that file and then making changes again.
Or maybe whatever is holding
/tmp
is full (RAM disk? dataset? disk?) -
Thanks for the reply!
The file you mentioned is only 0 byte and the /tmp is only 11% usage.The php error seems to say the function expects the first argument to be type array, but the boolean false was passed instead, triggering the TypeError.
[24.03-RC][admin@pfsim.pfsim.lan]/tmp: ls -l .i* -rw-r--r-- 1 root wheel 0 May 10 2023 .interfaces.apply [24.03-RC][admin@pfsim.pfsim.lan]/tmp: df . Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ufsid/5c33f6b9e5c16e76 27405692 2780428 22432812 11% / [24.03-RC][admin@pfsim.pfsim.lan]/tmp:
-
The
false
part should be an array read from that file (or an empty array if the file doesn't exist) so the file being there and empty/corrupt meant it ended upfalse
instead of having a proper value.Not sure how it ended up that way though, I can't replicate that here.
-
Thanks for the hint!
After I deleted that empty file /tmp/.interfaces.apply, I can edit interfaces now. The issue is resolved !
Based on the timestamp, that file seems to be there since May 10, 2023. It's a mystery to me. I guess since nobody from my team tried to edit interfaces since then, so no one encountered the error.
-
Interesting that it's been around that long and hadn't been removed/cleaned up.
The code should absolutely handle that situation better, though. I opened https://redmine.pfsense.org/issues/15423 so we can address that for the next release.