keyring icon indicating copy to clipboard operation
keyring copied to clipboard

Using keyring on Linux leaves dbus-daemons running, perhaps because godbus connection is not closed

Open afunix opened this issue 3 years ago • 2 comments

My app does not use "secret-service" backend on Linux, however each execution leaves dbus-daemon running, which eventually leads to OutOfMemory. godbus.Conn has both Open() and Close(), however keyring does not have a Close() method, so there is no way to request Close() in godbus.Conn. I'm not 100% sure Close() will help, but it seems godbus does a lot of clean up in this method.

afunix avatar Jan 22 '22 17:01 afunix

Is there any intention to fix this? I can avoid using 99designs/keyring myself, but every time a dependency makes the unfortunate decision to import this package it also becomes harmful and I have to avoid it.

Jeffail avatar Apr 12 '23 11:04 Jeffail

For anyone stuck on this I've made a temporary fork: https://github.com/Jeffail/keyring, here's what the switch looks like (you add a replace directive and it nukes dbus functionality): https://github.com/benthosdev/benthos/commit/7453f87010cfc96d60cf0d484af33f1e0ac59abd

Jeffail avatar Apr 12 '23 11:04 Jeffail