I'm also attaching the first 200 lines of the tsocks debug log. Note that once the select call starts taking 100% CPU, it keeps repetitively keeps generating debug messages as shown in the log.
18:19:49 libtsocks(15995): Got connection request 18:19:49 libtsocks(15995): Can't access /home/arnold/.tsocks.conf, using /etc/tsocks.conf instead. 18:19:49 libtsocks(15995): using /etc/tsocks.conf as configuration file 18:19:49 libtsocks(15995): New network entry for 192.168.0.0 going to 0x024ad250 18:19:49 libtsocks(15995): New network entry for 10.0.0.0 going to 0x024ad280 18:19:49 libtsocks(15995): New server structure from line 28 in configuration file going to 0x024ad2b0 18:19:49 libtsocks(15995): New network entry for 150.0.0.0 going to 0x024ad2f0 18:19:49 libtsocks(15995): New network entry for 150.1.0.0 going to 0x024ad320 18:19:49 libtsocks(15995): New network entry for 127.0.0.0 going to 0x024ad010 18:19:49 libtsocks(15995): First lineno for first path is 28 18:19:49 libtsocks(15995): Call to getpeername for fd 5 18:19:49 libtsocks(15995): Got connection request for socket 5 to 61.12.4.27 18:19:49 libtsocks(15995): Picking appropriate server for 61.12.4.27 18:19:49 libtsocks(15995): Checking SOCKS server 10.1.7.25 18:19:49 libtsocks(15995): Server can reach 150.1.0.0/255.255.0.0 18:19:49 libtsocks(15995): Server can reach 150.0.0.0/255.255.0.0 18:19:49 libtsocks(15995): Picked server 127.0.0.1 for connection 18:19:49 libtsocks(15995): Beginning handle loop for socket 5 18:19:49 libtsocks(15995): In request handle loop for socket 5, current state of request is 0 18:19:49 libtsocks(15995): Connecting to 127.0.0.1 port 8000 18:19:49 libtsocks(15995): Connect returned -1, errno is 115 18:19:49 libtsocks(15995): Connection in progress 18:19:49 libtsocks(15995): Handle loop completed for socket 5 in state 1, returning 115 18:19:49 libtsocks(15995): Intercepted call to select with 6 fds, 0x951d1670 0x951d16f0 0x951d1770, timeout 024a9e40 18:19:49 libtsocks(15995): Checking requests for socks enabled socket 5 18:19:49 libtsocks(15995): Socket 5 was set for events 18:19:49 libtsocks(15995): Checking socket 5 for events 18:19:49 libtsocks(15995): Socket had write event 18:19:49 libtsocks(15995): Beginning handle loop for socket 5 18:19:49 libtsocks(15995): In request handle loop for socket 5, current state of request is 1 18:19:49 libtsocks(15995): Connecting to 127.0.0.1 port 8000 18:19:49 libtsocks(15995): Connect returned 0, errno is 115 18:19:49 libtsocks(15995): Socket 5 connected to SOCKS server 18:19:49 libtsocks(15995): In request handle loop for socket 5, current state of request is 2 18:19:49 libtsocks(15995): Constructing V5 method negotiation 18:19:49 libtsocks(15995): In request handle loop for socket 5, current state of request is 3 18:19:49 libtsocks(15995): Writing to server (sending 4 bytes) 18:19:49 libtsocks(15995): Sent 4 bytes of 4 bytes in buffer, return code is 0 18:19:49 libtsocks(15995): In request handle loop for socket 5, current state of request is 7 18:19:49 libtsocks(15995): Receiving reply to SOCKS V5 method negotiation 18:19:49 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:49 libtsocks(15995): Reading from server (expecting 2 bytes) 18:19:49 libtsocks(15995): Received 0 bytes of 2 bytes expected, return code is 11 18:19:49 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 11 18:19:49 libtsocks(15995): Checking socket 5 for events 18:19:49 libtsocks(15995): Socket had write event 18:19:49 libtsocks(15995): Beginning handle loop for socket 5 18:19:49 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:49 libtsocks(15995): Reading from server (expecting 2 bytes) 18:19:49 libtsocks(15995): Received 2 bytes of 2 bytes expected, return code is 0 18:19:49 libtsocks(15995): In request handle loop for socket 5, current state of request is 8 18:19:49 libtsocks(15995): Constructing V5 connect request 18:19:49 libtsocks(15995): In request handle loop for socket 5, current state of request is 3 18:19:49 libtsocks(15995): Writing to server (sending 10 bytes) 18:19:49 libtsocks(15995): Sent 10 bytes of 10 bytes in buffer, return code is 0 18:19:49 libtsocks(15995): In request handle loop for socket 5, current state of request is 11 18:19:49 libtsocks(15995): Receiving reply to SOCKS V5 connect request 18:19:49 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:49 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:49 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 11 18:19:49 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 11 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5 18:19:50 libtsocks(15995): In request handle loop for socket 5, current state of request is 4 18:19:50 libtsocks(15995): Reading from server (expecting 10 bytes) 18:19:50 libtsocks(15995): Peer has shutdown but we only read 0 of 10 bytes. 18:19:50 libtsocks(15995): Received 0 bytes of 10 bytes expected, return code is 107 18:19:50 libtsocks(15995): Handle loop completed for socket 5 in state 4, returning 107 18:19:50 libtsocks(15995): Checking socket 5 for events 18:19:50 libtsocks(15995): Socket had write event 18:19:50 libtsocks(15995): Beginning handle loop for socket 5

