- Issue created by @primsi
- 🇧🇪Belgium dieterholvoet Brussels
We have been encountering the same bug on a bunch of sites since tonight. In our case the current MR doesn't seem to solve the issue. Our problem is that
ini_get('apc.shm_segments')
returnsFALSE
, making$shm_size === 0
which still causes aDivisionByZeroError
. - 🇨🇭Switzerland berdir Switzerland
Thanks for the feedback, so it's not mem_size that's the problem then. Doesn't make sense to me that this would return FALSE, but lets check for that, maybe default the value to 1 if not set or skip the whole thing?
- 🇧🇪Belgium dieterholvoet Brussels
Well I checked
phpinfo()
and the directive is missing. Haven't figured out how yet, I'm checking with our hosting partner, but it couldn't hurt checking for this situation. It's interesting that we're not the only one encountering this issue in the span of a couple days. - 🇧🇪Belgium dieterholvoet Brussels
Not sure if the other check is actually necessary, I'll leave that to @primsi to determine.
- 🇨🇭Switzerland berdir Switzerland
What's weird is that in our case (on platform.sh) the error went away after a redeploy and it only happened on one out of dozens of projects, so we can't reproduce it there anymore.
I've merged it for now.
With the Throwable change, even a DivisionByZeroError or another Error shouldn't break the monitoring page completely anymore, but it's useful to see a more specific reason than the error.
- 🇧🇪Belgium dieterholvoet Brussels
Found the culprit. The issue was triggered by security updates last night. There's an associated core issue: 🐛 APCu requirement for 32MB always displays since APCu 5.1.25 Active .
The apc.shm_segments ini option has been removed. Multiple SHM segments are no longer supported. (They were already not supported when using mmap, which is the default mode of operation)
I suggest we add a fallback to 1 if the ini directive is missing.
- 🇨🇭Switzerland berdir Switzerland
Makes sense, lets open an new MR then for then. I'm also fine if we just drop that segment logic completely. Worst case is we report a wrong total, I don't really care too much, never used that feature, not as long as I can remember. I think I copied this from core.
It also means that this will hit all sites eventually, maybe platform.sh rolled back the apcu version due to that and that's why redeploy fixed it.
- 🇸🇮Slovenia primsi
@dieterholvoet did you plan to work on this? Otherwise I can check this tomorrow.
- 🇧🇪Belgium dieterholvoet Brussels
dieterholvoet → changed the visibility of the branch 8.x-1.x to hidden.
-
berdir →
committed 93e446f9 on 8.x-1.x authored by
dieterholvoet →
Issue #3540744 by dieterholvoet, primsi, berdir: DivisionByZeroError in...
-
berdir →
committed 93e446f9 on 8.x-1.x authored by
dieterholvoet →