Operating System - HP-UX
1748152 Members
3395 Online
108758 Solutions
New Discussion юеВ

Re: Running HP-UX 11iv2 in debugging mode

 
Tarun Jain_1
Advisor

Running HP-UX 11iv2 in debugging mode

Hi All,

I have a kernel module, which as per one of the consumer, is causing panic. Looking at the dump, it seems, that memory it was using is wiped out. The command used by customer was very simple and we tried to run that 1000s of the time in multiprocess environment(through scripts) but couldn't reproduce it. From the panic dump, we checked that it was free call to a variable. We have made sure that for sure, that double free call can not come to that variable, through locking mechanism.

I think, If I enable kernel in debug mode it may help if this problem repeats or even help in reproducing it. Is there any way to start kernel/OS in debug mode ?

Regards,
Tarun
6 REPLIES 6
sangilak
Trusted Contributor

Re: Running HP-UX 11iv2 in debugging mode

Hi,


Although I do not have very much experience with this topic, I believe what you are looking for is KWDB:
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?jumpid=reg_R1002_USEN&ciid=aa089099cee021109099cee02110275d6e10RCRD

Pay special attention to Chapter 3 of the manual which describes the various boot options you will need to use:
http://h21007.www2.hp.com/portal/download/files/unprot/ddk/kwdb3-1-3/chap3.pdf


Hope that helps,

sangilak
likid0
Honored Contributor

Re: Running HP-UX 11iv2 in debugging mode

Debugger load on boot:

First, catch the EFI shell:

Next:

hpux -dconsole

(Boot your existing kernel with the console debugger).

Windows?, no thanks
Tarun Jain_1
Advisor

Re: Running HP-UX 11iv2 in debugging mode

I am not talking about tracing the OS with debugger. I am talking about debug-OS_Kernel, which actually has lots of tracing messages. Just wanted to check if we can boot kernel in debug mode.
Dennis Handly
Acclaimed Contributor

Re: Running HP-UX 11iv2 in debugging mode

>I am talking about debug-OS_Kernel, which actually has lots of tracing messages.

Only HP has that. There is a -v option for progress messages.
Don Morris_1
Honored Contributor

Re: Running HP-UX 11iv2 in debugging mode

As Dennis mentioned, a debug kernel isn't a boot option - it is a whole other compilation and not available externally. Not to mention that if this is a race (as you imply) running a debug kernel (or trying to log/trace execution) would likely change the timing of the race anyway.

Since you mention a "free call to a variable" causing a panic, I'm assuming this is a dynamic kernel allocation that the variable is a pointer to, and even if it uses the old FREE() macro -- that means it is almost certainly an Arena allocation.

Whether it is a double-free (which your statements imply is unlikely but that's what you've been looking at) or a buffer overrun (that's what it sounds like to me - the variable itself may be innocent but the metadata before it or the value stored within it could have been overwritten), I would think your next steps would be to use your support contact and request support help you in using the vmtrace utility. I'd expect the Standard Corruption mode would probably be the way to go here as long as the arena in question isn't too much memory (i.e. not >60% of the system already, there's an extra overhead in Corruption detection modes that adds up).
Laurent Menase
Honored Contributor

Re: Running HP-UX 11iv2 in debugging mode

like others debug kernel is hp only, and will not help on that type of problems.

now for double free logging & light weight corruption vmtrace is usually enough, and has a very limited perf impact.

Now there is a problem to analyze the results. All the tools which permit to read the vmtrace data are hp confidential.

Also some arena when vmtraced need to disable some cache features, else the result doesn't mean anything.