Re: Set -o Vi Causes core dump and segmentation fault
- From: Johnny Rebel <rebelATT@xxxxxxxxxxxx>
- Date: Thu, 04 Sep 2008 18:55:10 -0400
UKnicks wrote:
On Sep 4, 2:15 pm, Johnny Rebel <rebel...@xxxxxxxxxxxx> wrote:
1PW wrote:
On 09/03/2008 04:19 PM, Johnny Rebel sent:Thanks! Although some people get an icky feeling using the trace
Johnny Rebel wrote:Good theories JR. Maybe we'll get more information later on Thursday.
UKnicks wrote:Just thinking as well - vi is an alias for vim on Linux, and alias is
ALL:'set' is internal to the shell I believe - missing dependancy maybe?
We use a build and customization (B&C) process (a bunch of
scripts) to rebuild boxes after we've installed RHEL5. I believe, not
completely sure, some kernel changes are made. Problem is after we
run our B&C and try to issue a set -o vi command it causes a
segmentation fault and a core dump.
[ I just tried this myself.. I logged onto a remote box... issued a
set -o vi command and nothing happened. The next command I typed,
"ls", caused the box to kick me out. I returned to the same directory
and found a core file]
Testers have reported this doesn't occur before the B&C process. Any
ideas?
I apologize if I've left out any pertinent information. I'll try to
repost it as soon as requested.
Thanx
`ldd /bin/ksh` ? Maybe try an strace|ptrace to see where it is
yacking... Run the ptrace on echo $$ and see if you can get anything in
a log file somewhere... Just throwing some ideas out.
JR.
also an internal command. Maybe there is an issue with this somewhere?
JR.
family. :) Here is hoping the issue gets resolved!
JR.
--
Bill will have to take Linux from my cold, dead flippers.
-Tux.
OK! After a day of divide and conquer on 18 scripts we have figured
out who/what the culprit is: Apparently, if your subshell editor is
different from the parent shell's editor it causes this segmentation
fault. The offending line was : export EDITOR=emacs in our /etc/
profile. Our parent shell is bash and the editor is set (by /etc/
profile) as emacs... If you then spawn a ksh subshell ,run set -o vi,
and then type any command it causes the segmentation fault. However if
the parent shell's editor (The bash shell) is set to VI , or is unset
it doesn't cause the error. NO idea why this causes the problem as
we've had this line in our /etc/profile for YEARS now.
Very cool. Glad you have it fixed, and posted back. How come you are
using ksh on Linux anyways? I personally go the other way and put bash
on all Unix systems. That way, most of the things that get changed are
truly bugs/OS features between different flavours. Plus ksh on Unix
systems don't come with source code making it difficult to fix anything.
Just curious why the ksh?
JR.
--
Bill will have to take Linux from my cold, dead flippers.
-Tux.
.
- Follow-Ups:
- Re: Set -o Vi Causes core dump and segmentation fault
- From: UKnicks
- Re: Set -o Vi Causes core dump and segmentation fault
- References:
- Set -o Vi Causes core dump and segmentation fault
- From: UKnicks
- Re: Set -o Vi Causes core dump and segmentation fault
- From: Johnny Rebel
- Re: Set -o Vi Causes core dump and segmentation fault
- From: Johnny Rebel
- Re: Set -o Vi Causes core dump and segmentation fault
- From: UKnicks
- Set -o Vi Causes core dump and segmentation fault
- Prev by Date: Re: Set -o Vi Causes core dump and segmentation fault
- Next by Date: Re: Set -o Vi Causes core dump and segmentation fault
- Previous by thread: Re: Set -o Vi Causes core dump and segmentation fault
- Next by thread: Re: Set -o Vi Causes core dump and segmentation fault
- Index(es):
Relevant Pages
|