Project

General

Profile

Bug #9851

PHP error in logs

Added by Florin Samareanu 5 months ago. Updated 4 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Gateway Monitoring
Target version:
Start date:
10/27/2019
Due date:
% Done:

100%

Estimated time:
Affected Version:
Affected Architecture:

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.

PHP_errors.log (262 Bytes) PHP_errors.log Florin Samareanu, 10/27/2019 02:21 AM

Associated revisions

Revision 83794361 (diff)
Added by Jim Pingle 5 months ago

Suppress errors from touch when marking GW down. Fixes #9851

Revision 88677f87 (diff)
Added by Jim Pingle 5 months ago

Suppress errors from touch when marking GW down. Fixes #9851

(cherry picked from commit 83794361b7135aaef4e47b35bd27df7da6ce023c)

History

#1 Updated by Jim Pingle 5 months 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.

#2 Updated by Jim Pingle 5 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#3 Updated by Nano Caiordo 5 months 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?

#4 Updated by Jim Pingle 5 months 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.

#5 Updated by Nano Caiordo 5 months ago

I gave a look at PHP source code and I have a doubt, what is the gateway name?

#6 Updated by Florin Samareanu 5 months ago

Upgraded and the error is gone. Thank you.

#7 Updated by Renato Botelho 5 months ago

  • Status changed from Feedback to Resolved

#8 Updated by Jim Pingle 4 months ago

  • Target version changed from 2.5.0 to 2.4.5

#9 Updated by Jim Pingle 4 months ago

  • Status changed from Resolved to Feedback

Needs checked and/or tested again on 2.4.5 snapshots

#10 Updated by Jim Pingle 4 months ago

  • Status changed from Feedback to Resolved

No sign of this error during upgrade or any time after on multiple 2.4.5 systems.

Also available in: Atom PDF