gnirehtet
gnirehtet copied to clipboard
AdbMonitor may fail to track devices when many devices get online or offline at the same time.
https://github.com/Genymobile/gnirehtet/blob/f5c0710c751f7ca82ce413058abc57d9af7208c3/relay-java/src/main/java/com/genymobile/gnirehtet/AdbMonitor.java#L152
Here I think an exception should be raised to reset the current state...
Hmmm, it should not, it's called in a loop:
https://github.com/Genymobile/gnirehtet/blob/f5c0710c751f7ca82ce413058abc57d9af7208c3/relay-java/src/main/java/com/genymobile/gnirehtet/AdbMonitor.java#L90
:confused:
Here I think an exception should be raised to reset the current state...
It should not be necessary to reset the state, if there is a bug in parsing, it should be fixed without reset.
Hmmm, it should not, it's called in a loop:
https://github.com/Genymobile/gnirehtet/blob/f5c0710c751f7ca82ce413058abc57d9af7208c3/relay-java/src/main/java/com/genymobile/gnirehtet/AdbMonitor.java#L90
😕
Here I think an exception should be raised to reset the current state...
It should not be necessary to reset the state, if there is a bug in parsing, it should be fixed without reset.
But that exception can be caught in an outer loop: https://github.com/Genymobile/gnirehtet/blob/f5c0710c751f7ca82ce413058abc57d9af7208c3/relay-java/src/main/java/com/genymobile/gnirehtet/AdbMonitor.java#L61
and then , the state can be reset correctly.
But I actually encouter that bug ....
In my case ,this loop while loops forever , and hit my CPU up to 100%... https://github.com/Genymobile/gnirehtet/blob/f5c0710c751f7ca82ce413058abc57d9af7208c3/relay-java/src/main/java/com/genymobile/gnirehtet/AdbMonitor.java#L90
But that exception can be caught in an outer loop:
The exception should occur only when a communication with the adb socket fails (so it reconnects and "restart").
In my case ,this loop while loops forever , and hit my CPU up to 100%...
OK, so there's definitely a parsing bug. To be investigated.
Does it also happen with the rust version?
On which version of gnirehtet (which SHA-1) do you reproduce? master
? dev
?
reproduce The neweset v2.5
But that exception can be caught in an outer loop:
The exception should occur only when a communication with the adb socket fails (so it reconnects and "restart").
In my case ,this loop while loops forever , and hit my CPU up to 100%...
OK, so there's definitely a parsing bug. To be investigated.
Does it also happen with the rust version?
I don't know , I haven't tried..