-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Entering shutdown sequence with a fiber suspended in a Generator emits an unavoidable fatal error or crashes #9916
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
Comments
I am wondering whether it fundamentally makes sense to enforce some ordering of destruction order: first all fibers are destructed, then all other objects. An alternative fix approach could be delaying running the destruction of generators which are marked as currently running. |
According to https://3v4l.org/DDlsM, this affects PHP 8.1+. |
@bwoebi You mentioned this does not affect debug builds in the linked issue, why is that? |
@trowski The bug also does affect debug builds, but possibly by chance something was slightly different (e.g. order in object store, I don't know) in debug build. |
This test has failed for 8.1.17RC1 and 8.2.4RC1 on ppc64le #10512 (comment) |
Description
The following code:
Resulted in this output (in Unknown on line 0 is also very helpful to track the issue down...):
But I expected this output instead:
It seems necessary to add some ordering constraint within the interaction of fibers and generators. (Swapping the creation of the generator and the fiber in this example poses no problems.)
Similarly there is a crash in a slight variation of this code (without finally):
Resulting in:
PHP Version
master
Operating System
No response
The text was updated successfully, but these errors were encountered: