Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cyBerta opened this issue Jun 2, 2022 · 2 comments

Comments

@cyBerta
Copy link

cyBerta commented Jun 2, 2022

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 #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 cyBerta changed the title issue on old devices crashes on slow devices when obtaining the control socket's file descriptor Jun 2, 2022
@n8fr8
Copy link
Member

n8fr8 commented Jun 3, 2022

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.

@grote
Copy link
Contributor

grote commented Jul 5, 2022

duplicate of #56 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants