23.01-RELEASE on 6100 MAX fatal crash
-
Did a clean install of 23.01 without any issues. One day later I did change the DNS servers in DHCP server for an interface and got that in browser after hitting apply:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/system.inc:422 Stack trace: #0 /etc/inc/system.inc(520): system_hosts_dhcpd_entries() #1 /etc/inc/system.inc(551): system_hosts_entries(Array) #2 /etc/inc/services.inc(2772): system_hosts_generate() #3 /usr/local/www/services_dhcp.php(788): services_unbound_configure() #4 {main} thrown in /etc/inc/system.inc on line 422 PHP ERROR: Type: 1, File: /etc/inc/system.inc, Line: 422, Message: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/system.inc:422 Stack trace: #0 /etc/inc/system.inc(520): system_hosts_dhcpd_entries() #1 /etc/inc/system.inc(551): system_hosts_entries(Array) #2 /etc/inc/services.inc(2772): system_hosts_generate() #3 /usr/local/www/services_dhcp.php(788): services_unbound_configure() #4 {main} thrown
Going back to dashboard worked. Checking services I saw that unbound was stopped. I can't start it anymore. Trying to reach "Services/DHCP Server" resolves in only showing those lines:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:140 Stack trace: #0 {main} thrown in /usr/local/www/services_dhcp.php on line 140 PHP ERROR: Type: 1, File: /usr/local/www/services_dhcp.php, Line: 140, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:140 Stack trace: #0 {main} thrown
After that I saw a crash report:
[18-Feb-2023 11:59:53 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/system.inc:422 Stack trace: #0 /etc/inc/system.inc(520): system_hosts_dhcpd_entries() #1 /etc/inc/system.inc(551): system_hosts_entries(Array) #2 /etc/inc/services.inc(2772): system_hosts_generate() #3 /usr/local/www/services_dhcp.php(788): services_unbound_configure() #4 {main} thrown in /etc/inc/system.inc on line 422 [18-Feb-2023 12:00:01 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/system.inc:422 Stack trace: #0 /etc/inc/system.inc(520): system_hosts_dhcpd_entries() #1 /etc/inc/system.inc(551): system_hosts_entries(Array) #2 /etc/inc/services.inc(2772): system_hosts_generate() #3 /etc/inc/service-utils.inc(730): services_unbound_configure() #4 /usr/local/pkg/servicewatchdog.inc(107): service_control_start('unbound', Array) #5 /usr/local/pkg/servicewatchdog_cron.php(30): servicewatchdog_check_services() #6 {main} thrown in /etc/inc/system.inc on line 422 [18-Feb-2023 12:00:12 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:140 Stack trace: #0 {main} thrown in /usr/local/www/services_dhcp.php on line 140 [18-Feb-2023 12:00:35 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:140 Stack trace: #0 {main} thrown in /usr/local/www/services_dhcp.php on line 140 [18-Feb-2023 12:01:01 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/system.inc:422 Stack trace: #0 /etc/inc/system.inc(520): system_hosts_dhcpd_entries() #1 /etc/inc/system.inc(551): system_hosts_entries(Array) #2 /etc/inc/services.inc(2772): system_hosts_generate() #3 /etc/inc/service-utils.inc(730): services_unbound_configure() #4 /usr/local/pkg/servicewatchdog.inc(107): service_control_start('unbound', Array) #5 /usr/local/pkg/servicewatchdog_cron.php(30): servicewatchdog_check_services() #6 {main} thrown in /etc/inc/system.inc on line 422
Last hope was a reboot. Unfortunately this came up while booting:
Setting timezone...done. Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/system.inc:422 Stack trace: #0 /etc/inc/system.inc(520): system_hosts_dhcpd_entries() #1 /etc/inc/system.inc(551): system_hosts_entries(Array) #2 /etc/rc.bootup(195): system_hosts_generate() #3 {main} thrown in /etc/inc/system.inc on line 422 PHP ERROR: Type: 1, File: /etc/inc/system.inc, Line: 422, Message: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/system.inc:422 Stack trace: #0 /etc/inc/system.inc(520): system_hosts_dhcpd_entries() #1 /etc/inc/system.inc(551): system_hosts_entries(Array) #2 /etc/rc.bootup(195): system_hosts_generate() #3 {main} thrownStarting CRON... done.
The firewall booted up but nothing worked. No DHCP, no DNS. I even can't reach WebUI.
Only way to fixing this was to revert the config from day before. After reboot everything was fine again. -
-
-
I can reproduce this by just hitting "save" on the DHCP server tab for an interface.
After hitting save the webbrowser only show these lines:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/system.inc:422 Stack trace: #0 /etc/inc/system.inc(520): system_hosts_dhcpd_entries() #1 /etc/inc/system.inc(551): system_hosts_entries(Array) #2 /etc/inc/services.inc(2772): system_hosts_generate() #3 /usr/local/www/services_dhcp.php(788): services_unbound_configure() #4 {main} thrown in /etc/inc/system.inc on line 422 PHP ERROR: Type: 1, File: /etc/inc/system.inc, Line: 422, Message: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/system.inc:422 Stack trace: #0 /etc/inc/system.inc(520): system_hosts_dhcpd_entries() #1 /etc/inc/system.inc(551): system_hosts_entries(Array) #2 /etc/inc/services.inc(2772): system_hosts_generate() #3 /usr/local/www/services_dhcp.php(788): services_unbound_configure() #4 {main} thrown
Trying to get back to the DHCP server page doesn't work anymore. The WebGUI only shows:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:140 Stack trace: #0 {main} thrown in /usr/local/www/services_dhcp.php on line 140 PHP ERROR: Type: 1, File: /usr/local/www/services_dhcp.php, Line: 140, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:140 Stack trace: #0 {main} thrown
-
Doing another clean install and uploading my config resolves in another crash.
[18-Feb-2023 14:12:14 Europe/Berlin] PHP Fatal error: Uncaught TypeError: sort(): Argument #1 ($array) must be of type array, null given in /usr/local/www/pfblockerng/pfblockerng.php:1980 Stack trace: #0 /usr/local/www/pfblockerng/pfblockerng.php(1980): sort(NULL, 2) #1 /usr/local/pkg/pfblockerng/pfblockerng_install.inc(40): pfblockerng_get_countries() #2 /etc/inc/pkg-utils.inc(781) : eval()'d code(1): include_once('/usr/local/pkg/...') #3 /etc/inc/pkg-utils.inc(781): eval() #4 /etc/inc/pkg-utils.inc(899): eval_once('include_once('/...') #5 /etc/rc.packages(76): install_package_xml('pfBlockerNG') #6 {main} thrown in /usr/local/www/pfblockerng/pfblockerng.php on line 1980
Also the PHP fatal error stays the same when hitting save on DHCP Server tab.
Going back to 22.05 seems to be the only solution.
-
Do you also have DNS servers defined on that interface? Any other non-default config in the DHCP setup?
-
@stephenw10 No, nothing special. I figured out that by reassigning the same IP address via console to any interface that is using the DHCP Server the issue is gone. After that I can edit the interfaces via WebGUI. I think it's related to something in the config backup that is not compatible with PHP8.1.
-
Yeah it must be something in (or missing from) the existing config you're hitting. I can't replicate it here.
-
For reference, the pfBlockerNG issue is fixed - currently waiting on the new version to be available. The DHCP GUI issue will also be fixed - track the issue here.