Edit report at https://bugs.php.net/bug.php?id=68853&edit=1
ID: 68853
Comment by: boen dot robot at gmail dot com
Reported by: boen dot robot at gmail dot com
Summary: stream_select on a TLS stream does not report last
chunk as readable
Status: Assigned
Type: Bug
Package: OpenSSL related
Operating System: Windows 2008 R2
PHP Version: 5.6.4
Assigned To: rdlowrey
Block user comment: N
Private report: N
New Comment:
In an attempt to more accurately pinpoint the new issue (summarized in bug #65137), I found this one
isn't fully solved. The goal post has simply moved further away.
If you try to echo large data... say 1048576 bytes (1MB), somewhere around 0.5MB (exact byte is
different every time), the client starts emitting warnings about supposedly retrying to send the
data, while the server just hangs. Same with even larger pieces of data, like 3MB, so this is not
exactly "last chunk".
On the other hand, an unencrypted connection outputs notices about similar failure (as expected;
this is known and documented; That's why even this minimalistic code has retries as part of
it)... But ultimately delivers all data, and the server thus never even freezes, let alone hang.
(Sure, it takes a while to finish the test, with 1 byte at a time being read... My original project
reads more at once, but I wanted to minimize potential "side" issues here)
Previous Comments:
------------------------------------------------------------------------
[2015-03-08 06:57:01] boen dot robot at gmail dot com
Related To: Bug #65137
------------------------------------------------------------------------
[2015-03-08 06:38:59] rdlowrey@php.net
Awesome. I may be able to hassle Ferenc to cherry-pick the fix into the 5.6.7 release even though it
has already been tagged and branched. If not, it will be present in 5.6.8. I'll update this
report with the version number once the question is resolved and I can close this issue.
Thanks again for your *unending patience* with this bug. I've been working hard to address and
close openssl issues. If you have future openssl-related problems they will hopefully be handled
much quicker than this one was.
------------------------------------------------------------------------
[2015-03-08 06:25:09] boen dot robot at gmail dot com
I can confirm that the latest 5.6.8 snapshot fixes this issue.
Thank you.
------------------------------------------------------------------------
[2015-03-06 17:35:40] rdlowrey@php.net
Related To: Bug #65137
------------------------------------------------------------------------
[2015-03-06 01:02:51] rdlowrey@php.net
I have cherry-picked @DaveRandom's original SSL_pending() solution back into 5.6 and master.
I'm fairly certain this commit solves the problem fully. It was unfortunately reverted due to
its close proximity to some other buggy shenanigans.
This change will *not* appear in the forthcoming 5.6.7 release so that we have time to test, get
feedback and verify that it works everywhere. If you're interested in this bug's
resolution please build the current PHP-5.6 or master branch to verify that the issue is resolved.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=68853
--
Edit this bug report at https://bugs.php.net/bug.php?id=68853&edit=1