Visitor
Re: Capturing memory leak info for Tuxedo servers written in C

In general, I'm interested in all bad memory operations, and I did use +check=all thinking that all checks are good.

 

So I tried a more methodical approach, starting with "+check=malloc" and worked my way up to "+check=malloc +check=bounds +check=globals +check=stack" with pretty good results. I did get some core dumps when I added "+check=uninit" and so decided to quite while I was ahead. I need to roll out the switches to all servers and see how works out.

 

I was able to reliably instrument the servers using batch debugging, so I can always fall back to that mode of operation. My hope was to wire the checks into our makefiles so that developers and our daily builds would be always "on".

 

Here's the dump I got when I turned on check=uninit:

 

~/cvs/Head/Dental/GUISupport> gdb DenGUISrv core
HP gdb 6.1 for HP Itanium (32 or 64 bit) and target HP-UX 11iv2 and 11iv3.
Copyright 1986 - 2009 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 6.1 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
Core was generated by `DenGUISrv'.
Program terminated with signal 6, Aborted.


warning: No unwind information found.
 Skipping this library /usr/lib/hpux64/libcl.so.1.

#0  0xc0000000002125f0:0 in _lwp_kill+0x30 ()
   from /usr/lib/hpux64/libpthread.so.1
(gdb) bt
#0  0xc0000000002125f0:0 in _lwp_kill+0x30 ()
   from /usr/lib/hpux64/libpthread.so.1
#1  0xc000000000178b70:0 in pthread_kill+0x9d0 ()
   from /usr/lib/hpux64/libpthread.so.1
#2  0xc0000000003f80e0:0 in raise+0xe0 () from /usr/lib/hpux64/libc.so.1
#3  0xc00000001a5a3820:0 in skgesigOSCrash () at skgesig.c:376
#4  0xc00000001b66d0a0:0 in kpeDbgSignalHandler () at kpedbg.c:1074
#5  0xc00000001a5a3cc0:0 in skgesig_sigactionHandler () at skgesig.c:799
#6  <signal handler called>
#7  0xc0000000002125f0:0 in _lwp_kill+0x30 ()
   from /usr/lib/hpux64/libpthread.so.1
#8  0xc000000000178b70:0 in pthread_kill+0x9d0 ()
   from /usr/lib/hpux64/libpthread.so.1
#9  0xc0000000003f80e0:0 in raise+0xe0 () from /usr/lib/hpux64/libc.so.1
#10 0xc000000000509500:0 in abort+0x220 () from /usr/lib/hpux64/libc.so.1
#11 0x4000000000b79290:0 in rtc_at_exit_abort () at rtc_utils.c:298
#12 0xc00000000047c6a0:0 in __exit_handler+0xa0 ()
   from /usr/lib/hpux64/libc.so.1
(gdb)

 rtc_utils.c is not ours, I'm assuming it belongs to Tuxedo.

 

It looks like I can make it work,it'll just need some tuning.

 

Thank - JVL