Author Topic: killing things  (Read 983 times)

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
killing things
« on: 1 October 2002, 02:29 »
I ran rmmod and it wont stop. I tried to kill it but it wouldnt stop. How woul i go about forcing something to die?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
killing things
« Reply #1 on: 1 October 2002, 02:50 »
Did you try pressing on the brake pedal?

Seriously, "rmmod" is for removing kernel modules, not for killing processes.  "kill" is for killing, stopping, or sending other signals to processes that are running.  If a "kill -9 PID" (where PID is the Process ID number) as root won't kill something then there could be several reasons. Usually it's a "defunct" (also known as "zombie") process.

Sometimes programs/daemons will spawn a child process which when killed or dies sometimes will not get properly cleaned up by the parent process (poorly written apps sometimes are the cause). Trying to kill the zombie child process may prove fruitless, but if you kill/stop the parent process the zombie should also disappear.

Also I have seen times if you try to kill a process that is in the act of performing I/O on removeable media that may be damaged it can hang the process and appear not to die. In those cases I find that manually ejecting the media allows the program to exit. I am sure there are more that I can think of. Most of the time killing or restarting the parent will fix you up though.

Don't know if this is what you are after. It's really hard to tell with the very limited information you gave, like what process you were trying to kill and what the process was doing when you tried to kill it.
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
killing things
« Reply #2 on: 1 October 2002, 02:52 »
i was using rmmod to remove the ipchains module (After flushing and stoppping ipchains).
rmmod wont stop trying to take out ipchains. It isnt taking up very many resources so i am doubting whether it even started rmoving the ipchains module. I tried to kill rmmod but it wouldnt stop.
rmmod has been running for about 30 min.

[ September 30, 2002: Message edited by: The Master of Reality / Bob ]

[ September 30, 2002: Message edited by: The Master of Reality / Bob ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
killing things
« Reply #3 on: 1 October 2002, 03:02 »
Ahh, in this case it would be a little different as the kernel or kernel module itself would be the "parent". Kind of hard to kill the kernel. I assume you closed the window or exited the session that you ran the rmmod command from and it still exists? This would likely be a poorly written module or some sort of kernel bug. What module are you trying to unload?
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
killing things
« Reply #4 on: 1 October 2002, 03:04 »
quote:
Originally posted by The Master of Reality / Bob:
i was using rmmod to remove the ipchains module



[ September 30, 2002: Message edited by: The Master of Reality / Bob ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
killing things
« Reply #5 on: 1 October 2002, 03:36 »
You weren't by chance trying to remove the ipchains module were you?
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
killing things
« Reply #6 on: 1 October 2002, 03:42 »
yes, is that bad?

[ September 30, 2002: Message edited by: The Master of Reality / Bob ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
killing things
« Reply #7 on: 1 October 2002, 03:42 »
Because if you were did you try and flush the chain rules first?

# ipchains -F
# ipchains -X
# rmmod ipchains
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
killing things
« Reply #8 on: 1 October 2002, 03:44 »
quote:
Originally posted by The Master of Reality / Bob:
(After flushing and stoppping ipchains)



so yes i did flush/delet and /etc/rc.d/init.d/ipchains stop
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
killing things
« Reply #9 on: 1 October 2002, 03:55 »
I just tried to get the same condition on RH7.3 and I can't get it to hang up. I did a "modprobe ipchains" to load the ipchains module, then I created a firewall chain and tried to unload the ipchains module. It told me the module was busy and couldn't unload it. Then I deleted the chains "ipchains -F;ipchains -X" and was able to unload the module. Hmmmm, from everything I've read, in the 2.4 kernel ipchains is just an emulation layer to iptables for backward compatibility and as you know iptables would be better for kernel 2.4.

But, I can say that I have in the past had kernel modules hang up rmmod when trying to remove them. I was always able to figure out why it hung though and fix the issue without having to reboot.  It's been quite some time though so I don't have any more ideas. Sorry...
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
killing things
« Reply #10 on: 1 October 2002, 04:04 »
Code: [Select]
that worked.
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'