-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
DBus connection closing unexpectedly #293
Comments
Hmm, essentially this seems to be doing the "right thing", no? The dbus daemon kicked us off the bus, and the client got a short read. I guess there are two issues here:
|
I tried looking through the dbus code to find the situations where it would boot us off the connection with timeouts, but I couldn't find any. I had some debug code to watch for the "closed" event on the GDbusConnection and we don't receive one when connected to a normal desktop session. It only occurs for me during the flatpak session. The only thing different I'm doing in the flatpak version is the HostCommand stuff which includes signal (un)subscribe, but that code was all copied from flatpak-builder.c. I also tested out dbus-monitor before filing this, and I didn't see anything interesting. But I think that dbus-monitor will only notify of messages, so if there is a problem with wire format stuff, I don't think we'd know about that via dbus-monitor output. I'll give the --log-session-bus a try and report back. |
The final |
I've also been able to replicate this outside the sandbox by using the |
I've modified I'd guess the dbus-daemon is failing some consistency check (maybe serial related?) |
I wonder if its related to the fd passing that HostCommand uses. |
I can't confirm it, but I would expect the error to be in I created this test case which just performs the subscribe/hostcommand/unsubscribe dance with a command line provided timeout period. I couldn't get it to fail, so something else must be going on. https://gist.github.com/chergert/2f11ab7f48c56ab9195c3bb669e4c39f I even modified the Builder code to use it's own connection, and the error still happens after a given amount of time of inactivity. |
Some things are not super clear. Is this correct:
|
Yes, I can reproduce this inside and outside the sandbox. The test-case I linked to above works both inside and outside the sandbox. I think it's fair to claim that the |
And by "outside", do you mean that you're completely without proxy, or is it a manually started proxy? |
No proxy is involved. |
Did you ever figure this out? |
I did not. We are still using our workaround that creates new GDBusConnections for each process spawn. |
Pretty sure I haven't seen this in a long time, so closing. |
Occasionally, after a slight bit of inactivity (maybe 30 seconds or so) my next DBus operation fails when tunneling through the flatpak-dbus-proxy.
According to strace (and some extra printfs), it looks like the flatpak-dbus-proxy is getting
ECONNRESET
from the real dbus daemon. I verified it was the bus side of the proxy by comparingProxySide *side
to&side->client->bus_side
inside_closed()
offlatpak-proxy.c
.This in turn does a shutdown of the proxy socket to the application, resulting in me getting
WARNING: Underlying GIOStream returned 0 bytes on an async read
from GDBus.A small snippet leading up to the error:
I believe FDs 8, 9, and 10 are from a HostCommand RPC to org.freedesktop.Flatpak.Development.
The text was updated successfully, but these errors were encountered: