Content-Length: 250481 | pFad | https://github.com/coreos/fleet/pull/1706

AF functional: close DBUS connections after running systemd commands by dongsupark · Pull Request #1706 · coreos/fleet · GitHub
Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

functional: close DBUS connections after running systemd commands #1706

Merged
merged 1 commit into from
Nov 16, 2016

Conversation

dongsupark
Copy link
Contributor

As described in #1704, functional test has a bug hitting an upper limit of ~40 tests in total. That's actually an issue of DBUS connections remaining opened even after nspawn containers got successfully terminated. That's why the number of unix sockets grows up to 256.

$ netstat -nap | grep /var/run/dbus/system_bus_socket | wc -l
256

From that moment on, functional test hangs mysteriously. Sometimes users could see errors like "The maximum number of active connections for UID 0 has been reached."

Its reason is that every DBUS connection was never closed. The more tests we add, the more stale DBUS connections we have. This bug has existed since the beginning.

Fix it by adding conn.Close() after running systemd commands.

As described in coreos#1704, functional
test has a bug hitting an upper limit of ~40 tests in total. That's
actually an issue of DBUS connections remaining opened even after
nspawn containers got successfully terminated. That's why the number
of unix sockets grows up to 256.

  $ netstat -nap | grep /var/run/dbus/system_bus_socket | wc -l
  256

From that moment on, functional test hangs mysteriously. Sometimes
users could see errors like "The maximum number of active connections
for UID 0 has been reached."

Its reason is that every DBUS connection was never closed. The more
tests we add, the more stale DBUS connections we have. This bug has
existed since the beginning.

Fix it by adding conn.Close() after running systemd commands.
@dongsupark dongsupark force-pushed the dongsu/dbus-conn-close-fxtests branch from a0e0ef6 to 951c99f Compare November 15, 2016 15:19
@dongsupark
Copy link
Contributor Author

As it's clearly a bug, and it doesn't affect main code, I'll simply merge.
BTW fleetd doesn't explicitly close DBUS connections either. Though the remaining connections are already cleaned up when fleetd shuts down. That's what I see in my tests. So I suppose, we don't necessarily need to clean them up in fleetd.

@dongsupark dongsupark merged commit e6c838b into coreos:master Nov 16, 2016
@dongsupark dongsupark deleted the dongsu/dbus-conn-close-fxtests branch November 16, 2016 11:16
@jonboulle
Copy link
Contributor

nice catch!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/coreos/fleet/pull/1706

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy