How to kill unkillable Python-processes running as root
Posted
by
Andrei
on Super User
See other posts from Super User
or by Andrei
Published on 2012-04-05T10:51:54Z
Indexed on
2012/04/05
11:33 UTC
Read the original article
Hit count: 557
I am experiencing an annoying problem with sshuttle running it on 10.7.3, MBA with the latest firmware update -- after I stop it (ctrl+c twice), or loose connection, or close the lid, I cannot restore it until I restart the system. The restarting takes notably more time, than it would normally take. I have tried to flush ipfw rules - not helping.
Could you advice me how to restore sshuttle connection (without restarting os)?
The following processes remain running as root, which I do not know how to kill (tried sudo kill -9 <pid>
with no luck):
root 14464 python ./main.py python -v -v --firewall 12296 12296
root 14396 python ./main.py python -v -v --firewall 12297 12297
root 14306 python ./main.py python -v -v --firewall 12298 12298
root 3678 python ./main.py python -v -v --firewall 12299 12299
root 2263 python ./main.py python -v -v --firewall 12300 12300
The command I use to run proxy:
./sshuttle --dns -r [email protected] 10.0.0.0/8 -vv
The last message I get trying to restore the connection:
...
firewall manager: starting transproxy.
s: Ready: 1 r=[4] w=[] x=[]
s: < channel=0 cmd=PING len=7
s: > channel=0 cmd=PONG len=7 (fullness=554)
s: mux wrote: 15/15
s: Waiting: 1 r=[4] w=[] x=[] (fullness=561/0)
>> ipfw -q add 12300 check-state ip from any to any
>> ipfw -q add 12300 skipto 12301 tcp from any to 127.0.0.0/8
>> ipfw -q add 12300 fwd 127.0.0.1,12300 tcp from any to 10.0.0.0/8 not ipttl 42 keep-state setup
>> ipfw -q add 12300 divert 12300 udp from any to 10.0.1.1/32 53 not ipttl 42
>> ipfw -q add 12300 divert 12300 udp from any 12300 to any not ipttl 42
Update:
$ ps -ax|grep python
1611 ?? 0:06.49 python ./main.py python -v -v --firewall 12300 12300
48844 ?? 0:00.05 python ./main.py python -v -v --firewall 12299 12299
49538 ttys000 0:00.00 grep python
© Super User or respective owner