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

relay dies with AssertionError #154

Closed
tseglevskiy opened this issue Nov 9, 2018 · 5 comments
Closed

relay dies with AssertionError #154

tseglevskiy opened this issue Nov 9, 2018 · 5 comments
Labels

Comments

@tseglevskiy
Copy link

tseglevskiy commented Nov 9, 2018

One real device, connected by USB. In some time relay dies. What's wrong?

➜  gnirehtet-java ./gnirehtet relay                                                                     
2018-11-09 17:41:13.395 I Gnirehtet: Starting relay server...
2018-11-09 17:41:13.456 I Relay: Relay server started
2018-11-09 17:41:17.458 I TunnelServer: Client #0 connected
2018-11-09 17:41:17.544 I TCPConnection: TCP 10.0.0.2:49290 -> 10.118.203.233:80 Open
2018-11-09 17:41:17.546 I TCPConnection: TCP 10.0.0.2:49291 -> 10.118.203.233:80 Open
2018-11-09 17:41:17.546 I TCPConnection: TCP 10.0.0.2:49292 -> 10.118.203.233:80 Open
2018-11-09 17:41:17.618 I TCPConnection: TCP 10.0.0.2:49290 -> 10.118.203.233:80 Close
2018-11-09 17:41:17.624 I TCPConnection: TCP 10.0.0.2:49291 -> 10.118.203.233:80 Close
2018-11-09 17:41:17.625 I TCPConnection: TCP 10.0.0.2:49292 -> 10.118.203.233:80 Close
2018-11-09 17:41:32.995 I TCPConnection: TCP 10.0.0.2:49293 -> 10.118.203.233:80 Open
2018-11-09 17:41:32.996 I TCPConnection: TCP 10.0.0.2:49294 -> 10.118.203.233:80 Open
2018-11-09 17:41:33.372 I TCPConnection: TCP 10.0.0.2:49295 -> 10.118.203.233:80 Open
2018-11-09 17:41:33.376 I TCPConnection: TCP 10.0.0.2:49296 -> 10.118.203.233:80 Open
2018-11-09 17:41:43.358 I TCPConnection: TCP 10.0.0.2:49297 -> 10.118.203.233:80 Open
2018-11-09 17:41:43.400 I TCPConnection: TCP 10.0.0.2:49298 -> 10.118.203.233:80 Open
2018-11-09 17:42:15.467 I TCPConnection: TCP 10.0.0.2:49298 -> 10.118.203.233:80 Close
2018-11-09 17:42:15.468 I TCPConnection: TCP 10.0.0.2:49293 -> 10.118.203.233:80 Close
2018-11-09 17:42:15.469 I TCPConnection: TCP 10.0.0.2:49296 -> 10.118.203.233:80 Close
2018-11-09 17:42:15.469 I TCPConnection: TCP 10.0.0.2:49297 -> 10.118.203.233:80 Close
2018-11-09 17:42:15.469 I TCPConnection: TCP 10.0.0.2:49294 -> 10.118.203.233:80 Close
2018-11-09 17:42:15.470 I TCPConnection: TCP 10.0.0.2:49295 -> 10.118.203.233:80 Close
2018-11-09 17:42:15.480 I UDPConnection: UDP 10.0.0.2:5218 -> 8.8.8.8:53 Open
Exception in thread "main" java.lang.AssertionError: selector.select() returned without any event, an invalid SelectionKey was probably been registered
	at com.genymobile.gnirehtet.relay.Relay.run(Relay.java:60)
	at com.genymobile.gnirehtet.Main.cmdRelay(Main.java:296)
	at com.genymobile.gnirehtet.Main.access$1100(Main.java:32)
	at com.genymobile.gnirehtet.Main$Command$11.execute(Main.java:187)
	at com.genymobile.gnirehtet.Main.main(Main.java:427)
➜  gnirehtet-java
@rom1v rom1v added the bug label Nov 9, 2018
@rom1v
Copy link
Collaborator

rom1v commented Nov 9, 2018

Thank you for the report. Version 2.3? On which platform? Does it also happen with the rust version?

Possibly related to #136.

@tseglevskiy
Copy link
Author

It's gnirehtet-java-v2.3.zip, MacOS and Samsung tablet.

No, I didn't try the rust version. Can it help?

@rom1v
Copy link
Collaborator

rom1v commented Nov 9, 2018

It's gnirehtet-java-v2.3.zip, MacOS and Samsung tablet.

Does it happen all the time in a few minutes?

No, I didn't try the rust version. Can it help?

It would help to know if it's the same bug as #136, which in turn would help to find the cause.

@rom1v
Copy link
Collaborator

rom1v commented Nov 9, 2018

Note to myself to find the cause: this might be correlated with unreachable DNS: #155.

jessedusty pushed a commit to jessedusty/gnirehtet that referenced this issue Jul 10, 2019
…e cleaning deadline by a small number of milliseconds

Fixes Genymobile#154

Evidence:

Selected keys size 1 now: 1562790544556 nextCleaningDeadline 1562790662669
Selected keys size 0 now: 1562790662667 nextCleaningDeadline 1562790662669
selector.select() returned without any event, an invalid SelectionKey was probably been registered
Selected keys size 0 now: 1562790662670 nextCleaningDeadline 1562790662669
Selected keys size 0 now: 1562790722672 nextCleaningDeadline 1562790722670
2019-07-10 16:32:02.673 I UDPConnection: UDP 10.0.0.2:31650 -> 208.67.222.222:53 Close
@sargissargsyan
Copy link

I have the same issue on mac OS. any update on this?

rom1v pushed a commit that referenced this issue Sep 7, 2019
Fix race condition in Java due to timeout from no activity, misses the
cleaning deadline by a small number of milliseconds.

Fixes <#154>

Evidence:

Selected keys size 1 now: 1562790544556 nextCleaningDeadline 1562790662669
Selected keys size 0 now: 1562790662667 nextCleaningDeadline 1562790662669
selector.select() returned without any event, an invalid SelectionKey was probably been registered
Selected keys size 0 now: 1562790662670 nextCleaningDeadline 1562790662669
Selected keys size 0 now: 1562790722672 nextCleaningDeadline 1562790722670
2019-07-10 16:32:02.673 I UDPConnection: UDP 10.0.0.2:31650 -> 208.67.222.222:53 Close
rom1v pushed a commit that referenced this issue Sep 7, 2019
Fix race condition in Java due to timeout from no activity, misses the
cleaning deadline by a small number of milliseconds.

Fixes <#154>

Evidence:

Selected keys size 1 now: 1562790544556 nextCleaningDeadline 1562790662669
Selected keys size 0 now: 1562790662667 nextCleaningDeadline 1562790662669
selector.select() returned without any event, an invalid SelectionKey was probably been registered
Selected keys size 0 now: 1562790662670 nextCleaningDeadline 1562790662669
Selected keys size 0 now: 1562790722672 nextCleaningDeadline 1562790722670
2019-07-10 16:32:02.673 I UDPConnection: UDP 10.0.0.2:31650 -> 208.67.222.222:53 Close

Signed-off-by: Romain Vimont <rom@rom1v.com>
@rom1v rom1v closed this as completed in 7ce96ab Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants