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

Tests hang forever after interface idle for some time #5

Open
torsteingrindvik opened this issue Jun 25, 2020 · 6 comments
Open

Tests hang forever after interface idle for some time #5

torsteingrindvik opened this issue Jun 25, 2020 · 6 comments

Comments

@torsteingrindvik
Copy link

I have only done this on a single computer yet so I'm not sure if it's reproducible on other networks/PCs/OSes, etc.

On Ubuntu 19.10.
Commit is e150911

Reproducable by:

cargo test; echo "WAITING 10 min"; sleep 600; cargo test; echo Success!

The last line will never be echoed, as the second test will hang forever.
First test finishes instantly.

@vorner
Copy link
Owner

vorner commented Jun 25, 2020

I'm not sure if it's the time. When I run the tests repeatedly, they lock up sometimes. I suspect there's some race condition or maybe it doesn't perform well if packets are lost on the interface 🤷.

Anyway, this crate really is not at the very top of my priority list, it might take some time before I get to this. So if you could have a look at what might be happening (maybe strace would help), it would be great.

@torsteingrindvik
Copy link
Author

Ok (sorry for late reply)! Same for me, might take a while until I need the functionality from this crate.
But unless fixed I'll be happy to take a look when I get around to it.

@torsteingrindvik
Copy link
Author

Quick update. Tried this again, but with Wireshark (I don't recall if I had Wireshark running when I reported this).
I saw that when the test hangs there is an ICMP Destination unreacable (Host administratively prohibited).
And using dmesg --follow showed that my firewall was actively blocking those (but only sometimes?!).

I haven't been able to have the tests fail after allowing all traffic in the tun10 interface.

Could it be the same issue for you?
If yes then there might not be an issue.

Although I'm pretty sure I've seen tests fail without locking up... will poke it some more.

@vorner
Copy link
Owner

vorner commented Sep 10, 2020

I didn't find the time to look at it more since then, but I'm pretty confident nothing manipulates my firewall and the ports should be the same each time.

@torsteingrindvik
Copy link
Author

I have using the TAP parts of this over the weekend and captured >1 000 000 packets without problems.
Feel free to close this if you want.

@vorner
Copy link
Owner

vorner commented Sep 22, 2020

I'll keep this open for now. If my gut feeling is right, it's a problem in the test, not in the actual library code.

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

2 participants