php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44221 'make test' hangs indefinitely due to misconfigured /etc/nsswitch.conf
Submitted: 2008-02-22 20:49 UTC Modified: 2008-03-13 12:16 UTC
From: willm1 at cs dot umbc dot edu Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.2.5 OS: Solaris 10-u4
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: willm1 at cs dot umbc dot edu
New email:
PHP Version: OS:

 

 [2008-02-22 20:49 UTC] willm1 at cs dot umbc dot edu
Description:
------------
Test number 1519 hangs while building on Solaris 10, for at least 40 minutes.  I'm not sure if this is related, but the /tmp/BUILD/php-5.2.5/tmp-php.ini file mentioned in the output is currently empty.  This problem is reproducible with the steps below; I've run it three times, nuking the php-5.2.5 directory in between.  The PHP process appears to go into a loop querying NIS for i_dont_exist.com, although NIS is not specified in nsswitch.conf as a place to get hostnames from.  This happens both with and without NSCD running.

Reproduce code:
---------------
export PATH=/usr/ccs/bin:/usr/sbin:/usr/bin:/bin:/opt/csw/bin:/opt/csw/sbin:/opt/sfw/bin:/usr/sfw/bin
CFLAGS='-O2 -g -pipe -R/usr/site/lib -R/usr/sfw/lib -m32' \
 ./configure --prefix=/usr/site --sysconfdir=/usr/site/etc --mandir=/usr/site/share/man --with-zlib --enable-dba --with-gd --with-gettext --with-imap=/usr/site --with-imap-ssl=/usr/site --enable-soap --with-pear --with-libxml-dir=/usr/site --with-apxs2=/usr/site/sbin/apxs --with-mysql=/usr/sfw
make
make test

Note that /usr/site contains all the packages we've built ourselves.  Other packages build fine against the libraries in there, so I'm fairly certain external libraries aren't the issue.

Expected result:
----------------
Successful build.

Actual result:
--------------
+ make test

Build complete.
Don't forget to run 'make test'.


=====================================================================
CWD         : /tmp/BUILD/php-5.2.5
PHP         : /tmp/BUILD/php-5.2.5/sapi/cli/php 
PHP_SAPI    : cli
PHP_VERSION : 5.2.5
ZEND_VERSION: 2.2.0
PHP_OS      : SunOS - SunOS servername 5.10 Generic_120011-14 sun4u
INI actual  : /tmp/BUILD/php-5.2.5/tmp-php.ini
More .INIs  : 
Extra dirs  : 
=====================================================================
TIME START 2008-02-22 14:06:36
=====================================================================

...
PASS Bug #29839 (incorrect convert (xml:lang to lang)) [ext/soap/tests/bugs/bug34453.phpt] 
PASS Bug #34643 (wsdl default value) [ext/soap/tests/bugs/bug34643.phpt] 
TEST 1519/3821 [ext/soap/tests/bugs/bug34657.phpt]

(in another terminal)
# snoop not port 22
Using device /dev/hme (promiscuous mode)
servername.cs.umbc.edu -> nis.cs.umbc.edu NIS C MATCH i_dont_exist.com in ipnodes.byname
nis.cs.umbc.edu -> servername.cs.umbc.edu NIS R MATCH No such key


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-27 00:03 UTC] willm1 at cs dot umbc dot edu
This happens exactly the same with php5.2-200802262130, except that the test number is different:
make test
...
PASS Bug #29839 (incorrect convert (xml:lang to lang)) [ext/soap/tests/bugs/bug34453.phpt] 
PASS Bug #34643 (wsdl default value) [ext/soap/tests/bugs/bug34643.phpt] 
TEST 1685/4460 [ext/soap/tests/bugs/bug34657.phpt]

and then hangs forever.  snoop still shows NIS requests being made.  

It appears this may be due to a misconfiguration of our /etc/nsswitch.conf file: it has no 'ipnodes' entry.  I've added this and am rebuilding.  Results on Thursday.
 [2008-02-27 00:23 UTC] willm1 at cs dot umbc dot edu
Adding the entry "ipnodes: files dns" seems to have resolved the issue.  Perhaps a check for working name resolution should be added to the configure script, or a timeout should be added to the test, or a DNS-specific resolver should be used?  I don't know whether I'd consider this a bug in PHP or a problem in our environment, so I'll leave this open, and it can be closed if it's determined that this is not worth considering.
 [2008-03-13 12:16 UTC] jani@php.net
Improperly configured OS is not a PHP bug. The hang happens outside PHP and AFAICT, there's no way to affect it. (Please prove me wrong though, would help if we knew what function actually hangs.. :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC