Tor.framework icon indicating copy to clipboard operation
Tor.framework copied to clipboard

libevent error flooding console

Open Fonta1n3 opened this issue 2 years ago • 4 comments

Jul 09 02:23:20.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.

I get the above error occasionally and it seems to get stuck and print endlessly to the point where it slows down Xcode.

Tor boots up fine, makes a network request and then this happens. Could be my internet momentarily dropping out causing the issue. I am using latest 0.4.7.13.2

Here is the beginning of my log where the first errors appear:

2023-07-09 02:36:00.605582-0500 FullyNoded[37907:901416] [connection] nw_socket_handle_socket_event [C8.1.1.1.2:4] Socket SO_ERROR [9: Bad file descriptor]
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
2023-07-09 02:36:00.615966-0500 FullyNoded[37907:901416] [connection] nw_read_request_report [C8] Receive failed with error "Bad file descriptor"
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
Jul 09 02:36:00.000 [warn] Warning from libevent: Error Socket is not connected (57) while reading request.
2023-07-09 02:36:00.620328-0500 FullyNoded[37907:901416] [connection] nw_socket_get_input_frames [C8.1.1.1.2:4] recvmsg(fd 40, 1024 bytes) [57: Socket is not connected]

Then my log seems to endlessly print like so: Screenshot 2023-07-09 at 02 29 47

Fonta1n3 avatar Jul 09 '23 07:07 Fonta1n3

Could it be that you had two instances running trying to use the same ports?

tladesignz avatar Jul 17 '23 11:07 tladesignz

Could it be that you had two instances running trying to use the same ports?

No, it just happened again and I am only using one instance. Only happens when my internet connection dies and comes back.

Fonta1n3 avatar Jul 21 '23 07:07 Fonta1n3

Hm. Cannot reproduce just by cutting the network connection downstream. That must by some very specific setup you have there.

tladesignz avatar Jul 21 '23 09:07 tladesignz

Will test more and report back.

Fonta1n3 avatar Jul 21 '23 11:07 Fonta1n3

This seems to only happen when Tor is killed in the background by Apples own restrictions. If I automatically kill Tor and reboot it when the device goes into/out of background then this does not happen.

Fonta1n3 avatar May 16 '24 14:05 Fonta1n3

Oh. Haha. You tried to not stop Tor when iOS shuts down your app? Yeah, well. That doesn't work. iOS will close sockets, and when the Tor code awakes again, it's going to be very irritated about that.

tladesignz avatar May 16 '24 15:05 tladesignz

Yea I thought catalyst running on Mac would allow me to run in background, forgot that only works on macOS.

Fonta1n3 avatar May 16 '24 17:05 Fonta1n3