php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76879 test openssl/tests/stream_server_reneg_limit consumes 20G of RAM
Submitted: 2018-09-13 21:15 UTC Modified: 2021-08-13 12:48 UTC
From: public at grik dot net Assigned: cmb (profile)
Status: Closed Package: OpenSSL related
PHP Version: 7.3.0RC1 OS: Windows Subsystem for Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
23 + 5 = ?
Subscribe to this entry?

 
 [2018-09-13 21:15 UTC] public at grik dot net
Description:
------------
I built php with generic options 
./configure --prefix=/usr/local --with-openssl
rinning 'make test' leads to consuming 4 CPU cores and all available RAM



Test script:
---------------
./configure --prefix=/usr/local --with-openssl
make
make test
 ...
PASS openssl_x509_read() tests [ext/openssl/tests/openssl_x509_read_basic.phpt]
FAIL Peer verification enabled for client streams [ext/openssl/tests/peer_verification.phpt]
FAIL Peer verification matches SAN names [ext/openssl/tests/san_peer_matching.phpt]
FAIL Capture SSL session meta array in stream context [ext/openssl/tests/session_meta_capture.phpt]
FAIL sni_server [ext/openssl/tests/sni_server.phpt]
FAIL sni_server with separate pk and cert [ext/openssl/tests/sni_server_key_cert.phpt]
FAIL Basic bitwise stream crypto context flag assignment [ext/openssl/tests/stream_crypto_flags_001.phpt]
FAIL TLSv1.1 and TLSv1.2 bitwise stream crypto flag assignment [ext/openssl/tests/stream_crypto_flags_002.phpt]
FAIL Server bitwise stream crypto flag assignment [ext/openssl/tests/stream_crypto_flags_003.phpt]
FAIL Specific protocol method specification [ext/openssl/tests/stream_crypto_flags_004.phpt]
SKIP security_level setting to prohibit cert [ext/openssl/tests/stream_security_level.phpt] reason: OpenSSL >= v1.1.0 required
TEST 6242/13313 [ext/openssl/tests/stream_server_reneg_limit.phpt]


Now I have to cancel with Ctrl-C 

Actual result:
--------------
~$ top
top - 00:10:05 up  1:59,  0 users,  load average: 0.52, 0.58, 0.59
Tasks:  15 total,   5 running,  10 sleeping,   0 stopped,   0 zombie
%Cpu(s): 30.3 us, 21.7 sy,  0.0 ni, 47.8 id,  0.0 wa,  0.2 hi,  0.0 si,  0.0 st
KiB Mem : 16717488 total,   417976 free, 16063036 used,   236476 buff/cache
KiB Swap: 50331648 total, 50035316 free,   296332 used.   513596 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
25826 gri       20   0   86748   5252   4048 R 100.0  0.0  21:29.55 php
 9037 gri       20   0   86812   6108   5880 R 100.0  0.0   9:44.01 php
25177 gri       20   0   86748   5376   4128 R  99.7  0.0  24:50.79 php
24958 gri       20   0 22.154g 0.013t    332 R  90.3 84.1  10:55.90 php


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-14 11:49 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2018-09-14 11:49 UTC] cmb@php.net
I can't reproduce this on WSL running Debian 9.5.  However, the
earlier tests also pass for me.  Please provide the .diff files of
the reported failing tests.
 [2018-09-30 10:45 UTC] cmb@php.net
-Status: Feedback +Status: No Feedback
 [2018-09-30 10:45 UTC] cmb@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2018-09-30 16:21 UTC] public at grik dot net
-Status: No Feedback +Status: Closed
 [2018-09-30 16:21 UTC] public at grik dot net
I was afk for a conference. Where can I find .diff files?

it writes "You aren't allowed to change a bug to that state." for a "reopened"
 [2018-09-30 16:29 UTC] cmb@php.net
-Status: Closed +Status: Feedback
 [2018-09-30 16:29 UTC] cmb@php.net
> Where can I find .diff files?

Right besides the respective .phpt files.
 [2018-09-30 17:20 UTC] public at grik dot net
-Status: Feedback +Status: Assigned
 [2018-09-30 17:20 UTC] public at grik dot net
OK, in all files it's
stream_socket_client(): unable to connect to ssl://127.0.0.1:64321 

E.g.

003+
004+ Warning: stream_socket_client(): unable to connect to ssl://127.0.0.1:64321 (Connection timed out) in /usr/src/php-7.3.0RC1/ext/openssl/tests/ServerClientTestCase.inc(96) : eval()'d code on line 21
 [2018-09-30 18:08 UTC] cmb@php.net
-Status: Assigned +Status: Feedback
 [2018-09-30 18:08 UTC] cmb@php.net
Thanks!  What's the value of OPENSSL_VERSION_TEXT and
OPENSSL_VERSION_NUMBER?
 [2018-09-30 20:54 UTC] public at grik dot net
-Status: Feedback +Status: Assigned
 [2018-09-30 20:54 UTC] public at grik dot net
$ php -r "echo OPENSSL_VERSION_TEXT;"
OpenSSL 1.0.2g  1 Mar 2016
$ php -r "echo OPENSSL_VERSION_NUMBER;"
268443775
 [2018-10-01 13:13 UTC] cmb@php.net
-Assigned To: cmb +Assigned To: daverandom
 [2018-10-01 13:13 UTC] cmb@php.net
Thanks!  The OpenSSL version *might* be the problem, but since a
while we're running our Travis CI on Xenial which, I believe, has
also 1.0.2g.  However, the tests are slow[1], which may cause the
timeout for you.  Chris, since you've introduced the new
server/client test harness[2], do you have an idea?

Also, the new reneg_* options[3] that are available as PHP 5.6.0
are not yet documented (not even in the migration guide).

[1] <https://travis-ci.org/php/php-src/jobs/435562515#L3199>
[2] <http://git.php.net/?p=php-src.git;a=commit;h=d6fb7b8f2eebc3a8c2ecde8838eda9d52bc25d4f>
[3] <https://github.com/php/php-src/blob/PHP-5.6.38/UPGRADING#L126-L132>
 [2021-08-13 11:46 UTC] cmb@php.net
-Status: Assigned +Status: Feedback -Assigned To: daverandom +Assigned To: cmb
 [2021-08-13 11:46 UTC] cmb@php.net
Is this still an issue for you with any of the actively supported
PHP versions[1]?  I would expect that OpenSSL 1.0 is no longer in
use.

[1] <https://www.php.net/supported-versions.php>
 [2021-08-13 12:18 UTC] public at grik dot net
-Status: Feedback +Status: Assigned
 [2021-08-13 12:18 UTC] public at grik dot net
Actually, no, it's not an issue after 3 years, I am not even sure if it worth to check it out.
 [2021-08-13 12:48 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2021-08-13 12:48 UTC] cmb@php.net
Okay, I'm closing this ticket then.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 19:01:31 2024 UTC