Any guidelines for debugging threaded (worker) mpm? I've read the
relevant gdb section, but it isn't enough. I couldn't find any relevant
info in httpd-docs-2.0/manual/developer.
I'm interested in tips making the debug process easier. Does anybody
have a cheatlist with useful tips/notes and willing to share it?
----
In particular how do I know which thread is going to process the next
request? If I start with -DONE_PROCESS and have:
<IfModule worker.c>
StartServers 1
MaxClients 1
MinSpareThreads 1
MaxSpareThreads 1
ThreadsPerChild 1
MaxRequestsPerChild 0
</IfModule>
httpd still keeps 4 threads, that's what gdb says:
(gdb) info thread
* 4 Thread 2051 (LWP 31642) apr_poll (aprset=0x81861f8,
nsds=0xbf5ffaec, timeout=-1) at poll.c:143
3 Thread 1026 (LWP 31641) 0x402267a2 in sigsuspend () from
/lib/libc.so.6
2 Thread 2049 (LWP 31640) 0x402dfd94 in poll () from /lib/libc.so.6
1 Thread 1024 (LWP 31592) 0x402267a2 in sigsuspend () from
/lib/libc.so.6
During the first request yet another thread starts. And one of the old
ones goes away.
It seems that the newest thread is the one I need to attach to. But when
I attach to it once, in a while I get switched to the previous thread,
etc. This is very confusing and non-productive :(
----
Another question is regarding:
set auto-solib-add 0
without this setting gdb tries to load/resolve symbols of many shared
libs and the startup may take 1 minute and more under mod_perl, which
sucks. With this setting I only need to load sharedlib which I need for
debugging, and the startup takes a few seconds.
The problem is that with worker-mpm and this setting in effect gdb won't
work properly. It doesn't see threads. 'info threads' returns nothing.
If I don't set auto-solib-add to 0, it works but takes ages to start.
Any ideas how to tell gdb not to resolve so's automatically and still
have threads working?
Thanks!
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/