Operating System - Tru64 Unix
1827487 Members
2168 Online
109965 Solutions
New Discussion

Tru64 - shmat fails with "Not enough space"

 
Miguel Silva Rentes
Regular Advisor

Tru64 - shmat fails with "Not enough space"

Hi everyone!

I'm testing an application in a Tru64 5.1B server that is currently giving me a "Not enough space" error while doing a shared memory attach.

I have another one of these servers and the same application runs perfectly without any errors. I thought it could be some kernel parameters I had to tweak in the first server (comparing the ones I had with the second server's) but after I did that the problem still persists.

Here is the kernel parameters I have from my first server (the one that gives me the error) as they exist in /etc/sysconfigtab:

vm:
swapdevice=/dev/disk/dsk0b
vm-swap-eager=1

ubc_maxpercent=100

ipc:
shm_max=4294967296
shm_min=1024
shm_mni=256
shm_seg=256
sem_mni=64
sem_msl=32

proc:
max_proc_per_user=512
per_proc_stack_size=509715200
max_per_proc_stack_size=735544320
per_proc_data_size=6342177280
max_per_proc_data_size=60737418240
num_wait_queues=256
num_timeout_hash_queues=256
max_per_proc_address_space=42949672960
per_proc_address_space=42949672960

And ulimit -a gives me:

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 6193533
stack(kbytes) 497769
memory(kbytes) 3045272
coredump(blocks) unlimited
nofiles(descriptors) 4096
vmemory(kbytes) 41943040

Reading in the man for shmat, the description I have for the error I get is this one:

"[ENOMEM]
There was not enough data space available to attach the shared memory
region.

[Tru64 UNIX] The shmid refers to a segmented shared memory region
whose size is not a multiple of SSM_SIZE and where not enough data
space is available for the rounded-up size."

So, do I need to increase any kernel parameter(s) to solve this problem? And if so, which one(s)? Any help with be greatly appreciated.

Best regards,

Miguel Rentes
5 REPLIES 5
Martin Moore
HPE Pro

Re: Tru64 - shmat fails with "Not enough space"

How big is the shared memory region you're trying to attach? Can you post the line of code with the shmat() call?

Martin
I work for HPE
A quick resolution to technical issues for your HPE products is just a click away HPE Support Center
See Self Help Post for more details

Accept or Kudo

Mark Poeschl_2
Honored Contributor

Re: Tru64 - shmat fails with "Not enough space"

The output of 'ipcs -m -a' right before you run the offending program would be useful also.
Miguel Silva Rentes
Regular Advisor

Re: Tru64 - shmat fails with "Not enough space"

Thanks for your help! I solved the problem by setting the JVM parameters for the stack and heap sizes of my java application that uses a C++ bridge to do a shmat. The problem was that I hadn't defined any of these settings and now that I have done it, the problem no longer persists. These were the parameters I set:

-fast64 -Xglobal256M -Xms16M -Xmx128M

Thanks anyway for your help!

Regards,

Miguel Rentes
Steven Schweda
Honored Contributor

Re: Tru64 - shmat fails with "Not enough space"

> [...] an application [...]

> [...] my java application [...]

Perhaps if the original problem description
had mentioned Java, someone might have
suggested something related to Java.
Miguel Silva Rentes
Regular Advisor

Re: Tru64 - shmat fails with "Not enough space"

Well, I didn't know the problem was in the Java settings until I started changing those settings. My first guess was that the problem was in the kernel resources, that's why I didn't mention Java at all. But I'm glad the problem was simpler to solve.

Thanks anyway,

Miguel Rentes