hannesm / jackline

minimalistic secure XMPP client in OCaml
BSD 2-Clause "Simplified" License
250 stars 20 forks source link

Process hangs when restarting tor #149

Open tg-x opened 7 years ago

tg-x commented 7 years ago

When jackline is run via torsocks and tor is restarted, it gets into an infinite loop of recvfrom() syscalls, causing the process to hang and use 100% CPU.

hannesm commented 7 years ago

thanks for the report, I'll try to reproduce this and fix it soon... but this may not happen this year

hannesm commented 6 years ago

Sorry for getting back to you so late.

I tried this setup: torsocks jackline, then stop and start my tor process. What happened was that I got a connection error, and jackline reconnected: * async error * Xmlstream.IStream(M).XmlError("Xmllexer_generic.Make(S)(E)(X).Exn_EOF")

I use Tor 0.2.9.9 and Torsocks 2.1.0 (on FreeBSD if this matters) -- do you have other tor/torsocks versions? When this happens, is jackline "only connected" or is it while data is supposed to be incoming (i.e. a roster during which the connection is terminated)?

tg-x commented 5 years ago

Tried it again, now it survives a tor process restart.

However, the following still causes a hang with 100% cpu use:

  1. a firewall rule dropping all packets to the tor socks port
  2. torksocks jackline then /connect