Skip to content
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

Prevent duplicate closeCallback calls in case of GC ghosts #5

Merged
merged 1 commit into from
Dec 2, 2016
Merged

Prevent duplicate closeCallback calls in case of GC ghosts #5

merged 1 commit into from
Dec 2, 2016

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Dec 2, 2016

Sometimes PHP 7 GC decides to call stream_close again even after the
PHP request has ended, and even if fclose was called before already.

Note: the ghost is even so ghostly that you can't see it with a debugger.
Observed while debugging owncloud/core#22370 (comment)

Basically with the log statements from owncloud/core#26735 I can see that fclose was called and also the callback was called as well. But still, PHP somehow calls it again.

After applying this fix, this specific scenario doesn't cause errors to be logged again.

@icewind1991

Sometimes PHP 7 GC decides to call stream_close again even after the
PHP request has ended, and even if fclose was called before already.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 95.946% when pulling 668abfe on PVince81:stream_close_scare_away_ghosts into 0700f81 on icewind1991:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 95.946% when pulling 668abfe on PVince81:stream_close_scare_away_ghosts into 0700f81 on icewind1991:master.

@icewind1991
Copy link
Owner

👍 good catch finally finding the cause of this issue

@icewind1991 icewind1991 merged commit 6bfd2fd into icewind1991:master Dec 2, 2016
@PVince81
Copy link
Contributor Author

PVince81 commented Dec 2, 2016 via email

@icewind1991
Copy link
Owner

Tagged 0.5.2 with this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants