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 730587 - gnome-keyring-daemon failing on sshfs
gnome-keyring-daemon failing on sshfs
Status: RESOLVED OBSOLETE
Product: gnome-keyring
Classification: Core
Component: general
3.10.x
Other Linux
: Normal blocker
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-05-22 15:31 UTC by charlieott
Modified: 2021-04-11 07:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
multiple temp files generated (306.13 KB, image/png)
2014-05-22 15:31 UTC, charlieott
Details
ncdu screen shot showing over 120K files (45.13 KB, image/png)
2015-09-20 01:59 UTC, David G
Details

Description charlieott 2014-05-22 15:31:56 UTC
Created attachment 276996 [details]
multiple temp files generated

Use whatever local installation you want, e.g. an ubuntu live cd

killall gnome-keyring-daemon
cd ~/.gnome2
mv keyrings keyrings.old
mkdir keyrings keyrings.new
chmod 700 keyrings keyrings.new

sshfs localhost:/home/username/.gnome2/keyrings.new keyrings
gnome-keyring-daemon -s -f

With those commands, you're running gnome-keyring-daemon using sshfs for keyrings

This causes the gnome-keyring-daemon to hang, while simultaneously creating thousands of *temp* files in the new keyrings folder.

This is a blocker for users which have a mounted home folder via SSHFS. (LTSP on Ubuntu 14.04) https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/1321922
Comment 1 charlieott 2014-06-25 13:28:44 UTC
Could someone please confirm this?  It is still an issue.
Comment 2 Alkis Georgopoulos 2014-07-01 04:51:44 UTC
I can confirm this on Ubuntu 14.04.

The problem seems to be somewhere in ./pkcs11/gkm/gkm-transaction.c, function begin_link_temporary_if_exists().
Comment 3 Gary Newcombe 2014-07-24 12:05:23 UTC
I'm also seeing this on Ubuntu 14.04.
Comment 4 Victor 2015-01-20 04:39:08 UTC
I'm see it now (LTSP Fat Client) on Ubuntu 14.04
Comment 5 charlieott 2015-01-28 21:55:52 UTC
I am doing a migrate of my users home folders now.  Thousands of temp keyrings in each user's home folder.  quite a mess to clean up.
Comment 6 David G 2015-09-19 22:50:47 UTC
This affects me as well, I've got over 100 users, many who have this problem, creating many 10's of thousands of these files.
Comment 7 David G 2015-09-20 01:59:34 UTC
Created attachment 311684 [details]
ncdu screen shot showing over 120K files

After further investigation I'd say I've got millions--not 10's of thousands--of these files. I'm also using LTSP Fat Clients on Ubuntu 14.04, am also using AD binding with pbis 8.3.
Comment 8 Alkis Georgopoulos 2015-10-01 20:14:21 UTC
In LTSP, we had to `chmod -x gnome-keyring-daemon` for all versions after 3.10, to prevent gnome-keyring from filling up our disks with temp files and crashing our systems.
http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk/revision/2673

Could some gnome developer at least stop the loop there, so that it doesn't retry forever, creating millions of temp files?
Comment 9 Jigish Gohil 2015-10-02 05:45:13 UTC
I can confirm that this affects openSUSE as well.
Comment 10 Kai-ilja Görg 2015-10-21 09:52:07 UTC
Still no fix for the gnome-keyring with ltsp clients... this make cloud connections to Contacts, Nautilus, Evolution impossible. No workaround except preventing the daemon to execute?
Comment 11 Alkis Georgopoulos 2015-11-30 08:50:24 UTC
@Werner Koch, @Stef Walter:
I located the exact commit that caused this issue, it's this one authored/committed by you:
https://git.gnome.org/browse/gnome-keyring/commit/?id=7f31eebd35a84ed4c09970edb0b8d99a6a8af6f5
Provide fallback for file systems without working hardlinks

My test case was done on Ubuntu 16.04, gnome-keyring 3.18.3-0ubuntu2.
$HOME/.local/share/keyrings (the new path where the keyrings are stored) was mounted over SSHFS.

1) I launched seahorse and tried to create a new keyring, named "qwer". Thousand of "qwer.keyring.temp-999800304" were being created. I had to run `killall -9 gnome-keyring-daemon` to regain control.

2) I reverted pkcs11/gkm/gkm-transaction.c right before the commit that caused the regression:
https://git.gnome.org/browse/gnome-keyring/tree/pkcs11/gkm/gkm-transaction.c?id=dff0a6edd2c02602b24476296855b4f63f99379f
https://git.gnome.org/browse/gnome-keyring/log/?ofs=300
2012-08-09 Add MATE Desktop to desktop files raveit65 4 -4/+4

I launched gnome-keyring-daemon again, I tried to create a new keyring and everything worked fine. Problem solved.

3) I moved on to the problematic commit:
https://git.gnome.org/browse/gnome-keyring/commit/?id=7f31eebd35a84ed4c09970edb0b8d99a6a8af6f5
2012-08-09	Provide fallback for file systems without working hardlinks	Werner Koch	1	-11/+135

It was affected, proving that this is the commit that caused the issue.


Could you please comment on if you plan to fix or revert that regression?
It's prohibiting thousands of installations from upgrading to newer Gnome versions, so your input will be much appreciated.
Thank you!
Comment 12 Stef Walter 2015-11-30 09:59:21 UTC
Mounting the keyrings directory over sshfs isn't something that was in mind when writing gnome-keyring-daemon. I'm not against it though. So if you do have a fix/patch to make gnome-keyring-daemon work on sshfs I'd gladly review it.

I would suggest also adding a test case to the test suite so this (corner case) doesn't break again in the future.
Comment 13 Stef Walter 2015-11-30 11:31:09 UTC
Alkis prepared a system to test this. The reason that this is failing is because sshfs in shitty with regards to hard links.

But it has the exact opposite problem as Werner ... the link succeeds, but then it fails to report the number of links, and also fails to report inodes correctly. So the copy_to_temp_file() fails because the destination exists, and was just created by the link().

Werner, do you remember if EMC CIFS would return success in link() without actually creating a link?
Comment 14 Kai-ilja Görg 2015-12-01 11:02:59 UTC
Good to see you are on to it and making progress! Thanks for that.
Comment 15 chris 2018-01-31 15:43:14 UTC
Any progress on this? It has been many years but it's still an issue. My diskless clients mount /home over sshfs.

gnome-keyring-daemon: 3.20.1

SSHFS version 3.3.1
FUSE library version 3.2.0
using FUSE kernel interface version 7.26
fusermount3 version: 3.2.0
Comment 16 Alkis Georgopoulos 2019-06-16 05:19:29 UTC
Hi Stef, since Werner hasn't replied for 4 years, could you please at least stop the loop, as it creates 65000 temp files and delays the login process for 2 minutes before giving up?
Comment 17 Stef Walter 2019-06-17 06:57:23 UTC
Alkis, Are you up for making a patch for this and submitting it to GNOME GitLab? Thanks!

https://wiki.gnome.org/Newcomers/SubmitContribution
Comment 18 Alkis Georgopoulos 2019-06-17 07:01:33 UTC
Stef thank you for the proposal, I'm more of a shell/python coder nowadays, if noone more experienced with C has the time to submit a patch, I'll give it a try after GSoC (in September).
Comment 19 Lasse Kliemann 2019-08-10 10:55:58 UTC
Debian/GNOME 10 and Ubuntu 18.04 are also affected. I disabled GNOME keyring by:

dpkg-divert --divert /usr/bin/gnome-keyring-daemon.bak --rename /usr/bin/gnome-keyring-daemon

Any progress on this bug would be appreciated.
Comment 20 olli 2019-11-28 15:46:17 UTC
Same with Gentoo Linux and Mate.
Please help!
Comment 21 André Klapper 2021-04-11 07:49:41 UTC
Superseded by https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/84