View previous topic :: View next topic |
Author |
Message |
chardros Tux's lil' helper
Joined: 18 Apr 2002 Posts: 136 Location: Andromeda
|
Posted: Mon Aug 26, 2002 10:35 pm Post subject: VIM hangs and pegs CPU as non-root |
|
|
Subject says it all... if I run vim as any user other than root, it just hangs and pegs my CPU at 99.9%. If I run as root, it works perfectly. Anyone run into anything similar to this? (It occurs both in an X/E/Gnome Terminal within X, and at the console... GVIM works fine as any user).
Info -
vim-6.1-r10 is installed (with gtk, x bindings, etc)
kvim-6.1.141_rc1 is installed (also works fine as any user)
ls -l /usr/bin/vim returns:
-rwxr-xr-x 1 root root 1141176 Aug 23 10:27 /usr/bin/vim
Thanks in advance for any advice. |
|
Back to top |
|
|
Naan Yaar Bodhisattva
Joined: 27 Jun 2002 Posts: 1549
|
Posted: Mon Aug 26, 2002 11:40 pm Post subject: |
|
|
You can probably try "strace vim" to see what it is doing. |
|
Back to top |
|
|
chardros Tux's lil' helper
Joined: 18 Apr 2002 Posts: 136 Location: Andromeda
|
Posted: Tue Aug 27, 2002 2:12 am Post subject: |
|
|
strace vim ends with this:
...
<snip>
open("/usr/X11R6/lib/X11/locale/locale.dir", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0444, st_size=27992, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0
x40b38000
read(5, "#\t$Xorg: locale.dir,v 1.3 2000/0"..., 4096) = 4096
read(5, "CALE\t\t\tfr_BE.ISO8859-15\niso8859-"..., 4096) = 4096
read(5, "CVN\nvi_VN.viscii/XLC_LOCALE\t\tvi_"..., 4096) = 4096
read(5, "v_LV.UTF-8\nen_US.UTF-8/XLC_LOCAL"..., 4096) = 4096
close(5) = 0
munmap(0x40b38000, 4096) = 0
open("/usr/X11R6/lib/X11/locale/C/XI18N_OBJS", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0444, st_size=333, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0
x40b38000
read(5, "# CATEGORY(XLC|XIM|OM)\tSHARED_LI"..., 4096) = 333
read(5, "", 4096) = 0
close(5) = 0
munmap(0x40b38000, 4096) = 0
open("/usr/X11R6/lib/X11/locale/common/xlcDef.so.2", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\10\0"..., 1024) = 10
24
fstat64(5, {st_mode=S_IFREG|0644, st_size=12196, ...}) = 0
old_mmap(NULL, 12200, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x40b38000
mprotect(0x40b3a000, 4008, PROT_NONE) = 0
old_mmap(0x40b3a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x100
0) = 0x40b3a000
close(5) = 0
brk(0x81cb000) = 0x81cb000
brk(0x81cc000) = 0x81cc000
open("/usr/X11R6/lib/X11/locale/locale.alias", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0444, st_size=48229, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0
x40b3b000
--- SIGSEGV (Segmentation fault) --- --- SIGSEGV (Segmentation fault) ---
--- SIGSEGV (Segmentation
fault) ---
--- SIGSEGV (Segmentation fault) ---
--- SIGSEGV (Segmentation fault) -
--
--- SIGSEGV (Segmentation fault) ---
--- SIGSEGV (Segmentation fault) ---
--- SI
GSEGV (Segmentation fault) ---
--- SIGSEGV (Segmentation fault) ---
--- SIGSEGV (S
egmentation fault) ---
--- SIGSEGV (Segmentation fault) ---
--- SIGSEGV (Segmentat
ion fault) ---
--- SIGSEGV (Segmentation fault) ---
--- SIGSEGV (Segmentation faul
t) ---
--- SIGSEGV (Segmentation fault) ---
--- SIGSEGV (Segmentation fault) ---
--
- SIGSEGV (Segmentation fault) ---
...
And it keeps going and going and going like that until I kill it.
Again.. it runs fine as root. I'm at a loss. |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Tue Aug 27, 2002 3:21 am Post subject: |
|
|
To try to isolate likely permission errors, could you try running strace with something like: Code: | $ strace vim 2>&1 | grep -w EACCES |
_________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
chardros Tux's lil' helper
Joined: 18 Apr 2002 Posts: 136 Location: Andromeda
|
Posted: Tue Aug 27, 2002 5:59 am Post subject: |
|
|
Thanks for the thoughts guys... turns out it was my own dumb fault. I had emerged the masked kvim... and the package.mask file stated that it conflicted with "plain vim". So I unmerged kvim, re-emerged vim and I'm golden. Thanks again for the help. |
|
Back to top |
|
|
Scott_the_Great n00b
Joined: 08 Aug 2002 Posts: 21
|
Posted: Tue Sep 03, 2002 9:51 pm Post subject: |
|
|
Luckily I didn't run into this problem, because I happened (just chance, I can assure you) to read the changelog before trying to install kvim.
However, since I *really* wanted to try it out, I spent a little time today hacking the ebuild so that it would no longer conflict with the "regular" vim. (Instead, it depends on it...)
I also changed it so that it would get kvim-6.1-rc2 instead of rc1 (which was the most recent ebuild I had...)
I just put the following ebuild (kvim-6.1.141_rc2.ebuild) in my local portage directory (specified with PORTDIR_OVERLAY in /etc/make.conf) and everything worked like a charm. It spit out a couple of strange errors, but the install directory (/var/tmp/portage/kvim-6.1.141_rc2/image) looked OK, and it merged without problem.
Basically, in the ebuild, I just manually remove all of the "conflicting" stuff from the temp install directory before the merge happens. If you want to be safe about this, I would recommend trying to do an "ebuild ... install" and then check the temp install directory to make sure it isn't going to replace any files you already have in /usr/bin... (then you must do an "ebuild ... qmerge" to actually perform the emerge...)
Also, because of the way this works, all of the vims will use the same set of help files and vimrc file (which is good, I think...)
Let me know if anyone has any problems with this, or any suggestions to make it work better.
---Scott
Code: |
# Copyright 2002 Thomas Capricelli <orzel@freehackers.org>
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /home/cvsroot/gentoo-x86/app-editors/kvim/kvim-6.1.141_rc2.ebuild,v 1.2 2002/08/14 18:36:02 murphy Exp $
inherit kde-base
need-kde 3
DEPEND=">=app-editors/vim-6.1"
RDEPEND=">=app-editors/vim-6.1"
S="${WORKDIR}/${P//_}"
DESCRIPTION="KDE editor based on vim"
SRC_URI="http://www.freehackers.org/kvim/dl/kvim-6.1.141rc2.tar.bz2"
HOMEPAGE="http://www.freehackers.org/kvim/"
LICENSE="GPL-2"
KEYWORDS="x86 sparc sparc64"
PATCHES="$FILESDIR/${P}-gcc2fix.patch"
myconf="$myconf --enable-gui=kde"
src_compile() {
kde_src_compile myconf configure
cd $S
# emake does not work
make || die
}
src_install () {
kde_src_install
# these should already exist in the standard VIM install
rm -rf $D/$PREFIX/man
rm -rf $D/$PREFIX/share
rm $D/$PREFIX/bin/vimtutor
rm $D/$PREFIX/bin/xxd
rm $D/$PREFIX/bin/vimdiff
rm $D/$PREFIX/bin/gvim
rm $D/$PREFIX/bin/ex
rm $D/$PREFIX/bin/view
rm $D/$PREFIX/bin/rview
rm $D/$PREFIX/bin/rvim
# now we move things around a little so that the kvim-specific stuff works
rm $D/$PREFIX/bin/kvim
mv $D/$PREFIX/bin/vim $D/$PREFIX/bin/kvim
rm $D/$PREFIX/bin/eview
ln -s kvim $D/$PREFIX/bin/eview
rm $D/$PREFIX/bin/evim
ln -s kvim $D/$PREFIX/bin/evim
rm $D/$PREFIX/bin/kview
ln -s kvim $D/$PREFIX/bin/kview
rm $D/$PREFIX/bin/kvimdiff
ln -s kvim $D/$PREFIX/bin/kvimdiff
rm $D/$PREFIX/bin/rkview
ln -s kvim $D/$PREFIX/bin/rkview
rm $D/$PREFIX/bin/rkvim
ln -s kvim $D/$PREFIX/bin/rkvim
}
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|