Bug 1368793 - pass show -c hangs sometimes on Wayland
Summary: pass show -c hangs sometimes on Wayland
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: xclip
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-21 12:55 UTC by Piotr Popieluch
Modified: 2017-07-26 10:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-26 10:43:47 UTC
Type: Bug


Attachments (Terms of Use)

Description Piotr Popieluch 2016-08-21 12:55:48 UTC
Description of problem:
When running `pass show -c passname` it sometimes hangs other times it works as expected. Probably this is a bug in xclip, wayland or xwayland but not sure where to file it. Or maybe pass should not use xclip but some other tool on Wayland?


Version-Release number of selected component (if applicable):
pass-1.6.5-3.fc24.noarch
xclip-0.12-11.20140209svn.fc24.x86_64


How reproducible:
unpredictable


Steps to Reproduce:
1. pass show -c passwordname
2. 
3.

Actual results:
pass hangs

Expected results:
pass to copy password into clipboard

Additional info:

Comment 1 Piotr Popieluch 2016-08-21 12:59:06 UTC
bash -x output


bash -x /usr/bin/pass show -c redhat.com/bugzilla.redhat.com
+ umask 077
+ set -o pipefail
+ GPG_OPTS=("--quiet" "--yes" "--compress-algo=none" "--no-encrypt-to")
+ GPG=gpg
++ tty
+ export GPG_TTY=/dev/pts/6
+ GPG_TTY=/dev/pts/6
+ which gpg2
+ GPG=gpg2
+ [[ -n '' ]]
+ [[ gpg2 == \g\p\g\2 ]]
+ GPG_OPTS+=("--batch" "--use-agent")
+ PREFIX=/home/piotr/.password-store
+ X_SELECTION=clipboard
+ CLIP_TIME=45
+ export GIT_DIR=/home/piotr/.password-store/.git
+ GIT_DIR=/home/piotr/.password-store/.git
+ export GIT_WORK_TREE=/home/piotr/.password-store
+ GIT_WORK_TREE=/home/piotr/.password-store
+ GETOPT=getopt
+ SHRED='shred -f -z'
+ PROGRAM=pass
+ COMMAND=show
+ case "$1" in
+ shift
+ cmd_show -c redhat.com/bugzilla.redhat.com
+ local opts clip=0
++ getopt -o c -l clip -n pass -- -c redhat.com/bugzilla.redhat.com
+ opts=' -c -- '\''redhat.com/bugzilla.redhat.com'\'''
+ local err=0
+ eval set -- ' -c -- '\''redhat.com/bugzilla.redhat.com'\'''
++ set -- -c -- redhat.com/bugzilla.redhat.com
+ true
+ case $1 in
+ clip=1
+ shift
+ true
+ case $1 in
+ shift
+ break
+ [[ 0 -ne 0 ]]
+ local path=redhat.com/bugzilla.redhat.com
+ local passfile=/home/piotr/.password-store/redhat.com/bugzilla.redhat.com.gpg
+ check_sneaky_paths redhat.com/bugzilla.redhat.com
+ local path
+ for path in '"$@"'
+ [[ redhat.com/bugzilla.redhat.com =~ /\.\.$ ]]
+ [[ redhat.com/bugzilla.redhat.com =~ ^\.\./ ]]
+ [[ redhat.com/bugzilla.redhat.com =~ /\.\./ ]]
+ [[ redhat.com/bugzilla.redhat.com =~ ^\.\.$ ]]
+ [[ -f /home/piotr/.password-store/redhat.com/bugzilla.redhat.com.gpg ]]
+ [[ 1 -eq 0 ]]
++ gpg2 -d --quiet --yes --compress-algo=none --no-encrypt-to --batch --use-agent /home/piotr/.password-store/redhat.com/bugzilla.redhat.com.gpg
++ head -n 1
+ local 'pass=#|3~cFHxLr>-1I-A'
+ [[ -n #|3~cFHxLr>-1I-A ]]
+ clip '#|3~cFHxLr>-1I-A' redhat.com/bugzilla.redhat.com
+ local 'sleep_argv0=password store sleep on display :0'
+ pkill -f '^password store sleep on display :0'
++ base64
++ xclip -o -selection clipboard

<< hang >>

Comment 2 Piotr Popieluch 2016-08-21 13:16:50 UTC
Just noticed that I'm getting this error in the journal when this happens:

org.gnome.Shell.desktop[3696]: (gnome-shell:3696): mutter-CRITICAL **: Failed to open pipe: Too many open files

Comment 3 Christophe Fergeau 2016-08-24 14:08:22 UTC
NB: This trace might contain your bugzilla password in clear text?

Looks like it's xclip which is hanging. If you kill pass and try again later, this is working as expected?

Comment 4 Piotr Popieluch 2016-08-24 14:35:11 UTC
(In reply to Christophe Fergeau from comment #3)
> NB: This trace might contain your bugzilla password in clear text?

That was stupid, changed it immediately 


> 
> Looks like it's xclip which is hanging. If you kill pass and try again
> later, this is working as expected?

Yes xclip seems to hang. Sometimes it does sometimes it doesn't. Should I reassign this to xclip?

Comment 5 Christophe Fergeau 2016-08-24 14:41:46 UTC
Yup, makes more sense there I think. Not quite sure how to debug it though. Maybe take a look at /proc/$(pidof xclip)/fd when this happens, and check how may file descriptors there are there.

Comment 6 Sebastian Jug 2016-10-02 21:46:55 UTC
I'm running into this issue as well, any progress?

Comment 7 Tom "spot" Callaway 2016-10-05 19:16:27 UTC
I'm pretty sure it is this bug:
https://bugzilla.gnome.org/show_bug.cgi?id=760745

I strongly suspect this is is an issue with wayland or gnome-shell/mutter rather than xclip.

Comment 8 Christophe Fergeau 2016-10-07 07:41:26 UTC
Reproducer from https://bugzilla.gnome.org/show_bug.cgi?id=760745#c38 seems to apply there too indeed, ie 
- pass show -c foo
 -> all is fine
- lock the screen
- unlock the screen
- pass show -c foo
 -> hangs

This seems to be correlated to "gnome-shell[4564]: Failed to open pipe: Too many open files" messages in journalctl, which points at wayland_selection_data_new() in meta-xwayland-selection.c in mutter source code. gnome-shell/Xwayland /proc/fd counts are in the hundred though (~90 for one ~160 for the other), so not sure what's happening.

Comment 9 Piotr Popieluch 2016-12-09 15:49:44 UTC
I don't experience this on F25 anymore, seems to be fixed.

(In reply to Tom "spot" Callaway from comment #7)
> I strongly suspect this is is an issue with wayland or gnome-shell/mutter
> rather than xclip.

I didn't think it was in pass/xclip either. But had no idea on which package to report it and was hoping the maintainer of pass/xclip would know where to reassign.


Anyway, it is fixed for me in f25. I don't know if it is fixed in F24 and if I should close or reassign to mutter.

Comment 10 Fedora End Of Life 2017-07-25 22:32:50 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.


Note You need to log in before you can comment on or make changes to this bug.