php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78090 bug45161.phpt takes forever to finish
Submitted: 2019-05-31 11:11 UTC Modified: 2020-02-03 23:58 UTC
From: luciano at mannucci dot org Assigned: cmb (profile)
Status: Closed Package: Testing related
PHP Version: 7.3 OS: freebsd 11.2-RELEASE-p10
Private report: No CVE-ID: None
 [2019-05-31 11:11 UTC] luciano at mannucci dot org
Description:
------------
Might be a duplicate of bug #69327

This is 'make test' output:
=====================================================================
PHP         : /usr/local/src/php/php-7.2.19/sapi/cli/php 
PHP_SAPI    : cli
PHP_VERSION : 7.2.19
ZEND_VERSION: 3.2.0
PHP_OS      : FreeBSD - FreeBSD Saguaro 11.2-RELEASE-p10 FreeBSD 11.2-RELEASE-p10 #1 r348168: Fri May 24 11:58:27 CEST 2019     root@Saguaro:/usr/obj/usr/src/sys/GENERIC64 powerpc
INI actual  : /usr/local/src/php/php-7.2.19/tmp-php.ini
More .INIs  :   
---------------------------------------------------------------------
PHP         : /usr/local/src/php/php-7.2.19/sapi/phpdbg/phpdbg 
PHP_SAPI    : phpdbg
PHP_VERSION : 7.2.19
ZEND_VERSION: 3.2.0
PHP_OS      : FreeBSD - FreeBSD Saguaro 11.2-RELEASE-p10 FreeBSD 11.2-RELEASE-p10 #1 r348168: Fri May 24 11:58:27 CEST 2019     root@Saguaro:/usr/obj/usr/src/sys/GENERIC64 powerpc
INI actual  : /usr/local/src/php/php-7.2.19/tmp-php.ini
More .INIs  : 
---------------------------------------------------------------------
CWD         : /usr/local/src/php/php-7.2.19
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
[Passed omitted]
TEST 3408/14609 [ext/curl/tests/bug45161.phpt]

and stops there.


Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-02 22:52 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-02-02 22:52 UTC] cmb@php.net
What happens if you run the following script?  Are there any error
messages?  Does the script finish after some time?

<?php
$ch = curl_init();
$fp = fopen('/dev/null', 'w');
for($i = 0; $i < 3; $i++) {
    curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1:9/');
    curl_setopt($ch, CURLOPT_FILE, $fp);
    curl_setopt($ch, CURLOPT_VERBOSE, true);
    curl_exec($ch);
}
?>
 [2020-02-03 09:58 UTC] luciano at mannucci dot org
This is what I get:

root@Saguaro:/tmp # /opt/php72/bin/php
php*        php-cgi*    php-config* phpdbg*     phpize*     
root@Saguaro:/tmp # /opt/php72/bin/php !$
/opt/php72/bin/php test_script.php
* STATE: INIT => CONNECT handle 0x53113000; line 1605 (connection #-5000)
* Added connection 0. The cache now contains 1 members
*   Trying 127.0.0.1:9...
* TCP_NODELAY set
* STATE: CONNECT => WAITCONNECT handle 0x53113000; line 1661 (connection #0)
* connect to 127.0.0.1 port 9 failed: Operation timed out
* Failed to connect to 127.0.0.1 port 9: Operation timed out
* multi_done
* Closing connection 0
* The cache now contains 0 members
* STATE: INIT => CONNECT handle 0x53113000; line 1605 (connection #-5000)
* Added connection 1. The cache now contains 1 members
* Hostname 127.0.0.1 was found in DNS cache
*   Trying 127.0.0.1:9...
* TCP_NODELAY set
* STATE: CONNECT => WAITCONNECT handle 0x53113000; line 1661 (connection #1)
* connect to 127.0.0.1 port 9 failed: Operation timed out
* Failed to connect to 127.0.0.1 port 9: Operation timed out
* multi_done
* Closing connection 1
* The cache now contains 0 members
* STATE: INIT => CONNECT handle 0x53113000; line 1605 (connection #-5000)
* Added connection 2. The cache now contains 1 members
*   Trying 127.0.0.1:9...
* TCP_NODELAY set
* STATE: CONNECT => WAITCONNECT handle 0x53113000; line 1661 (connection #2)
* connect to 127.0.0.1 port 9 failed: Operation timed out
* Failed to connect to 127.0.0.1 port 9: Operation timed out
* multi_done
* Closing connection 2
* The cache now contains 0 members
root@Saguaro:/tmp # 

My php is now:

root@Saguaro:/tmp # /opt/php72/bin/php --version
PHP 7.2.27 (cli) (built: Jan 23 2020 19:30:35) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Which shows the very same behaviour of its predecessor.
 [2020-02-03 10:50 UTC] cmb@php.net
-Status: Feedback +Status: Verified -PHP Version: 7.2.19 +PHP Version: 7.3
 [2020-02-03 10:50 UTC] cmb@php.net
Thanks for the fast reply!

While active support for PHP 7.2 has ended a while ago[1], this
doesn't appear related to the PHP version at all, but rather to

    Failed to connect to 127.0.0.1 port 9: Operation timed out

Apparently, your system does not support the discard protocol[2],
so the test should be skipped.

[1] <https://www.php.net/supported-versions.php>
[2] <https://tools.ietf.org/html/rfc863>
 [2020-02-03 10:51 UTC] cmb@php.net
The following pull request has been associated:

Patch Name: Fix #78090: test 3408/14609 of make test takes forever to finish
On GitHub:  https://github.com/php/php-src/pull/5146
Patch:      https://github.com/php/php-src/pull/5146.patch
 [2020-02-03 11:43 UTC] luciano at mannucci dot org
Yes I can confirm that I get the very same result with

PHP 7.3.14 (cli) (built: Jan 24 2020 13:26:08) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.14, Copyright (c) 1998-2018 Zend Technologies

and

PHP 7.4.2 (cli) (built: Jan 24 2020 16:08:23) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
 [2020-02-03 12:20 UTC] cmb@php.net
-Status: Verified +Status: Feedback
 [2020-02-03 12:20 UTC] cmb@php.net
Thanks for testing with the newer PHP versions!

Could you please run the following script, and post its output
here?  I expect that to print int(28), but would like to have that
confirmed.

<?php
$ch = curl_init('http://127.0.0.1:9/');
curl_exec($ch);
var_dump(curl_error());
?>
 [2020-02-03 23:56 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=079905acd536e772241def9ad098d16f45ef37d8
Log: Fix #78090: bug45161.phpt takes forever to finish
 [2020-02-03 23:56 UTC] cmb@php.net
-Status: Feedback +Status: Closed
 [2020-02-03 23:58 UTC] cmb@php.net
-Summary: test 3408/14609 of make test takes forever to finish +Summary: bug45161.phpt takes forever to finish
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC