You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Mathieu CARBONNEAUX <in...@ch2o.info> on 2006/06/18 14:49:19 UTC

Re: [info@ch2o.info] Re: debug apache

i think is very usefull to have this in production environment... to debug probleme without interupting production... in only up the log level with reload...
with strace you must restart apache with strace...and for desactivating it you must restart... in some production environement is not acceptable...

  _____  

From: Nick Kew [mailto:nick@webthing.com]
To: dev@httpd.apache.org
Sent: Sat, 17 Jun 2006 14:14:25 +0200
Subject: [info@ch2o.info] Re: debug apache

On Saturday 17 June 2006 09:47, Ruediger Pluem wrote:
> On 06/17/2006 08:57 AM, Alexander Lazic wrote:
> > On Sam 17.06.2006 00:54, Ruediger Pluem wrote:
> >> From my current point of view the answer is: No, this is not possible
> >> out of the box.
> >> It may be possible if you modify the hook macros.
> >
> > And do you think that the developer would accept a patch for apache 2.x
> > and would apply it?
>
> Depends on the patch :-). Please take into account that these macros are
> part of apr-util. So this discussion belongs to dev@apr.apache.org.
> Currently I have not made any thoughts how these macros could be modified
> in a way such that they play together with httpd logging.

I think you'd be far better off with a generic trace such as strace.
They're made for precisely this kind of thing.

Having said that. what you could do with the hooks is to wrap them
in functions that add logging.  To do that with apache logging would
require the APR macros to be masked out.  Since you'd be adding 
overhead to everything the server does, you'll never get it accepted
into the main source tree, unless you can at the very least make it
conditionally compile.

-- 
Nick Kew
  

Re: [info@ch2o.info] Re: debug apache

Posted by Matty <ma...@gmail.com>.
On Sun, 18 Jun 2006, Ruediger Pluem wrote:

> On 06/18/2006 02:49 PM, Mathieu CARBONNEAUX wrote:
>> i think is very usefull to have this in production environment... to debug probleme without interupting production... in only up the log level with reload...
>> with strace you must restart apache with strace...and for desactivating it you must restart... in some production environement is not acceptable...
>
> Why that? You can attach strace to running processes, provided that you have appropriate permissions on this process. So
> you might need root access for this.
>
> Of course I admit that the strace / ltrace output is generic and a more specific output by logging inside the hooks
> could provide better information.

If you have a Solaris 10 host handy, you can get at this information with 
the DTrace pid provider. It allows you to enable probes dynamically on 
user-level functions, and is an invaluable tool for debugging stuff in 
production.

- Ryan
--
UNIX Administrator
http://daemons.net/~matty


Re: [info@ch2o.info] Re: debug apache

Posted by Alexander Lazic <al...@none.at>.
On Son 18.06.2006 22:25, Mathieu CARBONNEAUX wrote:
>ok i've forget that possibility.... :)
>
>but using strace directly by attaching to processus can be risky in
>production (like gdb!)... 
>and with apache with 256 or 512 processuss all working can be hard to
>debug...
>
>in some time have lost the processus...by attempting to attach to it...
>
>and yes is very low level trace... 
>
>in first aproche debug log can usefull to see where the problem are and
>after can be useful to use strace/ltrace to deep into the problem...
>
>debug trace can be usefull to encircle the problem...
>
>and to have trace of internal information of apache is not very
>freindly in using strace/ltrace... than debug log that are trace
>important information...
>
>i think is more simple to make corelation with debug trace...
>
>and with proprietary module like websphere and weblogic can be
>deficulte to make good filter in strace/ltrace to debug...
>
>and some is only to debug configuration probleme... not only bug...

Sorry for full quote but, full ack ;-)

It is also a help to know *when* *which* catch the request and which
data goes thru.

Regards

Alex

Re: debug apache

Posted by Colm MacCarthaigh <co...@stdlib.net>.
On Mon, Jun 19, 2006 at 12:03:57AM +0200, Alexander Lazic wrote:
> Sorry for that, which list is the right one from your point of view?

dev@apr.apache.org :-)

-- 
Colm MacCárthaigh                        Public Key: colm+pgp@stdlib.net

Re: debug apache

Posted by Alexander Lazic <al...@none.at>.
On Son 18.06.2006 21:42, Colm MacCarthaigh wrote:
>
>Anyway, as others have pointed out, this topic is off-topic here.

Sorry for that, which list is the right one from your point of view?

Regards

Alex

Re: [info@ch2o.info] Re: debug apache

Posted by Colm MacCarthaigh <co...@stdlib.net>.
On Sun, Jun 18, 2006 at 10:25:27PM +0200, Mathieu CARBONNEAUX wrote:
> but using strace directly by attaching to processus can be risky in
> production (like gdb!)...  and with apache with 256 or 512 processuss
> all working can be hard to debug...

*shrug*, I regulary attach tracers to apache with well into the
thousands of processess/threads. Never had a problem in years of doing
that.

Anyway, as others have pointed out, this topic is off-topic here.

-- 
Colm MacCárthaigh                        Public Key: colm+pgp@stdlib.net

Re: [info@ch2o.info] Re: debug apache

Posted by Mathieu CARBONNEAUX <in...@ch2o.info>.
ok i've forget that possibility.... :)

but using strace directly by attaching to processus can be risky in production (like gdb!)... 
and with apache with 256 or 512 processuss all working can be hard to debug...

in some time have lost the processus...by attempting to attach to it...

and yes is very low level trace... 

in first aproche debug log can usefull to see where the problem are and after can be useful to use strace/ltrace to deep into the problem...

debug trace can be usefull to encircle the problem...

and to have trace of internal information of apache is not very freindly in using strace/ltrace... than debug log that are trace important information...

i think is more simple to make corelation with debug trace...

and with proprietary module like websphere and weblogic can be deficulte to make good filter in strace/ltrace to debug...

and some is only to debug configuration probleme... not only bug...

Regards,
Mathieu
  _____  

From: Ruediger Pluem [mailto:rpluem@apache.org]
To: dev@httpd.apache.org
Sent: Sun, 18 Jun 2006 15:03:59 +0200
Subject: Re: [info@ch2o.info] Re: debug apache



On 06/18/2006 02:49 PM, Mathieu CARBONNEAUX wrote:
> i think is very usefull to have this in production environment... to debug probleme without interupting production... in only up the log level with reload...
> with strace you must restart apache with strace...and for desactivating it you must restart... in some production environement is not acceptable...

Why that? You can attach strace to running processes, provided that you have appropriate permissions on this process. So
you might need root access for this.

Of course I admit that the strace / ltrace output is generic and a more specific output by logging inside the hooks
could provide better information.

Regards

Rüdiger

  

Re: [info@ch2o.info] Re: debug apache

Posted by Ruediger Pluem <rp...@apache.org>.

On 06/18/2006 02:49 PM, Mathieu CARBONNEAUX wrote:
> i think is very usefull to have this in production environment... to debug probleme without interupting production... in only up the log level with reload...
> with strace you must restart apache with strace...and for desactivating it you must restart... in some production environement is not acceptable...

Why that? You can attach strace to running processes, provided that you have appropriate permissions on this process. So
you might need root access for this.

Of course I admit that the strace / ltrace output is generic and a more specific output by logging inside the hooks
could provide better information.

Regards

Rüdiger