Operating System - HP-UX
1826714 Members
2680 Online
109702 Solutions
New Discussion

ENOMEM from mmap() on HP-UX/IA 11.31

 
Albert Chin-A-Young
Occasional Contributor

ENOMEM from mmap() on HP-UX/IA 11.31

We've built clamav-0.103.2 on HP-UX/IA 11.32 with GCC 4.9.4. When running  it, we're getting ENOMEM from mmap(). The calls to mmap() are mmap(NULL, <len>, PROT_READ | PROT_WRITE, MAP_PRIVATE | ANONYMOUS_MAP, -1, 0). We have

maxssiz 8388608
shmmax 294967296

$ limit

cputime unlimited
filesize unlimited
datasize 4095MB
stacksize 8MB
coredumpsize 2047MB
resident unlimited
descriptors 2048
addressspace unlimited
cachedthreads 1100
aiooperations unlimited
aiomemorylocked unlimited
RSESTACK 8388608

I read through https://community.hpe.com/t5/Languages-and-Scripting/Problem-with-mmap-function/td-p/4987395#.YMzAy1mYXJ_ and decreased maxssiz (from 128MB -> 8MB) and bumped shmmax but that didn't seem to help If I look at the process listing before the program terminates, I see:

UID   PID  PPID PRI  SZ    VSZ     TIME COMMAND
  0 16211 16011 239 894 835600 00:01:46 clamscan

Should I be modify some other tunable?