NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

track down why malloc fails



I have a /bin/sh script that runs successfully when run under my own account, 
but fails in malloc when invoked remotely via ssh under another account. 
I would like to understand why, because there's no reason the job should 
fail for lack of memory; it's only running 'svn commit'.  

I added some debugging output to my script.  'ulimit' reports "unlimited".  
MALLOC_OPTIONS=X confirms that malloc fails.  These commands:

vmstat
sysctl -a | grep mem
swapctl -sm

produce: 

procs    memory      page                       disks      faults      cpu
r b w    avm    fre  flt  re  pi   po   fr   sr f0 m0 w0   in   sy  cs us sy id
0 0 0 151032  11988   16   2   0    0    0    5  0  0  5  115  247  30  0  0 100
kern.memlock = 1
kern.memlock_range = 1
kern.memory_protection = 1
vm.nkmempages = 16229
vm.bufmem = 7504896
vm.bufmem_lowater = 4984320
vm.bufmem_hiwater = 39874560
hw.physmem = 265908224
hw.usermem = 262189056
hw.physmem64 = 265908224
hw.usermem64 = 262189056
machdep.biosbasemem = 639
machdep.biosextmem = 259036
proc.curproc.rlimit.memoryuse.soft = 251637760
proc.curproc.rlimit.memoryuse.hard = 251637760
proc.curproc.rlimit.memorylocked.soft = 83879253
proc.curproc.rlimit.memorylocked.hard = 251637760
total: 756 MBytes allocated = 32 MBytes used, 723 MBytes available

How to track down why the second account cannot allocate the memory?  

Many thanks.  

--jkl


Home | Main Index | Thread Index | Old Index