Bug #78345 [Opn->Ver]: OpenSSL tests using workers fail due to missing openssl ext in worker process
| From: | cmb@php.net | Date: | Mon, 29 Jul 2019 09:50:45 +0000 |
| Subject: | Bug #78345 [Opn->Ver]: OpenSSL tests using workers fail due to missing openssl ext in worker process | ||
| References: | 1 | Groups: | php.bugs php.qa |
| Request: | Send a blank email to php-bugs+get-221977@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78345&edit=1
ID: 78345
Updated by: cmb@php.net
Reported by: rainer dot jung at kippdata dot de
Summary: OpenSSL tests using workers fail due to missing
openssl ext in worker process
-Status: Open
+Status: Verified
Type: Bug
Package: Testing related
Operating System: Linux x86_64, Solaris 10 Sparc
PHP Version: 7.4.0beta1
Block user comment: N
Private report: N
New Comment:
This issue has been basically resolved for Windows with commit
10a2cee[1]. Using TEST_PHP_EXTRA_ARGS might be more correct and
portable.
This ticket looks like a duplicate of bug #68230.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=10a2ceef3bfada85e7046231476d06f08d3de69c>
Previous Comments:
------------------------------------------------------------------------
[2019-07-29 09:08:33] rainer dot jung at kippdata dot de
Description:
------------
Several OpenSSL extension tests fork a new process executing various server tasks. This new process
is created as another PHP process, but without any explicit ini or extension loading - at least on
Linux/Unix. In our case the OpenSSl extension must be dynamically loaded and there is not implicit
php.ini that PHP would automatically load. Thus the new server worker fails and as a result the
tests fail.
This is true for the following tests (based on 7.0beta1, but mostly the same holds true for current
7.3 and 7.2):
- ext/openssl/tests/bug65729.phpt
- ext/openssl/tests/bug68265.phpt
- ext/openssl/tests/bug68879.phpt
- ext/openssl/tests/bug68920.phpt
- ext/openssl/tests/bug69215.phpt
- ext/openssl/tests/bug76705.phpt
- ext/openssl/tests/san_peer_matching.phpt
- ext/openssl/tests/sni_server.phpt
- ext/openssl/tests/sni_server_key_cert.phpt
- ext/openssl/tests/streams_crypto_method.phpt
- ext/openssl/tests/tls_min_v1.0_max_v1.1_wrapper.phpt
- ext/openssl/tests/tls_wrapper.phpt
- ext/openssl/tests/tls_wrapper_with_tls_v1.3.phpt
- ext/openssl/tests/tlsv1.0_wrapper.phpt
- ext/openssl/tests/tlsv1.1_wrapper.phpt
- ext/openssl/tests/tlsv1.2_wrapper.phpt
- ext/openssl/tests/tlsv1.3_wrapper.phpt
I don't have a good patch for it. As soon as I add a default php.ini which loads the openssl
extension, everything is fine. I also verified that the failure is due to the missing openssl
extension in the worker by running tests under strace and watching the server warnings that are
swallowed by the child. As a workaround I used the following patch, but it should be conditional on
whether openssl is a static or shared extension. I don't know, how Windows behaves.
Index: ext/openssl/tests/ServerClientTestCase.inc
--- ext/openssl/tests/ServerClientTestCase.inc 2019-07-26 02:13:34.988151000 +0000
+++ ext/openssl/tests/ServerClientTestCase.inc 2019-07-28 23:01:28.525371000 +0000
@@ -72,7 +72,7 @@
);
} else {
$cmd = sprintf(
- '%s "%s" %s %s',
+ '%s -d extension=openssl "%s" %s %s',
PHP_BINARY,
__FILE__,
WORKER_ARGV_VALUE,
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78345&edit=1