-
Notifications
You must be signed in to change notification settings - Fork 28
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
Race condition when a client disconnect? #208
Comments
This only happens in the no-netvm scenario (OpenBSD as netvm, which doesn't provide a netback)? What is the actual issue? A hang in the firewall? A hang in domid=XX? It seems that the Dispatcher.wait_clients (which is responsible for "client .. has gone") doesn't work as expected (anymore) -- can we get some further debug information in there - such as printing the new_set (and its size)? On my first read, the VifMap uses the module ClientVif which relies on the polymorphic compare -- that may be an issue -- but then that code is around since 2016, and so far hasn't caused trouble. |
Thank @hannesm for your reply. I don't really understand the client YY + client XX (with the same IP address) part, and the issue may come from that (so far I guess this is an artifact from the OpenBSD frontend driver, but I'm really unsure about that), but that was already the case with the previous release and there was no issue. The impact from the user POV is that sys-net can't connect to the firewall as it's stuck at line |
Update: I got a laptop that allows me to use OpenBSD (but I still can't NAT the traffic properly). So now I'm also seeing the failure message. The OpenBSD AppVM netif disconnect happens during boot. Based on this combination of the two commits, the main difference is as follows: - Lwt.async (fun () -> Lwt.pick [ qubesdb_updater; listener ]);
- Lwt.return_unit
+ Lwt.pick [ qubesdb_updater; listener ] and an update in
Could there be some sort of side effect in this situation? |
I first thought the issue might be with the inversion of But all my attempts to place |
To my understanding, the boot process with OpenBSD adds two vifs (I don't know why?) and at some point one is removed. With the current code, we miss that event (reported by So the ending lines of |
Fixed in #209 |
Dear developpers,
On the Qubes forum, a user has a special setting, qubes-mirage-firewall uses OpenBSD (the unikernel is configured manually with no netvm, as described in README.md), and the latest release prevent that setup to run correctly.
To my understanding, the netvm client connect twice to the unikernel (not sure if that is mandatory, but it worked earlier), and in the logs, the logs lines are (this is the extract that seems relevant, I anonymized manually, XX=YY+1):
So client XX connects and shutdown (again, maybe an artifact due to the way OpenBSD connects as netvm), and client YY cannot connect after client XX has shut down.
The behaviour with previous release is:
Here after
Frontend asked to close network device dom:XX/vif:0
we can see that the client has correctly gone (the line after), and client YY is correctly connected.There is some path I can follow:
If you have some other ideas I'll be glad to explore in depth how that issue could be fixed :)
The text was updated successfully, but these errors were encountered: