threefoldtech / mycelium

End-2-end encrypted IPv6 overlay network
Apache License 2.0
20 stars 10 forks source link

mobile: quic crashes on start-stop-start cycle #251

Open iwanbk opened 1 month ago

iwanbk commented 1 month ago

On Android (and probably on iOS as well), latest mycelium crashed on start-stop-start cycle.

steps to reproduce:

image

Crash message doesn't really point out to quic. But it is fixed when we force is_private_net var to true

https://github.com/threefoldtech/mycelium/blob/ee34c1442071017323a33599d4125339d0a4c048/mycelium/src/peer_manager.rs#L171

Do we need QUIC on mobile device? If no, maybe we can disable it as well.

In case we disable it, i think we still need to fix it because this crashes mean there is some process that is not gfacefully shut down

iwanbk commented 1 month ago

On Android (and probably on iOS as well)

i found that it doesn't crash on iOS

LeeSmet commented 1 month ago

This is rather strange that it only crashes on quic sockets on android. Regardless given that it happens on a second start, I feel that it's caused by not properly cleaning up when the process is done. Mycelium basically spawns a bunch of background tasks which run forever. Up until now, this was fine, since on desktop, if the node exits, we just exit the whole process.

iwanbk commented 1 month ago

Up until now, this was fine, since on desktop, if the node exits, we just exit the whole process.

FYI, it was fine when i'm working on this PR. https://github.com/threefoldtech/mycelium/pull/239

So, it broke after/around that time

LeeSmet commented 1 month ago

@iwanbk I assume this is working properly now?

iwanbk commented 1 month ago

@iwanbk I assume this is working properly now?

i haven't tested it yet because i disable QUIC now. will test it next week.