Bug 1325993

Summary: Gkr-Message: secret service operation failed: The secret was transferred or encrypted in an invalid way.
Product: Red Hat Enterprise Linux 7 Reporter: Vladimir Benes <vbenes>
Component: gnome-keyringAssignee: David King <dking>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: dking, lmiksik, mcepl, mclasen, mcrha, ovasik, pachoramos1, redhat-bugzilla, sgehwolf, tpelka, zzambers
Target Milestone: rcKeywords: TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gnome-keyring-3.20.0-2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1434474 (view as bug list) Environment:
Last Closed: 2017-08-01 23:02:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
reproducer none

Description Vladimir Benes 2016-04-11 14:22:39 UTC
Description of problem:
I can see from time to time this error. It's triggered by evolution and can be solved by restarting application. 

Version-Release number of selected component (if applicable):
gnome-keyring-3.14.0-1.el7.x86_64

How reproducible:
from time to time (let's say a few %) 

Steps to Reproduce:
according to https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/1221955:
A good way to reproduce could be to write a code that loops through subsequent gnome_keyring_find_password_sync() requests.

Comment 1 Milan Crha 2016-04-11 14:28:49 UTC
I can confirm that I can see this issue with evolution also in the Fedora 23, with:
   gnome-keyring-3.18.3-1.fc23.x86_64
   libsecret-0.18.3-1.fc23.x86_64

It's usually enough to stop the evolution and run it again and the error is gone. It sometimes seemed that the error usually comes up after login, like if there was an issue to connect to the gnome-keyring-deamon from the libsecret, but as I get this error also after running the system for a long time, then it can be something very different.

I also do not know how to reliably reproduce this. My guess is that the libsecret fails to talk over D-Bus to the gnome-keyring-daemon for some reason and instead of reconnecting to it, it simply fails with the "The secret was transferred or encrypted in an invalid way" error message on the console of the application.

Comment 3 zzambers 2016-07-12 14:03:20 UTC
I am also facing this issue. I have seen this issue on fedora 23, rhel-7 (gnome-keyring, libsecret). I have also made a reproducer.


Reproducer
  requirements (on fedora 23): make, gcc, pkgconfig, libsecret, libsecret-devel





While trying to reproduce issue I found that I was not able to reproduce issue when performing libsecret operations in loop, but issue is easily reproduceable by running whole program in loop. Based on that I would guess there is some race condition during initialization.


In my case message is:

** Message: Remote error from secret service: org.freedesktop.DBus.Error.Failed: Couldn't create item: The secret was transferred or encrypted in an invalid way.

But I have also seen other similar (slightly different) messages for this issue. (exact message probably depends on version/system/operation which failed due to issue)

Comment 4 zzambers 2016-07-12 14:09:51 UTC
Created attachment 1178912 [details]
reproducer

Reproducer:

requirements (on fedora 23): make, gcc, pkgconfig, libsecret, libsecret-devel

use:
  make
  make test

( test runs 1000 iterations (runs of reproducer), stops if issue happens)

Comment 6 Matthias Clasen 2016-09-13 13:28:50 UTC
I'd like to argue that this shouldn't be a blocker. It is a sporadic failure, it is not new, it has been seen in many distributions. We will look into it, but given that there's no upstream fix for it, it may not be resolved by Sep 21.

Comment 8 Pacho Ramos 2016-09-30 22:50:49 UTC
Was this reported to upstream? I am also suffering this from time to time on Gentoo :/

Comment 9 Vladimir Benes 2016-11-03 09:29:43 UTC
(In reply to Pacho Ramos from comment #8)
> Was this reported to upstream? I am also suffering this from time to time on
> Gentoo :/

yes it was:
http://bugzilla.gnome.org/show_bug.cgi?id=769666
https://bugs.launchpad.net/bugs/1221955

Comment 11 zzambers 2016-12-06 15:08:30 UTC
oh, I am sorry, I accidentally added comment to wrong bug

Comment 12 Milan Crha 2017-03-13 15:00:58 UTC
There had been merged a fix for this at [1] two weeks ago. I guess it can be backported. What do you think, David?

[1] https://bugzilla.gnome.org/show_bug.cgi?id=778357

Comment 13 Vladimir Benes 2017-03-13 18:14:34 UTC
(In reply to Milan Crha from comment #12)
> There had been merged a fix for this at [1] two weeks ago. I guess it can be
> backported. What do you think, David?
> 
> [1] https://bugzilla.gnome.org/show_bug.cgi?id=778357

YES, PLEASE!!

Comment 15 Matěj Cepl 2017-05-31 16:16:04 UTC
Rebase done.

Comment 16 errata-xmlrpc 2017-08-01 23:02:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:2159