On Tue, Aug 26, 2003 at 12:44:17PM -0400, Jesse Guardiani wrote:
> > Probably with '-g' if it's not there already, and make sure you do 'make
> > install' rather than 'make install-strip' otherwise the debug symbols will
> > be removed.
> 
> So where would I put the -g? In my configure statement? Could you give
> me an example? I have always used printf debugging in the past. (Yeah,
> I know. It's about time I learned how to use a proper debugger.)

Hmm, probably

  CFLAGS=-g
  export CFLAGS
  ./configure ...etc

(maybe CPPFLAGS not CFLAGS). ./configure --help should tell you.

> BTW, I got another chance to examine some non-debug-symbol-compiled
> mem hog processes today.
> 
> Here is the sqwebmail process list:
> 
> ------ BEGIN sqwebmail ps output ------
> [11:[EMAIL PROTECTED]:[~]# ps auxwwwo ppid | grep sqweb
> vpopmail 30817 24.8 25.2 263504 263064  ??  RN   12:22AM 270:56.82 sqwebmail         
>  515
> vpopmail 49645 25.2 11.0 115888 115336  ??  RN    8:58AM  51:45.69 sqwebmail        
> 60227
> vpopmail 30707 25.1 16.7 263600 174524  ??  RN   12:21AM 271:12.74 sqwebmail         
>  513
> vpopmail 30711  0.0  0.1  1820 1116  ??  I    12:21AM   0:00.00 sqwebmail        
> 30707
> vpopmail 30820  0.0  0.1  1820 1116  ??  I    12:22AM   0:00.00 sqwebmail        
> 30817
> vpopmail 49648  0.0  0.1  1796 1160  ??  IN    8:58AM   0:00.00 sqwebmail        
> 49645
> ------ END sqwebmail ps output ------
> 
> The last column is the parent pid. ppid 515, 513, and 60227 are apache web server 
> processes.
> 
> Looks like sqwebmail process 49645 was spawned by the web server. It then spawned 
> another
> sqwebmail process 49648, which appears to be relatively idle.

I didn't think there were many places where sqwebmail forks, although
grepping the source there are actually quite a few. The main ones would be:
- to send a mail
- to run gzip (enabled by default)
- to run the bannerprog or gpg (not enabled by default).

However those would typically exec soon after the fork.
It looks like authlib forks if you are running --without-authdaemon. It's
difficult to see where the problem might be.

> As you can see, I accidentally killed the process by typing CTRL+C in gdb.
> How else can I terminate a 'next' or 'step'?

I don't know. I do little in gdb beyond 'bt' and 'print' :-)

> So, I take it that compiling sqwebmail with debugging symbols will
> reveal a bit more info? Tell me what I need to do. I'm anxious to
> get to the bottom of this.

Well, it will tell you the names of the functions you are in, allow you to
inspect variables etc. But if you're just in an infinite loop of free()
calling itself then it's hard to see what the problem might be.

Regards,

Brian.

Reply via email to