Re: Help Please

2006-07-06 Thread Jeff Trawick

On 7/4/06, Tiago Semprebom <[EMAIL PROTECTED]> wrote:

ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,"IP value:
%d",csd->connected);

Why the csd don't appear to me like a structure allow-me to access their
filds like connected, remote_addr, etc?


The structure definition is available only within the implementation
of APR; it is not available within the web server.

FWIW, the "connected" flag down in APR is not so interesting anyway.
What are you trying to debug or trace?


Help Please

2006-07-04 Thread Tiago Semprebom
Hello,Apache 2.2 / Linux 2.6I'm trying to execute the follow line in the function *listener_thread in worker mpm: ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,"IP value: %d",csd->connected);Why the csd don't appear to me like a structure allow-me to access their filds like connected, remote_addr, etc? But, when I try to compile an error return: worker.c:846: error: request for member 'connected' in something not a structure or unionThanksTiago Semprebom 
		 
Yahoo! Search 
Música para ver e ouvir: You're Beautiful, do James Blunt

Doubt - Help Please

2006-06-28 Thread Tiago Semprebom
Hello,I'm changing the mpm prefork. I'm trying to use the cache_pqueue functions for create a priority queue. But after that I create a pqueue and I trying to insert a intem in my queue, an apache error in run time return to me: child pid 9827 exit signal Segmentation fault (11)I'm using the follow commands in my code (prefork.c):    cache_pqueue_t*    handle_p;    (the p. queue)    apr_ssize_t n_p=1000;   cache_pqueue_get_priority    pri_p;  
 cache_pqueue_getpos    get_p;   cache_pqueue_setpos    set_p;   apr_status_t   status_p;   apr_ssize_t    size_p;    int  teste_p;   handle_p =
 cache_pq_init (n_p, pri_p, get_p, set_p);   (start the queue)teste_p = cache_pq_is_valid (handle_p); (test the queue, return: 1)size_p = cache_pq_size (handle_p); (queue size, return: 0, of course)current_conn = ap_run_create_connection(ptrans, ap_server_conf,    csd, my_child_num, sbh, bucket_alloc); status_p = cache_pq_insert (handle_p, current_conn);  (aftercreate a connextion I try to insert a current_conn in my priority queue(handle_p), but in this point, I have a error (child pid 9827 exit signalSegmentation fault (11)) - I tried to inser a simple int in my queue,only for test, but apache return the
 same error.     So, one question: Is possible to do what I want ? Can I use thecache_pqueue functions for it or this functions are only for cache stuffs?Thank's,regardsTiago 
		 
Yahoo! Search 
Música para ver e ouvir: You're Beautiful, do James Blunt

Re: Debugging help, please?

2002-01-02 Thread Bruce Korb

Thomas Eibner wrote:
> 
> On Wed, Jan 02, 2002 at 02:24:41PM -0800, Bruce Korb wrote:
> > I'll see what I can do tonight, when I get home.  Thanks.
> > I'm not really sure I've ever been able to capture a
> > child with gdb, though.  It's easy with UnixWare's Debug,
> > but I'll see what I can do.  Thanks! - Bruce
> 
> That's why you run apache in the single process mode (-X).

In that case, it won't work.  I need to be able to debug
my program:

  http://autogen.sourceforge.net

in the context of running as a CGI service.  I.e., spawned by
httpd.  Therefore, I first tried cloning the environment
by using a shell wrapper:

  #! /bin/sh
  exec 3> /tmp/test.sh
  env | sed "s,^\([a-zA-Z_]*\)=\(.*\),export \1='\2'" >&3
  cat > /tmp/test.data
  echo "autogen $@ < /tmp/test.data" >&3
  exec 3>&-
  autogen $@ < /tmp/test.data

That failed.  This succeeded:

  env - ksh /tmp/test.sh

leaving me quite baffled.  On Solaris and UnixWare,
just running the autogen binary directly works fine.
Only Linux.  The question I need to find an answer for
is, "why?"  :-(



Re: Debugging help, please?

2002-01-02 Thread Thomas Eibner

On Wed, Jan 02, 2002 at 02:24:41PM -0800, Bruce Korb wrote:
> I'll see what I can do tonight, when I get home.  Thanks.
> I'm not really sure I've ever been able to capture a 
> child with gdb, though.  It's easy with UnixWare's Debug,
> but I'll see what I can do.  Thanks! - Bruce

That's why you run apache in the single process mode (-X).

-- 
  Thomas Eibner  DnsZone 
  mod_pointer  




Re: Debugging help, please?

2002-01-02 Thread Bruce Korb

Thomas Eibner wrote:

> Try recompiling Apache with CFLAGS=-g and then start it in single
> child mode in gdb:
> 
> $ gdb /path/to/bin/httpd
> (gdb) run -X
> 
> .. does it help?

I'll see what I can do tonight, when I get home.  Thanks.
I'm not really sure I've ever been able to capture a 
child with gdb, though.  It's easy with UnixWare's Debug,
but I'll see what I can do.  Thanks! - Bruce



Re: Debugging help, please?

2002-01-02 Thread Thomas Eibner

On Wed, Jan 02, 2002 at 02:07:24PM -0800, Bruce Korb wrote:
> 
> Hi,
> 
> I'm trying to figure out how to use GDB or any debugger from within
> a cgi program started by Apache under Linux.  I tried the obvious:
> 
>   #! /bin/sh
>   DISPLAY=:0.0 xterm -e gdb /path/to/bin/exe
> 
> to no avail, so I was hoping for a hint here  :-).
> The more simplistic approach of cloning the environment in a shell
> script does not evidence the problem.  It only seems to be
> reproducible on Linux under Apache.  (It works correctly on other
> platforms or using different execution environments on Linux.)
> If this is a known problem with known workarounds or fixes,
> that would be even better than trying to use gdb  :-D

Try recompiling Apache with CFLAGS=-g and then start it in single
child mode in gdb:

$ gdb /path/to/bin/httpd
(gdb) run -X

.. does it help?

-- 
  Thomas Eibner  DnsZone 
  mod_pointer  




Debugging help, please?

2002-01-02 Thread Bruce Korb


Hi,

I'm trying to figure out how to use GDB or any debugger from within
a cgi program started by Apache under Linux.  I tried the obvious:

  #! /bin/sh
  DISPLAY=:0.0 xterm -e gdb /path/to/bin/exe

to no avail, so I was hoping for a hint here  :-).
The more simplistic approach of cloning the environment in a shell
script does not evidence the problem.  It only seems to be
reproducible on Linux under Apache.  (It works correctly on other
platforms or using different execution environments on Linux.)
If this is a known problem with known workarounds or fixes,
that would be even better than trying to use gdb  :-D

Thanks! - Bruce