tor-android icon indicating copy to clipboard operation
tor-android copied to clipboard

crashes on slow devices when obtaining the control socket's file descriptor

Open cyBerta opened this issue 3 years ago • 2 comments

Testing with an ancient Samsung Galaxy S (!), I saw nullpointer exceptions, when attempting to obtain the filedescriptor of the control socket

 FileDescriptor controlSocketFd = prepareFileDescriptor(getControlSocket(TorService.this).getAbsolutePath());

I haven't tested that fix https://github.com/guardianproject/tor-android/pull/76, but what I did is to iterate over that line with a little delay. It's not well designed, but it fixed my real-world problem and reduced the crash rate.

Feel free to close this issue, might just be an idea.

cyBerta avatar Jun 02 '22 21:06 cyBerta

The whole control port as filedescriptor is such a promising approach that has had a variety of issues, i am sure related to performance and small difference in the underlying file system implementation and storage hardware. Not a bad idea to add some awareness of this into the code.

n8fr8 avatar Jun 03 '22 14:06 n8fr8

duplicate of https://github.com/guardianproject/tor-android/issues/56 ?

grote avatar Jul 05 '22 13:07 grote