1832857 Members
3275 Online
110048 Solutions
New Discussion

Bus error during su -

 
Radek.B
New Member

Bus error during su -

Hi,
I've problem with su - under informix user.
Using "ksh" (etc/passwd) error message is "Memory fault" and using "sh" I can see "Logout Bus error". User profile is ok.
Any ideas ? Thx a lot
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: Bus error during su -

This has to be a problem either in user informix's .profile or in a script or program called (or sourced) from within .profile. This is very easy to test.
Do a "su informix" (without the "-") . If that works the user's .profile is the problem and you should then be able to take normal debugging steps. I almost never use the "-" version of su because I typically want to do things under cron or rc. There are usually sections of .profiles that expect the session to be interactive and will hang or cause unexpected results when stdin is not a terminal. My preferred method is to set up a separate file (e.g. /usr/local/bin/informix_env.sh) that is sourced by both my cron'ed script and the user's .profile.
If it ain't broke, I can fix that.
Radek.B
New Member

Re: Bus error during su -

su informix works. But although I replaced .profile with empty one, it was the same.
A. Clay Stephenson
Acclaimed Contributor

Re: Bus error during su -

Okay, are there any special conditions that apply to user informix in /etc/profile? You also need to look at .kshrc (if it exists).
If it ain't broke, I can fix that.
Radek.B
New Member

Re: Bus error during su -

yes there is but only basic, I'll probably need to debug whole file :(
A. Clay Stephenson
Acclaimed Contributor

Re: Bus error during su -

In your case, I would replace your /etc/profile with an original version. It's normally a bad idea to put any special conditions in /etc/profile. The only branching conditions in /etc/profile should be for user root and then anyone else. Informix's special conditions should be in his .profile or as I mentioned earlier in a file like "/usr/local/bin/informix_env.sh" that both .profile and any cron'ed script source using the shell's . (dot) operator. There should be no exits or returns in the sourced file.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Bus error during su -

As mentioned, your profiles need debugging. The only practical way to do this is to trace every step using set -x. Add the line:

set -x

at the start of /etc/profile and you will see somewhere along the way that a command or program has crashed during the processing of all the profile statements. The set -x option will be carried into all sourced settings files.


Bill Hassell, sysadmin
Radek.B
New Member

Re: Bus error during su -

Thanks all for a help, but looks like that problem is somewhere else (debug is ok). I have founded that nbuf was on 100% (fixed vaue), now it is dymanic but no help.