Bug #9851
closedPHP error in logs
100%
Description
Hello,
After upgrading to 2.5.0-DEVELOPMENT (amd64) built on Mon Oct 21 20:52:27 EDT 2019 I get the following warning on the dashboard:
pfSense has detected a crash report or programming bug. Click here for more information.
I've attached the log file.
Files
Updated by Jim Pingle about 5 years ago
- Category set to Gateway Monitoring
- Assignee set to Jim Pingle
- Target version set to 2.5.0
I've seen that happen before. Looks like a race condition of some sort since there is a test just before that checking for the file, and touch should create a file if it doesn't already exist. I've never seen a problem come from it, just the error, so it's just something we can suppress.
Updated by Jim Pingle about 5 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 83794361b7135aaef4e47b35bd27df7da6ce023c.
Updated by Nano Caiordo about 5 years ago
It might be a permission issue, php docs about file_exists() states:
"The check is done using the real UID/GID instead of the effective one."but the file is probably created using the "effective one". Would the more appropriate is_file() be a workaround to skip the permission issue?
Updated by Jim Pingle about 5 years ago
If that were the case it would happen to everyone all the time, which isn't true. Also the order of operations is backwards compared to your theory. In the code, the file tested to see if it does not exist before it is touched -- touching a file that doesn't exist will create a new/empty file, and if the file exists it updates the time. Which is why it sounds more like a race condition where several processes have been triggered at once, and the file is somehow removed while touch()
is in the middle of working on it.
Updated by Nano Caiordo about 5 years ago
I gave a look at PHP source code and I have a doubt, what is the gateway name?
Updated by Florin Samareanu about 5 years ago
Upgraded and the error is gone. Thank you.
Updated by Renato Botelho about 5 years ago
- Status changed from Feedback to Resolved
Updated by Jim Pingle about 5 years ago
- Target version changed from 2.5.0 to 2.4.5
Updated by Jim Pingle about 5 years ago
- Status changed from Resolved to Feedback
Needs checked and/or tested again on 2.4.5 snapshots
Updated by Jim Pingle about 5 years ago
- Status changed from Feedback to Resolved
No sign of this error during upgrade or any time after on multiple 2.4.5 systems.