After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 511285 - Credentials byte was not nul
Credentials byte was not nul
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: general
2.20.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-01-22 16:11 UTC by Josselin Mouette
Modified: 2008-09-19 09:59 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description Josselin Mouette 2008-01-22 16:11:26 UTC
[ forwarded from http://bugs.debian.org/455471 by Javier Kohen ]

I started seeing the following message in the system logs between two to four times every hour:
gnome-keyring-daemon[28877]: Credentials byte was not nul

This only started a few days ago, presumably with the update from version 2.20.1-1  [to version 2.20.2-1].
Comment 1 Stef Walter 2008-01-23 14:06:40 UTC
I'll look into it, but have you logged out and (and back in) after you upgraded? That is, are the running gnome-keyring-daemon and the library of the same gnome-keyring version?
Comment 2 Javier Kohen 2008-01-24 11:15:30 UTC
Not only I logged in and back out, I also restarted X several times and I even upgraded the Linux kernel twice in the meantime. I still get that error message all the time. That is, between four and ten times an hour, even while I'm sleeping and nobody is using the computer interactively.
Comment 3 Ross Boylan 2008-01-28 22:47:03 UTC
I'm seeing this too, even after complete system shutdown.  Also on Debian GNU/Linux, with gnome-keyring 2.20.3-1.  I'm running under KDE; I think evolution is the only thing that's using gnome-keyring, and I see the messages less frequently--but at least several times a day.

Does anyone know if this message indicates any significant problem?  evolution seems to be doing a poor job of remembering my passwords--I keep getting individual prompts for them after having given the password for the keyring.  I suppose it's possible that problem is related to this one.
Comment 4 Per 2008-02-09 17:49:45 UTC
I'm also seeing the same behavior in Fedora 8:

# tail /var/log/messages
Feb  9 08:52:27 spike gnome-keyring-daemon[5840]: Credentials byte was not nul
Feb  9 09:02:27 spike gnome-keyring-daemon[5840]:last message repeated 2 times
Feb  9 09:12:27 spike gnome-keyring-daemon[5840]:last message repeated 2 times
Feb  9 09:22:27 spike gnome-keyring-daemon[5840]:last message repeated 2 times
Feb  9 09:32:27 spike gnome-keyring-daemon[5840]:last message repeated 2 times
Feb  9 09:42:27 spike gnome-keyring-daemon[5840]:last message repeated 2 times

# rpm -q gnome-keyring
gnome-keyring-2.20.2-1.fc8

# cat /etc/redhat-release 
Fedora release 8 (Werewolf)

# uname -a
Linux spike 2.6.23.14-107.fc8 #1 SMP Mon Jan 14 21:37:30 EST 2008 i686 i686 i386 GNU/Linux

I opened bug number 431506 on bugzilla.redhat.com, but I see this is a problem in other distributions as well.
Comment 5 Stef Walter 2008-02-10 17:39:11 UTC
It looks like something other than gnome-keyring is trying to connect to the gnome-keyring socket. 
Comment 6 thaddeus 2008-05-05 17:16:23 UTC
I'm wondering if there's been any traction on this issue?  Every time evolution checks email I am getting this logged to messages:

May  5 10:33:05 thad-fedora8 gnome-keyring-daemon[XXXX]: Credentials byte was not nul
May  5 10:36:38 thad-fedora8 gnome-keyring-daemon[XXXX]: Credentials byte was not nul
May  5 10:39:41 thad-fedora8 gnome-keyring-daemon[XXXX]:last message repeated 5 times

I am running evolution as a normal user.  When I initially launch evolution, it asks for the gnome keyring password.  It accepts the password, then checks mail on a number of accounts successfully, but does log the error message.

Fedora release 8 (Werewolf)

Linux thad-fedora8.spiremedia.com 2.6.24.4-64.fc8 #1 SMP Sat Mar 29 09:54:46 EDT 2008 i686 i686 i386 GNU/Linux

gnome-keyring-2.20.3-1.fc8

evolution-2.12.3-4.fc8

when running strace on evolution, I get the following error all over the place:

read(3, 0x9b4f018, 4096)                = -1 EAGAIN (Resource temporarily unavailable)





Comment 7 Stef Walter 2008-07-02 16:05:38 UTC
This seems to be related: From Jon Burgess:

Is the following error message something that you are concerned about?

** (gnome-keyring-daemon:14724): WARNING **: couldn't read 4 bytes from
client:

It causes log spam if nothing else. I'm not sure if I should be
reporting this to you directly or raising something in the Gnome
bugzilla or somewhere else.

I believe I've identified the cause. The sequence of events is that an
application (Evolution in my case) calls gnome_keyring_is_available().
This opens a connection to the daemon and then immediately closes the
socket:

15114 socket(PF_FILE, SOCK_STREAM, 0)   = 75
15114 fcntl(75, F_SETFD, FD_CLOEXEC)    = 0
15114 connect(75, {sa_family=AF_FILE, path="/tmp/keyring-17Jjbi/socket"}, 110) = 0
15114 close(75)                         = 0


On the GKR side, the code gets the connection. It calls
gkr_unix_credentials_read() which manages to get the peer credentials OK
even though recvmsg() returns 0 indicating that the client has since
closed the connection. It then tries to do a 4 byte read to determine
the packet length which fails causing the error message:

[ incoming connection ]
27990 accept(5, {sa_family=AF_FILE, path="ÿ"}, [9223090566173032450]) = 11
[ launch async thread ]
27999 recvmsg(11, {msg_name(0)=NULL, msg_iov(1)=[{"\x00", 1}], msg_controllen=0, msg_flags=0}, 0) = 0
27999 getsockopt(11, SOL_SOCKET, SO_PEERCRED, "\x0a\x3b\x00\x00\xf4\x01\x00\x00\xf4\x01\x00\x00", [12]) = 0
27999 futex(0xde38a0, FUTEX_WAIT_PRIVATE, 2, NULL = 0
27999 getuid()            = 500
27999 readlink("/proc/15114/exe", "/usr/bin/evolution", 256) = 18
27999 futex(0xde38a0, FUTEX_WAKE_PRIVATE, 1) = 1
27999 read(11, "", 4)         = 0
27999 futex(0xde38a0, FUTEX_WAIT_PRIVATE, 2, NULL )             = 0
[ deleted /etc/localtime access ]
27999 socket(PF_FILE, SOCK_DGRAM, 0)    = 14
27999 fcntl(14, F_SETFD, FD_CLOEXEC)    = 0
27999 connect(14, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
27999 sendto(14, "<36>Jul  1 20:08:11 gnome-keyring-daemon[27990]: couldn\'t read 4 bytes from client: ", 84, MSG_NOSIGNAL, NULL, 0) = 84
27999 write(2, "\n** (gnome-keyring-daemon:27990): WARNING **: couldn\'t read 4 bytes from client: \n", 82) = 82

	Jon



Comment 8 Stef Walter 2008-07-02 16:09:24 UTC
I've committed changes which should fix the problem. The fix is in gnome-keyring-daemon (which would need to be restarted to see the changes). Please reopen if this isn't the case.

2008-07-02  Stef Walter  <stef@memberwebs.com>

	* common/gkr-unix-credentials.c:
	* library/tests/unit-test-other.c: Fix problem with 
	gnome_keyring_is_available() producing spurious warnings
	in the logs. Fixes bug #511285