View previous topic :: View next topic |
Author |
Message |
rizzini n00b
Joined: 17 Oct 2022 Posts: 10
|
Posted: Mon Oct 31, 2022 10:48 pm Post subject: gnome-keyring-daemon consuming 100% CPU at startup |
|
|
I already have the -gnome-keyring USE flag on my make.conf. It seems a can't get rid of it, since:
Code: | $ equery d gnome-base/gnome-keyring
* These packages depend on gnome-base/gnome-keyring:
sys-auth/pambase-20220214 (gnome-keyring ? gnome-base/gnome-keyring[pam])
virtual/secret-service-0 (gnome-base/gnome-keyring) |
PAM base requiring gnome-keyring sounds really strange to me. It's a base package for authentication.. Even shadow depends on it. Am I missing something here? I'm on KDE and I have nothing related to GNOME installed. I'm looking either to remove the gnome-keyring/keepassxc(virtual/secret-service) or work around this 100% usage. My last resource is to move the pambase ebuild file to my personal repository and remove the gnome-keyring dependency myself. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Mon Oct 31, 2022 10:56 pm Post subject: Re: gnome-keyring-daemon consuming 100% CPU at startup |
|
|
The 100% CPU usage was discussed a few days ago in gnome-keyring-daemon using 1 full CPU thread (SOLVED). rizzini wrote: | Code: | $ equery d gnome-base/gnome-keyring
* These packages depend on gnome-base/gnome-keyring:
sys-auth/pambase-20220214 (gnome-keyring ? gnome-base/gnome-keyring[pam])
virtual/secret-service-0 (gnome-base/gnome-keyring) |
PAM base requiring gnome-keyring sounds really strange to me. | It is only required if you set USE=gnome-keyring on sys-auth/pambase.
Note that in general equery d is a poor choice for this use. You should use emerge --pretend --verbose --depclean instead.
virtual/secret-service has no USE flag, but can be satisfied by using keepassxc, or by eliminating the packages that cause you to need virtual/secret-service. |
|
Back to top |
|
|
rizzini n00b
Joined: 17 Oct 2022 Posts: 10
|
Posted: Mon Oct 31, 2022 11:14 pm Post subject: Re: gnome-keyring-daemon consuming 100% CPU at startup |
|
|
equery was confusing me a bit. Thanks for the tip on how to better check the dependencies in this case. I removed virtual/secret-service-0 along with gnome-keyring and put the secret-service in my package.provided. Skype won't hold my login anymore, but I rarely use it, so.. Thank you. |
|
Back to top |
|
|
Juippisi Developer
Joined: 30 Sep 2005 Posts: 724 Location: /home
|
Posted: Tue Nov 01, 2022 7:24 am Post subject: |
|
|
The upstream issue has a patch that seems to fix the issue, so you can also drop the patch to /etc/portage/patches, recompile and relog. |
|
Back to top |
|
|
rizzini n00b
Joined: 17 Oct 2022 Posts: 10
|
Posted: Tue Nov 01, 2022 11:32 am Post subject: |
|
|
Juippisi wrote: | The upstream issue has a patch that seems to fix the issue, so you can also drop the patch to /etc/portage/patches, recompile and relog. |
Awesome.. The patch worked fined here. Thank you.
Code: | diff --git a/glib/glib-unix.c b/glib/glib-unix.c
index 4710c51168538a182debc55a64fd2502d107b537..bc152d766377d11bc10da5bb7865801da8028e46 100644
--- a/glib/glib-unix.c
+++ b/glib/glib-unix.c
@@ -108,17 +108,6 @@ g_unix_open_pipe (int *fds,
ecode = pipe2 (fds, pipe2_flags);
if (ecode == -1 && errno != ENOSYS)
return g_unix_set_error_from_errno (error, errno);
- /* Don't reassign pipes to stdin, stdout, stderr if closed meanwhile */
- else if (fds[0] < 3 || fds[1] < 3)
- {
- int old_fds[2] = { fds[0], fds[1] };
- gboolean result = g_unix_open_pipe (fds, flags, error);
- close (old_fds[0]);
- close (old_fds[1]);
-
- if (!result)
- g_unix_set_error_from_errno (error, errno);
- }
else if (ecode == 0)
return TRUE;
/* Fall through on -ENOSYS, we must be running on an old kernel */
@@ -127,19 +116,6 @@ g_unix_open_pipe (int *fds,
ecode = pipe (fds);
if (ecode == -1)
return g_unix_set_error_from_errno (error, errno);
- /* Don't reassign pipes to stdin, stdout, stderr if closed meanwhile */
- else if (fds[0] < 3 || fds[1] < 3)
- {
- int old_fds[2] = { fds[0], fds[1] };
- gboolean result = g_unix_open_pipe (fds, flags, error);
- close (old_fds[0]);
- close (old_fds[1]);
-
- if (!result)
- g_unix_set_error_from_errno (error, errno);
-
- return result;
- }
if (flags == 0)
return TRUE;
diff --git a/glib/tests/unix.c b/glib/tests/unix.c
index 2112cab6bf78f20e8ce41cc7bf08750f34e35174..5dde2b52cce8e294e53f8cdbdea12f088e1d37ca 100644
--- a/glib/tests/unix.c
+++ b/glib/tests/unix.c
@@ -26,6 +26,7 @@
#include "glib-unix.h"
#include <string.h>
#include <pwd.h>
+#include <unistd.h>
static void
test_pipe (void)
@@ -52,6 +53,33 @@ test_pipe (void)
g_assert (g_str_has_prefix (buf, "hello"));
}
+static void
+test_pipe_stdio_overwrite (void)
+{
+ GError *error = NULL;
+ int pipefd[2], ret;
+ gboolean res;
+ int stderr_fd;
+
+ stderr_fd = dup (STDERR_FILENO);
+ g_assert_cmpint (stderr_fd, >, 0);
+ close (STDERR_FILENO);
+
+ res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error);
+ g_assert (res);
+ g_assert_no_error (error);
+
+ g_assert_cmpint (pipefd[0], ==, STDERR_FILENO);
+
+ close (pipefd[0]);
+ close (pipefd[1]);
+
+ ret = dup2 (stderr_fd, STDERR_FILENO);
+ g_assert_cmpint (ret, >=, 0);
+
+ close (stderr_fd);
+}
+
static void
test_error (void)
{
@@ -337,6 +365,7 @@ main (int argc,
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/glib-unix/pipe", test_pipe);
+ g_test_add_func ("/glib-unix/pipe-stdio-overwrite", test_pipe_stdio_overwrite);
g_test_add_func ("/glib-unix/error", test_error);
g_test_add_func ("/glib-unix/nonblocking", test_nonblocking);
g_test_add_func ("/glib-unix/sighup", test_sighup); |
|
|
Back to top |
|
|
rizzini n00b
Joined: 17 Oct 2022 Posts: 10
|
Posted: Wed Nov 02, 2022 3:19 pm Post subject: |
|
|
Fixed with glib-2.74.1-r1. The patch is no longer necessary. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|