Unable to kill process, even with root. How to diagnose?












1















There are a lot of bash processes running on my Ubuntu Linux (12.04). Even when I close the terminal they are still shown in the System Monitor.



I tried killing them as below, but they remain as it is. How to diagnose the issue, why can't they be terminated?



user$ ps aux | grep bash
user 2807 0.0 0.0 9484 56 pts/20 Ss+ Mar18 0:00 /bin/bash
user 4431 0.0 0.1 9228 5616 pts/7 Ss 10:39 0:00 bash
user 4655 0.0 0.0 4372 844 pts/7 R+ 10:45 0:00 grep --color=auto --exclude-dir=.svn bash
user 5664 0.0 0.0 12764 12 pts/6 Ss Feb05 0:01 /bin/bash
user 5812 99.6 0.1 11276 7088 ? Rs Sep22 3923:00 bash
user 6174 0.0 0.0 13016 28 pts/19 Ss+ Feb13 0:04 /bin/bash
p 10964 0.0 0.0 11700 28 pts/2 Ss+ Feb11 0:01 bash
p 11126 0.0 0.0 7952 560 pts/3 Ss+ Feb11 0:00 bash
user 18195 0.0 0.0 17320 344 pts/9 Ss+ Apr22 0:29 /bin/bash
user 21721 0.0 0.0 15924 4 pts/10 Ss+ Feb01 0:10 /bin/bash
user 22915 4.7 0.3 19400 13056 pts/22 Rs+ Jul29 3950:07 /bin/bash
user 24030 0.0 0.0 13740 4 pts/23 Ss+ Mar24 0:15 /bin/bash
user 29787 0.0 0.1 9220 5572 pts/11 Ss+ Sep23 0:00 /bin/bash
user$
user$ pkill -f bash
pkill: 10964 - Operation not permitted
pkill: 11126 - Operation not permitted
user$ sudo pkill -f bash
user$
user$ ps aux | grep bash
user 2807 0.0 0.0 9484 56 pts/20 Ss+ Mar18 0:00 /bin/bash
user 4431 0.0 0.1 9228 5616 pts/7 Ss 10:39 0:00 bash
user 4660 0.0 0.0 4372 844 pts/7 R+ 10:45 0:00 grep --color=auto --exclude-dir=.svn bash
user 5664 0.0 0.0 12764 12 pts/6 Ss Feb05 0:01 /bin/bash
user 5812 99.6 0.1 11276 7088 ? Rs Sep22 3923:21 bash
user 6174 0.0 0.0 13016 28 pts/19 Ss+ Feb13 0:04 /bin/bash
p 10964 0.0 0.0 11700 28 pts/2 Ss+ Feb11 0:01 bash
p 11126 0.0 0.0 7952 560 pts/3 Ss+ Feb11 0:00 bash
user 18195 0.0 0.0 17320 344 pts/9 Ss+ Apr22 0:29 /bin/bash
user 21721 0.0 0.0 15924 4 pts/10 Ss+ Feb01 0:10 /bin/bash
user 22915 4.7 0.3 19400 13056 pts/22 Rs+ Jul29 3950:29 /bin/bash
user 24030 0.0 0.0 13740 4 pts/23 Ss+ Mar24 0:15 /bin/bash
user 29787 0.0 0.1 9220 5572 pts/11 Ss+ Sep23 0:00 /bin/bash









share|improve this question














bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • What does kill 29787 do? What about kill -9 29787?

    – mdd
    Sep 25 '15 at 2:59











  • @MatthiasDiener sorry, didn't see the comment earlier. I rebooted PC and now the problem is gone. I had tried killing by PID but it didn't work (i think it gave no output on terminal)

    – user13107
    Sep 25 '15 at 3:57











  • First you need to stop those bash processes then kill it. Also make sure you should either be the owner of the process or a privileged user to kill a process.

    – Anwar
    Sep 25 '15 at 4:08











  • @user13107, No output in the terminal means that it worked. Even when pkill does not work, kill -9 should most definitely work when running as root.

    – Peschke
    Sep 25 '15 at 5:49
















1















There are a lot of bash processes running on my Ubuntu Linux (12.04). Even when I close the terminal they are still shown in the System Monitor.



I tried killing them as below, but they remain as it is. How to diagnose the issue, why can't they be terminated?



user$ ps aux | grep bash
user 2807 0.0 0.0 9484 56 pts/20 Ss+ Mar18 0:00 /bin/bash
user 4431 0.0 0.1 9228 5616 pts/7 Ss 10:39 0:00 bash
user 4655 0.0 0.0 4372 844 pts/7 R+ 10:45 0:00 grep --color=auto --exclude-dir=.svn bash
user 5664 0.0 0.0 12764 12 pts/6 Ss Feb05 0:01 /bin/bash
user 5812 99.6 0.1 11276 7088 ? Rs Sep22 3923:00 bash
user 6174 0.0 0.0 13016 28 pts/19 Ss+ Feb13 0:04 /bin/bash
p 10964 0.0 0.0 11700 28 pts/2 Ss+ Feb11 0:01 bash
p 11126 0.0 0.0 7952 560 pts/3 Ss+ Feb11 0:00 bash
user 18195 0.0 0.0 17320 344 pts/9 Ss+ Apr22 0:29 /bin/bash
user 21721 0.0 0.0 15924 4 pts/10 Ss+ Feb01 0:10 /bin/bash
user 22915 4.7 0.3 19400 13056 pts/22 Rs+ Jul29 3950:07 /bin/bash
user 24030 0.0 0.0 13740 4 pts/23 Ss+ Mar24 0:15 /bin/bash
user 29787 0.0 0.1 9220 5572 pts/11 Ss+ Sep23 0:00 /bin/bash
user$
user$ pkill -f bash
pkill: 10964 - Operation not permitted
pkill: 11126 - Operation not permitted
user$ sudo pkill -f bash
user$
user$ ps aux | grep bash
user 2807 0.0 0.0 9484 56 pts/20 Ss+ Mar18 0:00 /bin/bash
user 4431 0.0 0.1 9228 5616 pts/7 Ss 10:39 0:00 bash
user 4660 0.0 0.0 4372 844 pts/7 R+ 10:45 0:00 grep --color=auto --exclude-dir=.svn bash
user 5664 0.0 0.0 12764 12 pts/6 Ss Feb05 0:01 /bin/bash
user 5812 99.6 0.1 11276 7088 ? Rs Sep22 3923:21 bash
user 6174 0.0 0.0 13016 28 pts/19 Ss+ Feb13 0:04 /bin/bash
p 10964 0.0 0.0 11700 28 pts/2 Ss+ Feb11 0:01 bash
p 11126 0.0 0.0 7952 560 pts/3 Ss+ Feb11 0:00 bash
user 18195 0.0 0.0 17320 344 pts/9 Ss+ Apr22 0:29 /bin/bash
user 21721 0.0 0.0 15924 4 pts/10 Ss+ Feb01 0:10 /bin/bash
user 22915 4.7 0.3 19400 13056 pts/22 Rs+ Jul29 3950:29 /bin/bash
user 24030 0.0 0.0 13740 4 pts/23 Ss+ Mar24 0:15 /bin/bash
user 29787 0.0 0.1 9220 5572 pts/11 Ss+ Sep23 0:00 /bin/bash









share|improve this question














bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • What does kill 29787 do? What about kill -9 29787?

    – mdd
    Sep 25 '15 at 2:59











  • @MatthiasDiener sorry, didn't see the comment earlier. I rebooted PC and now the problem is gone. I had tried killing by PID but it didn't work (i think it gave no output on terminal)

    – user13107
    Sep 25 '15 at 3:57











  • First you need to stop those bash processes then kill it. Also make sure you should either be the owner of the process or a privileged user to kill a process.

    – Anwar
    Sep 25 '15 at 4:08











  • @user13107, No output in the terminal means that it worked. Even when pkill does not work, kill -9 should most definitely work when running as root.

    – Peschke
    Sep 25 '15 at 5:49














1












1








1


1






There are a lot of bash processes running on my Ubuntu Linux (12.04). Even when I close the terminal they are still shown in the System Monitor.



I tried killing them as below, but they remain as it is. How to diagnose the issue, why can't they be terminated?



user$ ps aux | grep bash
user 2807 0.0 0.0 9484 56 pts/20 Ss+ Mar18 0:00 /bin/bash
user 4431 0.0 0.1 9228 5616 pts/7 Ss 10:39 0:00 bash
user 4655 0.0 0.0 4372 844 pts/7 R+ 10:45 0:00 grep --color=auto --exclude-dir=.svn bash
user 5664 0.0 0.0 12764 12 pts/6 Ss Feb05 0:01 /bin/bash
user 5812 99.6 0.1 11276 7088 ? Rs Sep22 3923:00 bash
user 6174 0.0 0.0 13016 28 pts/19 Ss+ Feb13 0:04 /bin/bash
p 10964 0.0 0.0 11700 28 pts/2 Ss+ Feb11 0:01 bash
p 11126 0.0 0.0 7952 560 pts/3 Ss+ Feb11 0:00 bash
user 18195 0.0 0.0 17320 344 pts/9 Ss+ Apr22 0:29 /bin/bash
user 21721 0.0 0.0 15924 4 pts/10 Ss+ Feb01 0:10 /bin/bash
user 22915 4.7 0.3 19400 13056 pts/22 Rs+ Jul29 3950:07 /bin/bash
user 24030 0.0 0.0 13740 4 pts/23 Ss+ Mar24 0:15 /bin/bash
user 29787 0.0 0.1 9220 5572 pts/11 Ss+ Sep23 0:00 /bin/bash
user$
user$ pkill -f bash
pkill: 10964 - Operation not permitted
pkill: 11126 - Operation not permitted
user$ sudo pkill -f bash
user$
user$ ps aux | grep bash
user 2807 0.0 0.0 9484 56 pts/20 Ss+ Mar18 0:00 /bin/bash
user 4431 0.0 0.1 9228 5616 pts/7 Ss 10:39 0:00 bash
user 4660 0.0 0.0 4372 844 pts/7 R+ 10:45 0:00 grep --color=auto --exclude-dir=.svn bash
user 5664 0.0 0.0 12764 12 pts/6 Ss Feb05 0:01 /bin/bash
user 5812 99.6 0.1 11276 7088 ? Rs Sep22 3923:21 bash
user 6174 0.0 0.0 13016 28 pts/19 Ss+ Feb13 0:04 /bin/bash
p 10964 0.0 0.0 11700 28 pts/2 Ss+ Feb11 0:01 bash
p 11126 0.0 0.0 7952 560 pts/3 Ss+ Feb11 0:00 bash
user 18195 0.0 0.0 17320 344 pts/9 Ss+ Apr22 0:29 /bin/bash
user 21721 0.0 0.0 15924 4 pts/10 Ss+ Feb01 0:10 /bin/bash
user 22915 4.7 0.3 19400 13056 pts/22 Rs+ Jul29 3950:29 /bin/bash
user 24030 0.0 0.0 13740 4 pts/23 Ss+ Mar24 0:15 /bin/bash
user 29787 0.0 0.1 9220 5572 pts/11 Ss+ Sep23 0:00 /bin/bash









share|improve this question














There are a lot of bash processes running on my Ubuntu Linux (12.04). Even when I close the terminal they are still shown in the System Monitor.



I tried killing them as below, but they remain as it is. How to diagnose the issue, why can't they be terminated?



user$ ps aux | grep bash
user 2807 0.0 0.0 9484 56 pts/20 Ss+ Mar18 0:00 /bin/bash
user 4431 0.0 0.1 9228 5616 pts/7 Ss 10:39 0:00 bash
user 4655 0.0 0.0 4372 844 pts/7 R+ 10:45 0:00 grep --color=auto --exclude-dir=.svn bash
user 5664 0.0 0.0 12764 12 pts/6 Ss Feb05 0:01 /bin/bash
user 5812 99.6 0.1 11276 7088 ? Rs Sep22 3923:00 bash
user 6174 0.0 0.0 13016 28 pts/19 Ss+ Feb13 0:04 /bin/bash
p 10964 0.0 0.0 11700 28 pts/2 Ss+ Feb11 0:01 bash
p 11126 0.0 0.0 7952 560 pts/3 Ss+ Feb11 0:00 bash
user 18195 0.0 0.0 17320 344 pts/9 Ss+ Apr22 0:29 /bin/bash
user 21721 0.0 0.0 15924 4 pts/10 Ss+ Feb01 0:10 /bin/bash
user 22915 4.7 0.3 19400 13056 pts/22 Rs+ Jul29 3950:07 /bin/bash
user 24030 0.0 0.0 13740 4 pts/23 Ss+ Mar24 0:15 /bin/bash
user 29787 0.0 0.1 9220 5572 pts/11 Ss+ Sep23 0:00 /bin/bash
user$
user$ pkill -f bash
pkill: 10964 - Operation not permitted
pkill: 11126 - Operation not permitted
user$ sudo pkill -f bash
user$
user$ ps aux | grep bash
user 2807 0.0 0.0 9484 56 pts/20 Ss+ Mar18 0:00 /bin/bash
user 4431 0.0 0.1 9228 5616 pts/7 Ss 10:39 0:00 bash
user 4660 0.0 0.0 4372 844 pts/7 R+ 10:45 0:00 grep --color=auto --exclude-dir=.svn bash
user 5664 0.0 0.0 12764 12 pts/6 Ss Feb05 0:01 /bin/bash
user 5812 99.6 0.1 11276 7088 ? Rs Sep22 3923:21 bash
user 6174 0.0 0.0 13016 28 pts/19 Ss+ Feb13 0:04 /bin/bash
p 10964 0.0 0.0 11700 28 pts/2 Ss+ Feb11 0:01 bash
p 11126 0.0 0.0 7952 560 pts/3 Ss+ Feb11 0:00 bash
user 18195 0.0 0.0 17320 344 pts/9 Ss+ Apr22 0:29 /bin/bash
user 21721 0.0 0.0 15924 4 pts/10 Ss+ Feb01 0:10 /bin/bash
user 22915 4.7 0.3 19400 13056 pts/22 Rs+ Jul29 3950:29 /bin/bash
user 24030 0.0 0.0 13740 4 pts/23 Ss+ Mar24 0:15 /bin/bash
user 29787 0.0 0.1 9220 5572 pts/11 Ss+ Sep23 0:00 /bin/bash






bash process kill background-process






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 25 '15 at 2:49









user13107user13107

2,28993055




2,28993055





bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • What does kill 29787 do? What about kill -9 29787?

    – mdd
    Sep 25 '15 at 2:59











  • @MatthiasDiener sorry, didn't see the comment earlier. I rebooted PC and now the problem is gone. I had tried killing by PID but it didn't work (i think it gave no output on terminal)

    – user13107
    Sep 25 '15 at 3:57











  • First you need to stop those bash processes then kill it. Also make sure you should either be the owner of the process or a privileged user to kill a process.

    – Anwar
    Sep 25 '15 at 4:08











  • @user13107, No output in the terminal means that it worked. Even when pkill does not work, kill -9 should most definitely work when running as root.

    – Peschke
    Sep 25 '15 at 5:49



















  • What does kill 29787 do? What about kill -9 29787?

    – mdd
    Sep 25 '15 at 2:59











  • @MatthiasDiener sorry, didn't see the comment earlier. I rebooted PC and now the problem is gone. I had tried killing by PID but it didn't work (i think it gave no output on terminal)

    – user13107
    Sep 25 '15 at 3:57











  • First you need to stop those bash processes then kill it. Also make sure you should either be the owner of the process or a privileged user to kill a process.

    – Anwar
    Sep 25 '15 at 4:08











  • @user13107, No output in the terminal means that it worked. Even when pkill does not work, kill -9 should most definitely work when running as root.

    – Peschke
    Sep 25 '15 at 5:49

















What does kill 29787 do? What about kill -9 29787?

– mdd
Sep 25 '15 at 2:59





What does kill 29787 do? What about kill -9 29787?

– mdd
Sep 25 '15 at 2:59













@MatthiasDiener sorry, didn't see the comment earlier. I rebooted PC and now the problem is gone. I had tried killing by PID but it didn't work (i think it gave no output on terminal)

– user13107
Sep 25 '15 at 3:57





@MatthiasDiener sorry, didn't see the comment earlier. I rebooted PC and now the problem is gone. I had tried killing by PID but it didn't work (i think it gave no output on terminal)

– user13107
Sep 25 '15 at 3:57













First you need to stop those bash processes then kill it. Also make sure you should either be the owner of the process or a privileged user to kill a process.

– Anwar
Sep 25 '15 at 4:08





First you need to stop those bash processes then kill it. Also make sure you should either be the owner of the process or a privileged user to kill a process.

– Anwar
Sep 25 '15 at 4:08













@user13107, No output in the terminal means that it worked. Even when pkill does not work, kill -9 should most definitely work when running as root.

– Peschke
Sep 25 '15 at 5:49





@user13107, No output in the terminal means that it worked. Even when pkill does not work, kill -9 should most definitely work when running as root.

– Peschke
Sep 25 '15 at 5:49










1 Answer
1






active

oldest

votes


















0














Do not you think that you can not kill bash in your system? You run an application/program in bash and you can kill a program that runs in bash. Now you find all processes ID programs that run in bash.
as you showed on your terminal:




> user    4660  0.0  0.0   4372   844 pts/7    R+   10:45   0:00 grep
> --color=auto --exclude-dir=.svn bash





Try to kill that process:



sudo kill 4660


or



sudo kill  -9 4660


let me know what happeens






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f231940%2funable-to-kill-process-even-with-root-how-to-diagnose%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Do not you think that you can not kill bash in your system? You run an application/program in bash and you can kill a program that runs in bash. Now you find all processes ID programs that run in bash.
    as you showed on your terminal:




    > user    4660  0.0  0.0   4372   844 pts/7    R+   10:45   0:00 grep
    > --color=auto --exclude-dir=.svn bash





    Try to kill that process:



    sudo kill 4660


    or



    sudo kill  -9 4660


    let me know what happeens






    share|improve this answer




























      0














      Do not you think that you can not kill bash in your system? You run an application/program in bash and you can kill a program that runs in bash. Now you find all processes ID programs that run in bash.
      as you showed on your terminal:




      > user    4660  0.0  0.0   4372   844 pts/7    R+   10:45   0:00 grep
      > --color=auto --exclude-dir=.svn bash





      Try to kill that process:



      sudo kill 4660


      or



      sudo kill  -9 4660


      let me know what happeens






      share|improve this answer


























        0












        0








        0







        Do not you think that you can not kill bash in your system? You run an application/program in bash and you can kill a program that runs in bash. Now you find all processes ID programs that run in bash.
        as you showed on your terminal:




        > user    4660  0.0  0.0   4372   844 pts/7    R+   10:45   0:00 grep
        > --color=auto --exclude-dir=.svn bash





        Try to kill that process:



        sudo kill 4660


        or



        sudo kill  -9 4660


        let me know what happeens






        share|improve this answer













        Do not you think that you can not kill bash in your system? You run an application/program in bash and you can kill a program that runs in bash. Now you find all processes ID programs that run in bash.
        as you showed on your terminal:




        > user    4660  0.0  0.0   4372   844 pts/7    R+   10:45   0:00 grep
        > --color=auto --exclude-dir=.svn bash





        Try to kill that process:



        sudo kill 4660


        or



        sudo kill  -9 4660


        let me know what happeens







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 26 '15 at 10:04









        AnwarAnwar

        1




        1






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f231940%2funable-to-kill-process-even-with-root-how-to-diagnose%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            サソリ

            広島県道265号伴広島線

            Setup Asymptote in Texstudio