Jeff Trawick <[EMAIL PROTECTED]> writes:

> Throughout today I've been seeing very intermittent regression
> failures on AIX. The segfault happens when trying to get the IP
> address string from a socket addr.
> 
> core_create_conn() calls apr_socket_addr_get(), which returns
> APR_SUCCESS.  But somehow we have NULL for the returned socket address
> so apr_sockaddr_ip_get() bombs.

The immediate cause of the problem is that ap_queue_pop() is returning
EINVAL and worker_thread() didn't react to that and instead tried to
process the would-be socket.

I suspect that the EINVAL from ap_queue_pop() is from trying to use an
invalid (cleaned up?) pthread mutex.  AIX tends to notice errors on
mutexes and fail the call rather than venturing into unpredictable
behavior.

I just committed a change to worker to not process the socket if rv !=
APR_SUCCESS.  Previously we avoided processing the socket if rv ==
APR_EINTR or csd is NULL.  (But no logic in ap_queue_pop() or caller
to set csd to NULL on the EINVAL error!)

I recall the fix to check for csd == NULL being very helpful a couple
of months back.  I hope rv was non-zero in that case (i.e., I hope
that problem is still fixed)!

-- 
Jeff Trawick | [EMAIL PROTECTED]
Born in Roswell... married an alien...

Reply via email to