-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pfSense has detected a crash report or programming bug. #543
Comments
I get this error as well whenever I loose internet connection ... Seems its not properly catching the error when the return results are null. |
This behavior is intentional and expected in certain situations. Caches are updated by background processes that run on a schedule. Sometimes, your pfSense instance might be unable to fetch the data needed for the cache. When this happens, an error is thrown for two main reasons:
In the case of the
In both scenarios, the cache file should not be updated, and an error should be thrown to alert admins. These issues are almost always temporary and resolve themselves. It's generally safe to clear crash reports related to cache files. However, if the report keeps appearing, it indicates a recurring issue (typically network-related) that needs to be addressed. |
I too am receiving this error when network connectivity is interrupted. If I understand correctly the reason stated for the error, this is due to the package trying to call home to GitHub and check for a newer release of the package. I disagree with the behavior of throwing a crash report in the logs just because the package cannot access the GitHub API. For instance, if maintenance is being done on the firewall or anything north of its connections impacting its path to GitHub's API, there will be a crash report every time it tries to access the API. This seems a bit extreme just for a call back home to check for a version update in my opinion - especially since the check will be retried eventually anyway at a later time if it were a one-time thing. This happens quite often as we are doing intrusive maintenance fairly frequently and there is no "recurring issue [] that needs to be addressed." The crash reports also have to be manually cleared via the GUI, and can start to spam or hide actual crash reports that require attention. pfSense provides a built-in system log that, preferably, could be used instead. This is located at "Status / System Logs" under the "Packages" tab in the GUI - very easy to locate for troubleshooting issues with update checks in the future. Something simple could be printed here such as "Cannot reach GitHub API to check for latest release" without causing a pfSense crash report. |
It would be nice to have an option to completely disable this feature, cause there are firewalls that by design don't have internet access. |
The component that generates the crash report isn't the cache itself, it's the component that manages background processes. This component is used in several places across the package and in most cases having it generate crash reports is vital. Short term, I can rework this cache's logic higher up to allow for better error handling to avoid the error. There's been a todo item to rework this cache for a while now. Long term, I'd like to make caches more customizable where you can pick the refresh interval, and define how long a cache can stay stale for. For now, you can disable the automatic cache refreshes by deleting cache jobs in /etc/crontab or if you have the cron package, just delete the job in the API or UI. You can still refresh caches after using |
Many thanks for your prompt answers and solutions. |
Describe the bug
I did not use API during the weekend, but today I discovered pfsense reported a bug in the package with the following traceback. I have not tested whether any functionality has been affected:
Crash report begins. Anonymous machine information:
amd64
14.0-CURRENT
FreeBSD 14.0-CURRENT amd64 1400094 #1 RELENG_2_7_2-n255948-8d2b56da39c: Wed Dec 6 20:45:47 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-2_7_2-main/obj/amd64/StdASW5b/var/jenkins/workspace/pfSense-CE-snapshots-2_7_2-main/sources/F
Crash report details:
PHP Errors:
[25-Aug-2024 16:00:12 Europe/Moscow] PHP Fatal error: Uncaught TypeError: RESTAPI\Caches\RESTAPIVersionReleasesCache::get_data_to_cache(): Return value must be of type array, null returned in /usr/local/pkg/RESTAPI/Caches/RESTAPIVersionReleasesCache.inc:27
Stack trace:
#0 /usr/local/pkg/RESTAPI/Core/Cache.inc(68): RESTAPI\Caches\RESTAPIVersionReleasesCache->get_data_to_cache()
#1 /usr/local/pkg/RESTAPI/.resources/scripts/manage.php(179): RESTAPI\Core\Cache->process()
#2 /usr/local/pkg/RESTAPI/.resources/scripts/manage.php(434): refresh_cache('RESTAPIVersionR...')
#3 {main}
thrown in /usr/local/pkg/RESTAPI/Caches/RESTAPIVersionReleasesCache.inc on line 27
No FreeBSD crash data found.
pfSense Version & Package Version:
The text was updated successfully, but these errors were encountered: