php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60260 Test ext/sockets/socket_sentto_recvfrom_unix hangs and cannot be killed
Submitted: 2011-11-11 11:10 UTC Modified: -
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: m4rw3r at gmail dot com Assigned:
Status: Open Package: Sockets related
PHP Version: 5.4.0RC1 OS: Darwin Kernel Version 10.8.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: m4rw3r at gmail dot com
New email:
PHP Version: OS:

 

 [2011-11-11 11:10 UTC] m4rw3r at gmail dot com
Description:
------------
During the make test the test ext/sockets/socket_sentto_recvfrom_unix hangs right after the third warning (all three are expected). It cannot be killed by either the Activity Monitor or sudo kill -9, instead the system has to be restarted to remove these php processes from the output of ps -A.

I have attempted to run it with GDB, but that also results in a hang. From adding output to the test itself, I can conclude that the error is caused by the call to socket_sendto($socket, $msg, $len, 0, $address) at line 19 of the test file (php line).

Configure line used:

./configure --disable-short-tags --enable-bcmath --enable-calendar --enable-cli --enable-exif --enable-ftp --enable-fpm --enable-gd-native-ttf --enable-inline-optimization --enable-mbregex --enable-mbstring --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-zip --infodir=/usr/share/info --mandir=/usr/share/man --prefix=/usr --sysconfdir=/private/etc --with-bz2=/opt/local --with-config-file-path=/etc --with-curl=/opt/local --with-gd --with-iconv=/opt/local --with-jpeg-dir=/opt/local --with-kerberos=/opt/local --with-ldap-sasl=/opt/local --with-ldap=/opt/local --with-libxml-dir=/opt/local --with-mcrypt --with-mysql-sock=/var/mysql/mysql.sock --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-openssl=/opt/local --with-pcre-regex=/opt/local --with-pdo-mysql=mysqlnd --with-png-dir=/opt/local --with-xmlrpc --with-xsl=/opt/local --with-zlib=/opt/local

I also use MacPorts to maintain all the stuff installed in /opt/local

Test script:
---------------
ext/sockets/tests/socket_sentto_recvfrom_unix.phpt

Expected result:
----------------
Warning: socket_create(): Unable to create socket [%d]: Protocol not supported in %s on line %d

Warning: socket_recvfrom(): unable to recvfrom [%d]: Resource temporarily unavailable in %s on line %d

Warning: socket_sendto() expects at least 5 parameters, 4 given in %s on line %d
bool(false)
Received Ping!

Actual result:
--------------
Warning: socket_create(): Unable to create socket [43]: Protocol not supported in /Users/m4rw3r/Downloads/php-5.4.0RC1/php-5.4.0RC1/ext/sockets/tests/socket_sentto_recvfrom_unix.php on line 2

Warning: socket_recvfrom(): unable to recvfrom [35]: Resource temporarily unavailable in /Users/m4rw3r/Downloads/php-5.4.0RC1/php-5.4.0RC1/ext/sockets/tests/socket_sentto_recvfrom_unix.php on line 10

Warning: socket_sendto() expects at least 5 parameters, 4 given in /Users/m4rw3r/Downloads/php-5.4.0RC1/php-5.4.0RC1/ext/sockets/tests/socket_sentto_recvfrom_unix.php on line 18

 ** ERROR: process timed out **

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri May 24 01:01:26 2019 UTC