Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 16
  1. #1
    cPanel Partner NOC This forum account has been confirmed by cPanel staff to represent a vendor.cPanel Partner NOC Badge
    Join Date
    Nov 2001
    Location
    San Clemente, Ca
    Posts
    703

    Default Anybody Seen VIM runaway!

    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!

  2. #2
    Member
    Join Date
    Apr 2002
    Posts
    15

    Default

    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/

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    May 2002
    Posts
    122

    Default

    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

  4. #4
    Member
    Join Date
    Aug 2001
    Posts
    839

    Default

    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
    ..............................

  5. #5
    cPanel Partner NOC This forum account has been confirmed by cPanel staff to represent a vendor.cPanel Partner NOC Badge
    Join Date
    Nov 2001
    Location
    San Clemente, Ca
    Posts
    703

    Default

    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!

  6. #6
    Member
    Join Date
    May 2002
    Posts
    21

    Default random?

    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.

  7. #7
    Member
    Join Date
    Sep 2001
    Posts
    157

    Default

    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

  8. #8
    Member
    Join Date
    Oct 2001
    Posts
    90

    Default

    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

  9. #9
    cPanel Partner NOC This forum account has been confirmed by cPanel staff to represent a vendor.cPanel Partner NOC Badge
    Join Date
    Nov 2001
    Location
    San Clemente, Ca
    Posts
    703

    Default

    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!

  10. #10
    Member
    Join Date
    Apr 2002
    Posts
    15

    Default Cron script to take care of the issue.....

    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&amp {
    my ($x1, $x2) = split();
    chomp $x2;
    my ($pid, $trash) = split(/ /, $x2);
    if (length(&$pid&amp & 0) {
    `kill -9 $pid`;
    }
    }
    close(VIMTHRDS);

    `rm -f /tmp/vim.$$`;
    David Barnes
    NetEndeavors, Inc. -- http://NetEndeavors.Net/

  11. #11
    cPanel Partner NOC This forum account has been confirmed by cPanel staff to represent a vendor.cPanel Partner NOC Badge
    Join Date
    Nov 2001
    Location
    San Clemente, Ca
    Posts
    703

    Default

    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!

  12. #12
    Member
    Join Date
    Apr 2002
    Posts
    15

    Default

    Shaun,

    The triple grep command should prevent attached vim processes from being killed (note the grep for both & 1 & and & ? &amp. 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/

  13. #13
    cPanel Partner NOC This forum account has been confirmed by cPanel staff to represent a vendor.cPanel Partner NOC Badge
    Join Date
    Nov 2001
    Location
    San Clemente, Ca
    Posts
    703

    Default

    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!

  14. #14
    cPanel Partner NOC cPanel Partner NOC Badge jackal's Avatar
    Join Date
    Feb 2002
    Posts
    708

    Default

    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:

  15. #15
    cPanel Partner NOC cPanel Partner NOC Badge jackal's Avatar
    Join Date
    Feb 2002
    Posts
    708

    Default

    Have you made the changes mentioned above?

    cPanel.net Support Ticket Number:

Similar Threads & Tags
Similar threads

  1. viewing umlauts in vim
    By chilihost in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-14-2006, 10:50 AM
  2. vim program -Syntax
    By jijesh in forum New User Questions
    Replies: 3
    Last Post: 09-08-2005, 06:18 AM
  3. Using VIM - how, not installed ?
    By jeroman8 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-02-2005, 05:47 AM
  4. VIM Urgent
    By jackal in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 06-28-2003, 07:49 AM
  5. vim
    By melmelmel in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-24-2002, 07:11 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube