2

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 andrei@example.com 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 -ajx | grep python
root            1611     1  1611 ffffff800d8b4e60    0 Us     ??    0:06.49 python ./main.py python -v -v --firewall 12300 12300
root           48844     1 48844 ffffff800d8b3b20    0 Us     ??    0:00.05 python ./main.py python -v -v --firewall 12299 12299
andrei         58541 55898 58540 ffffff800d8b40a0    2 R+   s000    0:00.01 grep python
Andrei
  • 10,918
  • 12
  • 76
  • 110
  • WJat does `ps -aux|grep python` shows? – ypercubeᵀᴹ Apr 04 '12 at 22:14
  • @ypercube Now it is slightly different, but still there are few unkillable Python-processes forcing me to restart the system. See updated question (the command adjusted for osx). – Andrei Apr 05 '12 at 07:06
  • 3
    This should probably be a question for superuser – Etienne Perot Apr 05 '12 at 07:08
  • 2
    No `u` flag? I haven't used osx but there has to be a way to find more info about the state of processes. And I agree with @Etienne, this probably fits better at superuser. – ypercubeᵀᴹ Apr 05 '12 at 07:09
  • 1
    I agree that it is more superuser question, but sshuttle is a Python script and there is a lot more python programmers here than on superuser. It will take ages to get an answer there. I've already tried mailing list for sshuttle and asking the author directly - no answer. Here is a man page for `ps`: http://www.unix.com/man-page/OSX/1/ps/ – Andrei Apr 05 '12 at 07:54
  • Not sure if this is the right flag but can you run `ps -ajx | grep python`? We need to see the state of the processes. Are they "sleeping"? – ypercubeᵀᴹ Apr 05 '12 at 11:35
  • 1
    superuser.com: if it's alive in your PC, we can kill it. – karlphillip Apr 05 '12 at 17:34
  • 18 views, 0 comments/answers http://superuser.com/questions/408837/how-to-kill-unkillable-python-processes-running-as-root – Andrei Apr 06 '12 at 10:12
  • 1
    From you link, it appears that the `U` in `Us` means "uninterruptible wait". In short, you can't kill those. They are perhaps waiting for some I/O. Someone expert on Linux may have some good advice. – ypercubeᵀᴹ Apr 07 '12 at 00:28
  • 2
    Or to be exact, you can send them a signal with `kill` but the signal is not delivered to the process until it moves from the I/O queue to the Runnable processes queue. – ypercubeᵀᴹ Apr 07 '12 at 00:39

0 Answers0