Bug #68853 [Opn->Csd]: stream_select on a TLS stream does not report last chunk as readable

From: Date: Mon, 13 Nov 2017 14:22:33 +0000
Subject: Bug #68853 [Opn->Csd]: stream_select on a TLS stream does not report last chunk as readable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212573@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68853&edit=1

 ID:                 68853
 Updated by:         bukka@php.net
 Reported by:        boen dot robot at gmail dot com
 Summary:            stream_select on a TLS stream does not report last
                     chunk as readable
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            OpenSSL related
 Operating System:   Windows 2008 R2
 PHP Version:        5.6.4
-Assigned To:        
+Assigned To:        bukka
 Block user comment: N
 Private report:     N

 New Comment:

Yep the large data write was addressed by #72333. It's also not related to this one which has
been confirmed as fixed so I'm closing it.


Previous Comments:
------------------------------------------------------------------------
[2017-11-13 10:40:53] kelunik@php.net

I think this one has been resolved for stream_select, no? The large write issue has
been addressed in #72333.

At one point we probably have to rewrite the OpenSSL layer to properly work with non-blocking
streams.

See also https://github.com/amphp/artax/issues/138 +  https://github.com/amphp/byte-stream/commit/d60ba033c41d3329419575f2fbb02230855c258e

------------------------------------------------------------------------
[2015-04-11 22:23:36] nathan dot renniewaldock at gmail dot com

I'm possibly getting the same issue in 5.6.7 on Linux. I've written an IRC bot, but when I
use stream_select() it never counts the most recent line as readable, it's always one line
behind.

------------------------------------------------------------------------
[2015-03-17 16:22:54] rdlowrey@php.net

Will keep working on it. I've been busy tidying up generator things for the php7 feature freeze
lately but this is definitely still on the radar.

------------------------------------------------------------------------
[2015-03-17 12:02:07] boen dot robot at gmail dot com

Just FYI...

The latest commits about bug 67965 do NOT help with the "half megabyte issue" in my
previous comment. I've tried the rf040b48 snapshot.

(I thought that maybe they would, but alas...)

------------------------------------------------------------------------
[2015-03-08 07:52:30] boen dot robot at gmail dot com

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)

------------------------------------------------------------------------


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


Thread (11 messages)

« previous php.bugs (#212573) next »