Bug #65137 [Com]: stream_select misleads when TLS socket is used

From: Date: Fri, 15 May 2015 08:52:04 +0000
Subject: Bug #65137 [Com]: stream_select misleads when TLS socket is used
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192670@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65137&edit=1

 ID:                 65137
 Comment by:         edhelas at movim dot eu
 Reported by:        boen dot robot at gmail dot com
 Summary:            stream_select misleads when TLS socket is used
 Status:             Closed
 Type:               Bug
 Package:            Streams related
 Operating System:   Windows Server 2008 R2
 PHP Version:        5.5.0
 Assigned To:        rdlowrey
 Block user comment: N
 Private report:     N

 New Comment:

I still experience this issue that occurs when big chunk of data are received on the socket (and
that are bigger than the defined buffer).

PHP-Version : 5.6.8+dfsg-1
OS : Debian Testing


Previous Comments:
------------------------------------------------------------------------
[2015-03-11 15:51:51] rdlowrey@php.net

@arjen The blocking behavior inside stream_select() should be corrected now in upstream 5.5, 5.6 and
master. Closing again ... let me know if you observe further issues.

------------------------------------------------------------------------
[2015-03-11 14:13:03] rdlowrey@php.net

This bug is driving me nuts -- the inherently blocking nature of the existing implementation makes
this difficult to address without rewriting *a lot* of code. Thanks arjen ... Working on it ...

------------------------------------------------------------------------
[2015-03-11 12:35:53] arjen at react dot com

This patch triggers this bug again: https://bugs.php.net/bug.php?id=67965

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

Related To: Bug #68853

------------------------------------------------------------------------
[2015-03-08 06:56:59] boen dot robot at gmail dot com

The snapshot build seems to have fixed the original issue I was encountering, but it seems it might
have created a new one... Or maybe this one existed already, and I just hadn't managed witness
it before.

Again only on an encrypted connection... If the server waits for more than default_socket_timeout
before starting to receiving data, while in the mean time the client does a stream_select() with the
connection in $w (i.e. it waits for the server to be ready to receive... supposedly), and $tv_sec
being NULL, stream_select() just hangs at the client, and thus no sending is ever done.

Though for some reason, I can't duplicate it by modifying the echo client/server pair from bug
#68853 accordingly... Feel free to close this particular issue. I'll create a new one if I can
produce a more reliable test case than my current (somewhat large) original code that exhibits this
new issue.

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


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=65137


--
Edit this bug report at https://bugs.php.net/bug.php?id=65137&edit=1


Thread (19 messages)

« previous php.bugs (#192670) next »