You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ian Holsman <ia...@cnet.com> on 2001/07/21 00:59:52 UTC

2.0.21 build/run summary for Solaris 8

prefork runs nicely on Solaris 8
threaded segfaults under heavly load on Solaris 8

(if someone can tell me how to actually get the core files when it
core's I'll post a trace/theory on why, but I can't find the core files
;( )
 


--
Ian Holsman
Performance Measurement & Analysis
CNET Networks    -    415 364-8608


Re: 2.0.21 build/run summary for Solaris 8

Posted by Ryan Bloom <rb...@covalent.net>.
> > http://lxr.webperf.org/search.cgi?string=gethostbyname
> > shows 3 others, mod_unqiue_id, proxy_util, and util.c as well as a
> > support program.
> > sounds like we need a apr_gethostbyname() function.
> >
> > getaddrinfo() is only used in sa_common.c
>
> <rant about sa_common.c>
> While I understand why we have sa_common.c (to achieve some level of
> platform independence), it just seems like a mess.  Can't we achieve
> similar results with Makefile tweaks?  When I modify sa_common.c, I have
> to delete sockaddr.{o|lo} and recompile.  Yuuuuck.
> </rant about sa_common.c>

Have you run make depend to generate your dependancies yet?

Ryan


_____________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
-----------------------------------------------------------------------------

Re: 2.0.21 build/run summary for Solaris 8

Posted by Dale Ghent <da...@elemental.org>.
On Sat, 21 Jul 2001, Dale Ghent wrote:

| You don't have to "enable" IPv6 on Solaris. When asked in the setup
| whether to "enable IPv6" (which is what I think you're thinking of), that
| just means "do you want to ifconfig up a IPv6 interface with the default
| IPv6 one?"
  ^^^^

Clearly, I meant IPv4 here.

/dale


Re: 2.0.21 build/run summary for Solaris 8

Posted by Dale Ghent <da...@elemental.org>.
On Sat, 21 Jul 2001, Justin Erenkrantz wrote:

| On Fri, Jul 20, 2001 at 08:02:55PM -0700, Ian Holsman wrote:
| > > | Wait, if you're running this on sol8, you should be using getaddrinfo(),
| > > | not gethostbyname*. Right? sol8 *should* satisfy the #ifdef in
| > > | sa_common.c for getaddrinfo()
|
| I bet that Ian didn't enable IPv6 on that Solaris 8 machine.  That
| would force it to get the gethostbyname{_r}() path.

You don't have to "enable" IPv6 on Solaris. When asked in the setup
whether to "enable IPv6" (which is what I think you're thinking of), that
just means "do you want to ifconfig up a IPv6 interface with the default
IPv6 one?"

All the IPv6-born functionality is present in the Solaris 8 kernel and
libs, v6 interfaces present or no.

| Ideally, we should try to use getaddrinfo() even in the normal case
| (i.e. we don't have IPv6).  I don't have time/inclination now to do
| so, but I'll see about adding it to the STATUS file.  Patches
| welcomed.  =)

This is true. the "if defined(HAVE_GETADDRINFO) && APR_HAVE_IPV6" in
sa_common.c could probably be just reduced to the HAVE_GETADDRINFO.

Since getaddrinfo() is basically a part of the standard IPv6
functionality, it's presence pretty much implies IPv6 capabilities in the
system.

/dale


Re: 2.0.21 build/run summary for Solaris 8

Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Fri, Jul 20, 2001 at 08:02:55PM -0700, Ian Holsman wrote:
> > | Wait, if you're running this on sol8, you should be using getaddrinfo(),
> > | not gethostbyname*. Right? sol8 *should* satisfy the #ifdef in
> > | sa_common.c for getaddrinfo()

I bet that Ian didn't enable IPv6 on that Solaris 8 machine.  That 
would force it to get the gethostbyname{_r}() path.

Ideally, we should try to use getaddrinfo() even in the normal case
(i.e. we don't have IPv6).  I don't have time/inclination now to do 
so, but I'll see about adding it to the STATUS file.  Patches 
welcomed.  =)

> http://lxr.webperf.org/search.cgi?string=gethostbyname
> shows 3 others, mod_unqiue_id, proxy_util, and util.c as well as a
> support program.
> sounds like we need a apr_gethostbyname() function.
> 
> getaddrinfo() is only used in sa_common.c 

<rant about sa_common.c>
While I understand why we have sa_common.c (to achieve some level of
platform independence), it just seems like a mess.  Can't we achieve 
similar results with Makefile tweaks?  When I modify sa_common.c, I have
to delete sockaddr.{o|lo} and recompile.  Yuuuuck.
</rant about sa_common.c>

apr_sockaddr_info_get is probably what you want.  But, it is a bit
higher level than just returning the hostent.  Looking at util.c, I 
think we could replace it with calls to apr_sockaddr_info_get instead,
but I'd have to stare at it after some sleep.  -- justin


Re: 2.0.21 build/run summary for Solaris 8

Posted by Ian Holsman <ia...@cnet.com>.
On 20 Jul 2001 21:50:17 -0400, Dale Ghent wrote:
> On Fri, 20 Jul 2001, Dale Ghent wrote:
> 
> | On 20 Jul 2001, Ian Holsman wrote:
> |
> | | yes.
> | | After applying Justin's patch, and re-running the load
> | | the fault disappears.
> | | so +1 on the patch from me.
> |
> | Wait, if you're running this on sol8, you should be using getaddrinfo(),
> | not gethostbyname*. Right? sol8 *should* satisfy the #ifdef in
> | sa_common.c for getaddrinfo()
> 
> aha, a nm of my httpd binary shows that both getaddrinfo() and
> gethostbyname() are being used. Whatever APR function is using
> gethostbyname() could/should probably be using () on platforms that
> support it (such as sol8.)

http://lxr.webperf.org/search.cgi?string=gethostbyname
shows 3 others, mod_unqiue_id, proxy_util, and util.c as well as a
support program.
sounds like we need a apr_gethostbyname() function.

getaddrinfo() is only used in sa_common.c 
> 
> /dale
--
Ian Holsman
Performance Measurement & Analysis
CNET Networks    -    415 364-8608


Re: 2.0.21 build/run summary for Solaris 8

Posted by Dale Ghent <da...@elemental.org>.
On Fri, 20 Jul 2001, Dale Ghent wrote:

| On 20 Jul 2001, Ian Holsman wrote:
|
| | yes.
| | After applying Justin's patch, and re-running the load
| | the fault disappears.
| | so +1 on the patch from me.
|
| Wait, if you're running this on sol8, you should be using getaddrinfo(),
| not gethostbyname*. Right? sol8 *should* satisfy the #ifdef in
| sa_common.c for getaddrinfo()

aha, a nm of my httpd binary shows that both getaddrinfo() and
gethostbyname() are being used. Whatever APR function is using
gethostbyname() could/should probably be using () on platforms that
support it (such as sol8.)

/dale


Re: 2.0.21 build/run summary for Solaris 8

Posted by Dale Ghent <da...@elemental.org>.
On 20 Jul 2001, Ian Holsman wrote:

| yes.
| After applying Justin's patch, and re-running the load
| the fault disappears.
| so +1 on the patch from me.

Wait, if you're running this on sol8, you should be using getaddrinfo(),
not gethostbyname*. Right? sol8 *should* satisfy the #ifdef in
sa_common.c for getaddrinfo()

/dale


Re: 2.0.21 build/run summary for Solaris 8

Posted by Ian Holsman <ia...@cnet.com>.
On 20 Jul 2001 16:02:24 -0700, Roy T. Fielding wrote:
> On Fri, Jul 20, 2001 at 03:59:52PM -0700, Ian Holsman wrote:
> > 
> > prefork runs nicely on Solaris 8
> > threaded segfaults under heavly load on Solaris 8
> > 
> > (if someone can tell me how to actually get the core files when it
> > core's I'll post a trace/theory on why, but I can't find the core files
> > ;( )
> 
> Isn't it the same problem that Justin posted regarding Solaris 8 and threaded?
> Namely, the stack corruption due to gethostbyname that causes segfaults.
> 

yes.
After applying Justin's patch, and re-running the load
the fault disappears.
so +1 on the patch from me.

> ....Roy
--
Ian Holsman
Performance Measurement & Analysis
CNET Networks    -    415 364-8608


Re: 2.0.21 build/run summary for Solaris 8

Posted by "Roy T. Fielding" <fi...@ebuilt.com>.
On Fri, Jul 20, 2001 at 03:59:52PM -0700, Ian Holsman wrote:
> 
> prefork runs nicely on Solaris 8
> threaded segfaults under heavly load on Solaris 8
> 
> (if someone can tell me how to actually get the core files when it
> core's I'll post a trace/theory on why, but I can't find the core files
> ;( )

Isn't it the same problem that Justin posted regarding Solaris 8 and threaded?
Namely, the stack corruption due to gethostbyname that causes segfaults.

....Roy


Re: 2.0.21 build/run summary for Solaris 8

Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Fri, Jul 20, 2001 at 03:59:52PM -0700, Ian Holsman wrote:
> 
> prefork runs nicely on Solaris 8
> threaded segfaults under heavly load on Solaris 8
> 
> (if someone can tell me how to actually get the core files when it
> core's I'll post a trace/theory on why, but I can't find the core files
> ;( )

man coreadm.

I've been through this song and dance before.  -- justin


Re: 2.0.21 build/run summary for Solaris 8

Posted by Brian Pane <bp...@pacbell.net>.
Ian Holsman wrote:

>prefork runs nicely on Solaris 8
>threaded segfaults under heavly load on Solaris 8
>
>(if someone can tell me how to actually get the core files when it
>core's I'll post a trace/theory on why, but I can't find the core files
>;( )
>
If you're interested in catching the fault 'live' instead
of debugging from a core file,

  truss -Mall -t\!all -f /path/to/apachectl start

Once a child proces faults, truss will print the pid to
stderr and freeze the process.  Then you can use pstack,
gdb, or whatever to get more information about it.  To
unfreeze the process, kill -9 or /usr/proc/bin/prun.

--Brian




Re: 2.0.21 build/run summary for Solaris 8

Posted by Ian Holsman <ia...@cnet.com>.
On 20 Jul 2001 19:04:28 -0400, Dale Ghent wrote:
> On 20 Jul 2001, Ian Holsman wrote:
> 
> | (if someone can tell me how to actually get the core files when it
> | core's I'll post a trace/theory on why, but I can't find the core files
> | ;( )
> 
> From the Solaris core(4) man page:
> 
>      A process with an effective user ID
>      different from the real user ID will not produce a core
>      image. This is also true for a process with an effective
>      group ID different from the real group ID. Set-user-ID and
>      set-group-ID programs do not produce core images either when
>      they terminate, since this would cause a security loophole.
> 
> So, the solution is to set 'User' and 'Group' in httpd.conf to 'root' and
> 'other' respectively.
> 

Thank you. 
I presume that this can be overridden with coreadm (which is what justin
was eluding to)

I'll just put the User/Group to root 
put the patch in for gethostbyname_r and re-do the threads

..Ian
> /dale
--
Ian Holsman
Performance Measurement & Analysis
CNET Networks    -    415 364-8608


Re: 2.0.21 build/run summary for Solaris 8

Posted by Dale Ghent <da...@elemental.org>.
On 20 Jul 2001, Ian Holsman wrote:

| (if someone can tell me how to actually get the core files when it
| core's I'll post a trace/theory on why, but I can't find the core files
| ;( )

>From the Solaris core(4) man page:

     A process with an effective user ID
     different from the real user ID will not produce a core
     image. This is also true for a process with an effective
     group ID different from the real group ID. Set-user-ID and
     set-group-ID programs do not produce core images either when
     they terminate, since this would cause a security loophole.

So, the solution is to set 'User' and 'Group' in httpd.conf to 'root' and
'other' respectively.

/dale