[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modules
Subject:    Re: [apache-modules] apache2: valgrind, CoreDumpDirectory, debugging, (still) how?
From:       Christian Parpart <cparpart () surakware ! net>
Date:       2003-09-08 8:24:59
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 29 August 2003 10:56 am, Norbert Kaufmann wrote:
> Christian Parpart wrote:
> > I know, you can run apache with argument -X to get only one process
> > (for debugging), but it still doesn't work well at all :(
> >
> > the CoreDumpDirectory does not mean anything, I can specify what I want:
> > when my apache module crashes I can't find any core file created anywhere
> > nor any error message that core file creation probably failed :(
>
> what operating system? some do not allow suid 0 programs to coredump.

Gentoo Linux with gcc 3.3.1 (previousely 3.2.3) and glibc 2.3.2.

> > Can anyone tell me a good way how to get apache so to be able to cach my
> > backtraces of my crashed module (or even in active debug mode)?
>
> try this:
> http://www.apacheweek.com/issues/03-04-25

Well, I am using Apache 2, and the sources also say that *this patch* is 
already applied. But I still se no error message that prctl() did not work, 
nor any core dumps that should have been created otherwise.

It's damn quietly crashing.

> > I'd also like to get apache2 (I mean, my module) to be watched by
> > valgrind; the backend server my module is connecting to is already
> > successfully valgrindized, but I still feel very very blind on coding
> > with apache since the only (but bad) working method to debug seems to be
> > printf's.....
>
> i am happy with gdb.

I tried gdb, multiple times. but it doesn't seem to be helpfull.

jupiter root # gdb `which apache2`
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) set args -D DAV -D DAV_FS -X -k start
(gdb) b main
Breakpoint 1 at 0x806f9c8: file main.c, line 407.
(gdb) r
Starting program: /usr/sbin/apache2 -D DAV -D DAV_FS -X -k start
[New Thread 16384 (LWP 31218)]
[Switching to Thread 16384 (LWP 31218)]

Breakpoint 1, main (argc=8, argv=0xbffff7d4) at main.c:407
407     main.c: No such file or directory.
        in main.c
(gdb) n
408     in main.c
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(gdb) c
Continuing.
Couldn't get registers: Operation not permitted.
(gdb) q
The program is running.  Exit anyway? (y or n) y
jupiter root # 

first problem, it can't find the source, but I kept them at the place the they 
got compiled from (by gentoo's emerge tool)
second problem, after having *probabely* reached the problem zone, where it 
might have been crashed, I get something like "operation not permitted".
and this as root? awful :(

Can anyone help me, please?

Many thanks,
Christian Parpart.

- -- 
 10:05:59 up 11 days, 15:03,  3 users,  load average: 1.07, 1.75, 1.75
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/XDzePpa2GmDVhK0RAtQvAJ9wd5rctLDhFnbeZNQb5uGkXS7cSQCffXLg
PAOo/xhLXTCRW7BQuVPFfT8=
=Pjoq
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: apache-modules-unsubscribe@covalent.net
For additional commands, e-mail: apache-modules-help@covalent.net


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic