Bug 120025 - Many temporary files written for example gpgme-15iaRI
Summary: Many temporary files written for example gpgme-15iaRI
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.0.6.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-21 05:03 UTC by xtr806595
Modified: 2023-06-07 10:43 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (411.96 KB, image/jpeg)
2018-11-08 14:52 UTC, Buovjaga
Details
Sample tmp file (14 bytes, text/plain)
2018-11-12 10:38 UTC, Thorsten Behrens (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xtr806595 2018-09-21 05:03:18 UTC
Description:
Libre Office 6.0.6.2 writes a large number of files to the system temporary folder. These are in the form of "gpgme-15iaRI" or similar. These files accumulate in large numbers and are not deleted, requiring manual cleaning. This did not happen with version 5.4.7

Steps to Reproduce:
1.Open a file in Libre Office
2.Do anything
3.Close Libre Office

Actual Results:
Large number of files like "gpgme-15iaRI" are created in system temp folder

Expected Results:
No files created in temp folder or if they are, should be automatically deleted when do longer required.


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-GB
Module: StartModule
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no
Comment 1 Buovjaga 2018-10-13 13:45:56 UTC
gpgme: https://github.com/gpg/gpgme
I think in later versions gpgme will not be touched, if there is no need for it. Please check with version 6.1.2.

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 2 Buovjaga 2018-11-08 08:17:45 UTC
Got this as a private email:
"I reported this bug and I am using version 6.1.2 and it has this bug. I have found the bug only happens when opening .docx or .xlsx files and each file opening writes 5 gpgme-xxxxx files to the system temporary folder. These files are not automatically deleted and so accumulate in big quantity."
Comment 3 Buovjaga 2018-11-08 08:41:59 UTC
I'm not seeing any such files appearing in C:\Windows\Temp

Version: 6.1.2.1 (x64)
Build ID: 65905a128db06ba48db947242809d14d3f9a93fe
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: fi-FI (fi_FI); Calc: group threaded
Comment 4 Buovjaga 2018-11-08 14:52:06 UTC
Created attachment 146443 [details]
Screenshot

Again a direct email with:
"Here is a screen clip of my temp folder showing the files after half a day of use. I do not use gpg as I have not been able to work out how, but I have both Gpg4win and GnuPg installed on my computer."
Comment 5 Thorsten Behrens (allotropia) 2018-11-11 23:56:16 UTC
Odd, what do those files contain? Could you attach 2-3 samples?
Comment 6 Thorsten Behrens (allotropia) 2018-11-12 10:38:03 UTC
Created attachment 146560 [details]
Sample tmp file

Reporter provided sample gpgme file by private mail
Comment 7 Thorsten Behrens (allotropia) 2018-11-12 10:55:08 UTC
So those files are generated by gpgme, and used by the little helper binary gpgme-w32spawn.exe (source is here: https://github.com/nobled/gpgme/blob/master/src/gpgme-w32spawn.c - you see it's trying to delete the file at the very end).

It's odd that this would somehow not work on your system, but everywhere else - I also didn't find any matching upstream bug at the gpgme project.

Is there anything special with your system setup? Limited rights, perhaps custom install, some AV running that interferes?

Additionally, what's odd is that docx/xlsx files would trigger this; on 6.1.3 loading that shouldn't even trigger gpg code. Any chance to try a recent master build from https://dev-builds.libreoffice.org/daily/master/Win-x86_64@42/ ?
Comment 8 Thorsten Behrens (allotropia) 2018-11-13 10:17:41 UTC
Answer from xtr80659501:

I installed Libre 6.1.3 but the problem is still there. However, I have narrowed the problem down as it does not happen all the time. It is happening when I open any .docx or .xlsx file that has previously been saved with a password. This is using the regular Libre “Save with password”, NOT USING “Encrypt with GPG key”. The problem does not happen with .odt files saved with a password or with older .doc files saved with a password.

Some of the temporary files are now 32 bytes and contain the text, ~1 0x1 -1 0x4 4  0x3 1 0x8 0.

It will happen even if .docx and .xlsx files are saved with a password (not GPG) in Libre 6.1.3 so it is not a problem with files saved in an older version. This problem with .docx and .xlsx files was not in the earlier Libre 5.x

There is nothing unusual about my system. I run Avira antivirus in standard configuration. I also run EMET and Cryptoprevent but I have tried with both these disabled and the problem is still there, so they are not an issue. I notice “gpg-agent.exe” runs as a process even after Libre is shut down, but I don’t know if this is normal. I would have expected this to remove itself when no longer needed.
Comment 9 Xisco Faulí 2019-07-08 15:52:16 UTC
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 10 QA Administrators 2020-01-05 03:48:39 UTC Comment hidden (obsolete)
Comment 11 xtr806595 2020-01-05 07:21:01 UTC
I have given up trying to use GPG and I removed all components of GnuPG, GPGME etc. from the computer so the numerous temporary files are no longer being created. I cannot provide any further information.
Comment 12 Buovjaga 2020-01-05 09:52:28 UTC
Ok, let's close
Comment 13 Richard_416282 2021-03-27 16:39:49 UTC
Well, here we  go again.

Tripped into this little bug after installing LO 7.1.1.2.

LO CALC or Office *may* create these little temp files with the text of "~1 0x1 1 0x4 0", and the file name is composed of "gpgme-" concatenated with a random 6 character suffix such as "EMruuk"; "ERx766"; "Ny6urN".

Now, the funny thing is these little files are not deleted when the system is set to "wake up again", after going through a "sleep now" sequence in Windows 10.

But is it a LO problem, or is it a Windows problem when the sleep sequence is initiated? This is where further diagnosis is needed.

Im my instance , there were 4 LO documents open, when the 'system' is commanded to "sleep".
(since it is active, right now, the fault cannot be tested , until later).

The only other apps active at the time were a browser window(this page was active, on a different web page), and the Windows screen grabber tool for Win 10, "Snip & Sketch", and KeePass Password manager.

Will update, after resolution or diagnosis found, since it is altogether plausible that this is not a fault of LO, but of something else.

Flagging this as "re-opened", until further analysis will eliminate LO from "Resolved, Need more info".
Comment 14 WilfriedH 2021-05-31 14:57:23 UTC
I confirm the same behavior for 
Version: 7.1.3.2 (x64) / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded

When a ods or odt file is opened, LO creates 5 files gpgme-* (where * are 6 alphanumeric characters) in the user temp folder which are not deleted when LO is closed.
This only happens if GnuPG is installed. If GnuPG is not installed, these files are not created.

Another user reported that this does not happen with the portable version of LO.
Comment 15 z.akoma 2021-06-06 06:38:38 UTC
Have the same issue with LO 7.1.3.2
Systemconfig:
Win 10 Home 21H1
Thunderbird 78
gpg4win 4.1.14

After deinstallation of LO and using instead LO portable 7.1.3 the behaviour has changed. The opening of a writer or calc file creates 2 of those pgpme.xxxxx files in a slightly different temp folder, but they are deleted on closing LO writer or calc. The different folder is in this cae a sub folder of temp by the name LibreOfficePortableTemp, whereof in the LO installation version it was directly in the temp folder.
Comment 16 QA Administrators 2023-06-07 03:13:03 UTC Comment hidden (obsolete)
Comment 17 xtr806595 2023-06-07 04:08:21 UTC
GPG no longer installed. No further issues.
Comment 18 Buovjaga 2023-06-07 05:34:12 UTC
(In reply to xtr806595 from comment #17)
> GPG no longer installed. No further issues.

The bug is affecting several other people, so let's keep this open. If you don't want to receive mail for this, check the "Ignore Bug Mail" box in the bug report options.
Comment 19 info 2023-06-07 10:43:15 UTC
I am using LibreOffice 7.4.5.1.(x86) and GnuPG 2.2.23. 

On opening an encrypted odt document, two temporary files of type "gpgme-xxxxx" with a length of 18 bytes are created in the Windows temporary folder. They are not deleted when LibreOffice is closed.