If a strong reference is acquired but not freed and the Weakref instance is destroyed, an exception is thrown during shutdown (Failed to correctly release...) The Weakref instance is in an inconsistent state: valid is 0 but acquired is > 0.
This causes PHP not to clean up after the request correctly
The next request (FPM SAPI) errors out with a cryptic error message as some of the state from the previous request hasn't been cleaned up
Eventually the FPM child process dies (SIGSEGV)
I've patched the destructor to release any strong references before setting valid to 0. This seems to fix the issue, though there might be something I'm missing.
This is a pull request for bug 69131
valid
is 0 butacquired
is > 0.I've patched the destructor to release any strong references before setting
valid
to 0. This seems to fix the issue, though there might be something I'm missing.