1820243 Members
2507 Online
109621 Solutions
New Discussion юеВ

Re: memory fault

 
C R S
Occasional Advisor

memory fault

Is there a known bug in 11.23 when trying to su commands in boot scripts?

we have an oracle.rc script that runs during boot up and works just fine on our 11.11 boxes. But on 11.23 boxes, it creates a memory fault.

/sbin/rc4.d/S400oracle.rc[130]: 7862 Memory fault

that line of code is the following:

su "${ORAUSER}" -c "${ORACLE_HOME}/bin/orastart

as I test I put in another simple su command which also produced a memory fault.

TIA

CRS

10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: memory fault

Shalom,

I've always hard coded the username but I know of know bug in this functionality.

Put a set -x in the oracle startup script, the one that S400oracle.rc points to and put the output in a file. You will likely find the line number that is giving you trouble. Put a set -x in orastart as well.

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
A. Clay Stephenson
Acclaimed Contributor

Re: memory fault

Note that you are missing a " at the end. I assume that ${ORAUSER} and ${ORACLE_HOME} are defined and that you are not depending upon the .profile entries for those values.
If it ain't broke, I can fix that.
C R S
Occasional Advisor

Re: memory fault

Hi,
the missing " was a copy/paste error in this thread.

I just want to note that once the system comes up, if I log in as root and run /sbin/rc4.d/S400oracle.rc start that it runs successfully and our oracle instance and listener start without issue.

I have vreifies that the orastart script never gets run which is why I have determined that is is a problem with the "su" command.
A. Clay Stephenson
Acclaimed Contributor

Re: memory fault

But that actually makes perfect sense. Unless your rc'ed command explicitly sets and exports ${ORAUSER} and ${ORACLE_HOME} then these values are undefined.

You might try putting a set -x in your rc script so that you can see the arguments.

On my 11.23 box, even su "" -c "" doesn't dump core so I don't think that the problem is directly related to su. By any chance, are you running something other than the POSIX shell?
If it ain't broke, I can fix that.
C R S
Occasional Advisor

Re: memory fault

Please don't get caught up on ORACLE_HOME and ORAUSER, those definitely get set.

here is the output with the set -x


-CRS
C R S
Occasional Advisor

Re: memory fault

this is very interesting. the Oracle user is set up to use the bash shell. When I changed the oracle user to use posix, it worked like a charm.

However, this exact script works on 11.11 where the oracle user is setup to use bash. so I wonder what the difference is, or maybe its an issue with the version of bash 11.23 is using.

The problem is I need to get around this problem without changing the default shell for the oracle user.

any ideas?

-CRS
A. Clay Stephenson
Acclaimed Contributor

Re: memory fault

Somehow I thought this was the result of running that famous, trouble-free, absolutely wonderful shell.
If it ain't broke, I can fix that.
Dennis Handly
Acclaimed Contributor

Re: memory fault

If you had a core file, it would point right at the executable. As it is, it is either su(1) or a shell (bash).
C R S
Occasional Advisor

Re: memory fault

well, I never said a core was created. I don't think one was produced. I did find and did not see any core files.
Dennis Handly
Acclaimed Contributor

Re: memory fault

>did not see any core files.

Is there a core directory in ~${ORAUSER}?
Or ulimit -c in .profile there?