apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48029] httpd-2.2.14 hangs in port_getn
Date Sat, 24 Oct 2009 11:49:31 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48029

--- Comment #13 from Jeff Trawick <trawick@apache.org> 2009-10-24 04:49:25 UTC ---
Summary:
port_getn() returns bogus return codes with 32-bit applications on Solaris
10/x86.  APR 1.3.8 accidently managed to work in most cases; APR 1.3.9 treats
these bugs returns from port_getn() as errors since the value is negative.  The
latest Solaris 10 update ("Solaris 10 10/09" a.k.a. "Solaris 10 U8") has the
problem, as do some (all?) earlier releases.  Current OpenSolaris levels do not
have the problem.  It does not apparently affect 64-bit applications on x86 or
any applications on SPARC.  One interesting aspect of the port_getn() problem
is that the retcode is good if you control the process calling port_getn() (at
least with dbx or truss).

Anticipated fix:
Change APR configure to run a small test program and disable the use of Event
Ports if port_getn() returns a bogus value.

Workaround:
Set the environment variable ac_cv_func_port_create=no when building APR in an
affected configuration.

$ make distclean
$ ac_cv_func_port_create=no
$ export ac_cv_func_port_create
$ ./configure --regular-options

Here is a simple test program showing the issue:

$ cat useport.c 
#include <stdio.h>

#include <port.h>

int main(void)
{
    int port, rc;
    uint_t nget;

    port = port_create();

    rc = port_getn(port, NULL, 0, &nget, NULL);
    printf("rc %d nget %u\n", rc, nget);

    return 0;
}
$ cc useport.c && ./a.out 
rc -17349963 nget 0
$ cc -m64 useport.c && ./a.out 
rc 0 nget 0

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message