Operating System - HP-UX
1821587 Members
3489 Online
109633 Solutions
New Discussion юеВ

HP11.31 Kernel Memory Leak problem

 
SOLVED
Go to solution
puhut
New Member

HP11.31 Kernel Memory Leak problem

Hi all,
I'm trying to get process credential in kernel module using proc_cred_hold() function. If I use proc_cred_hold() function, PM_CRED area of kernel memory is increased continuously and system hanging because of insufficient kernel memory. I think proc_cred_hold() leads to kernel memory leak.

Physical memory = 2088549 8.0g 100%
Free memory = 3200 12.5m 0%
User processes = 174884 683.1m 8% details with -user
System = 1852206 7.1g 89%
Kernel = 1852154 7.1g 89% kernel text and data
Dynamic Arenas = 1671854 6.4g 80% details with -arena
PM_CRED = 1568969 6.0g 75%
vx_global_kmcac = 16237 63.4m 1%
spinlock_arena = 10034 39.2m 0%
vm_pfn2v_arena = 8518 33.3m 0%
M_DYNAMIC = 6125 23.9m 0%

Any thoughts on what I'm missing to use proc_cred_hold() function? I have to do other things to use the function?

Thanks,
2 REPLIES 2
whiteknight
Honored Contributor

Re: HP11.31 Kernel Memory Leak problem

Puhut,


I checked 11.31 memory leak found The formal patch is not yet announcend
JAGag35944

Please log case to HP support and give them the JAGag35944 to request for temporary fix.

WK
Problem never ends, you must know how to fix it
Don Morris_1
Honored Contributor
Solution

Re: HP11.31 Kernel Memory Leak problem

That suggests one of two things to me:

1) You're putting holds on a massive amount of credentials at once (from what I can tell, these get held in a caching layer within this code and recycled as needed... but never freed back to the Arena level) resulting in a bunch of credentials in use at one time beyond the capacity of the system to handle.

or

2) You aren't calling crfree() with the credential you got from proc_cred_hold() when you're done with it (or you think you're never done with it). With the hold in place, the credential can't be returned to the cache, and hence new credentials are always allocated instead of the recycling.

i.e. you should have:

cred_t *temp_cred = NULL;

temp_cred = proc_cred_hold(proc_ptr);
if(temp_cred != NULL ) {
// Do stuff
crfree(temp_cred);
}

If you are using crfree(), contact your support representative and get them your dump so they can file an issue and get folks involved... it isn't a known issue.

Don

PS -- whiteknight -- JAGag35944 does have a memory leak fix (for 11.11, 11.23 and 11.31) but this is a completely and totally unrelated issue [networking code instead of PM, completely different arena, nothing to do with credentials in any form --- just packet handling issues]. I seriously doubt acquiring this patch in an early form would be meaningful in addressing the problem.