anybody ever seen VIM consume 99% of the cpu when a user close's his session with out logging out. I'm seeing this on 3 machines now and it seams to be happening more and more. Wondering if anybody knew of a fix...
anybody ever seen VIM consume 99% of the cpu when a user close's his session with out logging out. I'm seeing this on 3 machines now and it seams to be happening more and more. Wondering if anybody knew of a fix...
Shaun Reitan
NDCHost.com - cPlicensing.net - ProVPS.com
Contact us for your cPanel Licensing needs! We Price Match, We provide Support, We take care of our customers!
Happened to me yesterday on a brand new RH 7.3 machine -- don't know why -- hope it doesn't happen again....
David Barnes
NetEndeavors, Inc. -- http://NetEndeavors.Net/
I would think it would happen if someone vi's a very large file. I happened to intentionally vi a 500M file the other day and got very high util opening and writing the file.
AlphaOmegaHosting.Com
Shared - Windows - Dedicated - Server Management
High Quality Dell Servers located at Peer1 Datacenter
doesn't even matter about the file size.
Vim runs away into the sunset and will run at 99.9% until it's killed..... a sentry program listening for such insanity is something you should definitely employ on a shared box. At least until they fix this, and detach the process from memory if a user is disconnected or somehow logs out without halting the lovely Vim session.
This would never have happened with the sexy as hell core VI
![]()
..............................
http://www.fastservers.net/
travis@fastservers.net
..............................
the point is, is that this is happening on random machines... I have man redhat machines which are fine. and now it's happening to 4 of my machines (that i have noticed so far).
Somebody should submit a bug to redhat see what they say.
I have totally removed VIM and reinstalled it also with no change
Shaun Reitan
NDCHost.com - cPlicensing.net - ProVPS.com
Contact us for your cPanel Licensing needs! We Price Match, We provide Support, We take care of our customers!
I have experienced this at random intervals from time to time on all my cpanel machines... never seen the problem outside of my cpanel machines.. so either my other machines don't get enough usage, or it's something cpanel specific... doubtful it's related to cpanel.. but who knows.
Anyhow, definately recommend writing a script that checks for it and kills it off.. just be careful not to kill real vi instances that users are working with that happen to be in startup mode, which can shoot the usage up to 99% for just a second.
This has happened to us 3-4 times in the last year, a couple of which actually took the server to its knees. Vim shouldn't do that![]()
This happened to me today and I killed the process but I am concerned that this happens. Is there a way to disable VIM?
Thanks!
Curt
Curt
http://HostingDirect.com
http://SwishHost.com
http://NameRocket.com
Disable VIM!!!!! Are you nutz then you'd have to use like Pico or somthing.. Ewwwwww.![]()
Ya you can disable it if you like, you'll probably piss off some clients though.
if you really wanted to you could remove the packages or just can do a chmod -x /usr/bin/vim
Shaun Reitan
NDCHost.com - cPlicensing.net - ProVPS.com
Contact us for your cPanel Licensing needs! We Price Match, We provide Support, We take care of our customers!
Guys / Gals,
Here's the script I've created to eliminate the problem on our servers -- I've called it killvim and put it in the /scripts directory and scheduled it as a cron job to run periodically.... Use it if you care to.....
#!/usr/bin/perl
`ps -ef | grep & vim & | grep & 1 & | grep & ? & & /tmp/vim.$$`;
open(VIMTHRDS, &&/tmp/vim.$$&
while(&VIMTHRDS&{
my ($x1, $x2) = split();
chomp $x2;
my ($pid, $trash) = split(/ /, $x2);
if (length(&$pid&& 0) {
`kill -9 $pid`;
}
}
close(VIMTHRDS);
`rm -f /tmp/vim.$$`;
David Barnes
NetEndeavors, Inc. -- http://NetEndeavors.Net/
NetEndeavors: that's great and all but from what it looks like your killing off every vim process. I'd hate to be the one who awnsers the phone when a client who was writing a script on the server using vim calls because the process was killed.
Well this morning i decided to go the extra step and find out what the hell is happening. I'm assuming this is a bug.
I found that the problem is in /usr/bin/vim. Their are 2 ways to run vim or vi. by typeing vi or vim. vi exists in /bin/vi and vim exists in /usr/bin/vim. from what i can tell vim comes from vim-enhanced and /bin/vi comes from vim-minimal.
What i did to fix this problem? i removed all vim packages. and reinstalled only 2 of them. I'm not sure what the diffrence is between vim-minimal and vim-enhanced. I'm assuming it's just extra crap that vim has to offer. so this is what i did. i just created a symbolic link from /usr/bin/vim -& /bin/vi.
This should fix the problem.
Steps to Fix this.
1. rpm -e vim-common vim-enhanced vim-minimal
2. download the original vim-common and vim-minimal packages from redhat.
3. rpm -ivh vim-common-x.x-x.i386.rpm vim-minimal-x.x-x.i386.rpm
4. ln -s /bin/vi /usr/bin/vim
That should do it...
Shaun Reitan
NDCHost.com - cPlicensing.net - ProVPS.com
Contact us for your cPanel Licensing needs! We Price Match, We provide Support, We take care of our customers!
Shaun,
The triple grep command should prevent attached vim processes from being killed (note the grep for both & 1 & and & ? &. Someone who knows pattern matching in perl better than I could probably rewrite this better, but if you look at the vim processes that are running and attached vs. those that are no longer attached to a session, you'll see that this does appear to work....
Comments??
But hey your approach is worth investigating -- I think we both agree that once it happens to ya', you'll be looking for a fix!!!
David Barnes
NetEndeavors, Inc. -- http://NetEndeavors.Net/
NetEndeavors: Ahhh i see, i glaced over the code quckly, just saw it going thru killing process's.
So far on the machine i &Patched& it seams to be working fine. No hung up VIM process's. Sombody should probably submit a redhat Bug for VIM-Enhanced... (i hate submitting bugs to redhat)
Shaun Reitan
NDCHost.com - cPlicensing.net - ProVPS.com
Contact us for your cPanel Licensing needs! We Price Match, We provide Support, We take care of our customers!
Man a post from the dead. Has anyone figured out what to do about this?
Really need some help here same thing happening to us on 2 servers.
cPanel.net Support Ticket Number:
Have you made the changes mentioned above?
cPanel.net Support Ticket Number: