cancel
Showing results for 
Search instead for 
Did you mean: 

Shared Memory

SOLVED
Go to solution
Gerry Tully
Frequent Advisor

Shared Memory

I'm trying to run a program within a shared mem segment but I get the error 'trying to use shared file instead of shared memory' Also it says shmat: Permission denied. Everything else seems to be ok. Any ideas? Thanks.
Any Ideas?
9 REPLIES
Steven E. Protter
Exalted Contributor

Re: Shared Memory

Details are needed to help you.

Waht kind of program, what is it supposed to do.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Gerry Tully
Frequent Advisor

Re: Shared Memory

It is a Computron program related to a database that runs in it's own memory window.The first error that comes up is shmat failed for shared memory id 1faf, errno = 13.
Any Ideas?
Jean-Luc Oudart
Honored Contributor

Re: Shared Memory

Hi

would this thread be any help to you ?
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=98929

Rgds,
Jean-Luc
fiat lux
Gerry Tully
Frequent Advisor

Re: Shared Memory

No, sorry that link didn't help. The funny thing is that I have development server that runs the program without a problem.
Any Ideas?
Jeff Schussele
Honored Contributor
Solution

Re: Shared Memory

Hi Gerry,

shmat() is the shared memory attach function & err #13 is EACCES or permission denied.
Sounds like the user trying to attach to the segment does not have the permissions to do so.
Check the users involved and/or whether the program trying to attach is running in the same window as the program that created the segment.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jim Butler
Valued Contributor

Re: Shared Memory

Try looking at the privgroup manpage -

you may need to allow privs to the processes

files are /etc/privgrp
/sbin/init.d/prv_grp (I think)

Anyway, if the computron program needs shared memory access, you may have to add the group in via privgrp and crank it up.

Really just a thought....

good luck
Man The Bilge Pumps!
Gerry Tully
Frequent Advisor

Re: Shared Memory

Thanks for the replies. I'm guessing it's a permission problem somewhere. Just have to find it.
Any Ideas?
Jeff Schussele
Honored Contributor

Re: Shared Memory

Hi (again) Gerry,

ALL programs that need to attach to that segment must be running in the same memory window as the program that created it.

Are you starting that computrom program using
setmemwindow -i window_id start_command
as the startup command?

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Gerry Tully
Frequent Advisor

Re: Shared Memory

Jeff, Yes, that's how I am starting it.
Any Ideas?