This bug was closed, possibly because of you not getting answer from me.
Sorry, I missed your post in 2022-10-09. A bit more information is
below, and it's good news.


* 2022-10-09 19:21:17+0200, Sven Eckelmann wrote:
> On Thu, 05 Aug 2021 21:08:44 +0300 Teemu Likonen <tliko...@iki.fi> wrote:
>> I have more information about Libreoffice's freezes when "Tools /
>> Options..." is opened. There is "gpg" process running forever and taking
>> lots of CPU time. The "ps" command says that command line is:
>> 
>>     gpg --batch --no-sk-comments --status-fd 37 --no-tty --charset utf8 \
>>         --enable-progress-filter --exit-on-status-write-error --display :0 \
>>         --ttyname /dev/pts/0 --ttytype xterm-256color --logger-fd 41 \
>>         --with-colons --with-keygrip --list-secret-keys --
>
> Can you run `sudo strace -p $PID_OF_GPG_PROCESS` to check if it tries to 
> access a file and then fails doing that? If this is the case, please check 
> with `ls -l /proc/$PID_OF_GPG_PROCESS/fd/`, which is the file behind the 
> mentioned file descriptor in the strace output.

I started "loffice" executable and chose "Tools / Options". Then I
checked the PID number of gpg with command "ps x | grep gpg". Then used
"sudo strace -p $PID" which writes the following line all the time (in
one line but here wrapped):

    fcntl(6, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET,
    l_start=1073741824, l_len=1}) = -1 EACCES (Permission denied)

Command "ls -l /proc/$PID/fd" said:

    lrwx------ 1 dtw dtw 64 2022-12-23 15:55:01 0 -> /dev/null
    l-wx------ 1 dtw dtw 64 2022-12-23 15:55:01 1 -> pipe:[251904]
    lrwx------ 1 dtw dtw 64 2022-12-23 15:55:01 2 -> /dev/null
    l-wx------ 1 dtw dtw 64 2022-12-23 15:55:01 24 -> pipe:[251901]
    l-wx------ 1 dtw dtw 64 2022-12-23 15:55:01 28 -> pipe:[262145]
    lr-x------ 1 dtw dtw 64 2022-12-23 15:55:01 3 -> 
/home/dtw/.gnupg/trustdb.gpg
    lr-x------ 1 dtw dtw 64 2022-12-23 15:55:01 4 -> 
/home/dtw/.gnupg/pubring.kbx
    lrwx------ 1 dtw dtw 64 2022-12-23 15:55:01 5 -> socket:[258750]
    lr-x------ 1 dtw dtw 64 2022-12-23 15:55:01 6 -> /home/dtw/.gnupg/tofu.db

> If it is really failing because of this, please teardown the rules for
> apparmor with `sudo aa-teardown` and then restart libreoffice and try
> to go to the menu which was mentioned earlier. See also #955271 for a
> patch to /etc/./apparmor.d/usr.lib.libreoffice.program.soffice.bin and
> information how it will be fixed in future Debian versions

I continued:

    $ sudo aa-teardown 
    Unloading AppArmor profiles 

Started "loffice" again, and now it didn't hang anymore and there is no
running "gpg" process. Most likely the process ended quickly.

So, thank you. My bug report is essentially the same as #955271.

-- 
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 6965F03973F0D4CA22B9410F0F2CAE0E07608462

Attachment: signature.asc
Description: PGP signature

Reply via email to