Bug 123079 - Libreoffice leave tmp files in with new version
Summary: Libreoffice leave tmp files in with new version
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.0.0.beta1+
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2019-01-31 05:35 UTC by Gaurav Arora
Modified: 2023-11-24 03:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gaurav Arora 2019-01-31 05:35:24 UTC
Description:
Running LibreOffice conversion through LibreofficeKit leaves the .tmp folder

I am using lloconv to convert files using LibreOfficeKit.

With earlier version, it was not leaving any temp folder behind tested with 1:5.2.7-1+deb9u4

1:6.1.4-1~bpo9+1 Leaves temp folder starting with lu*.tmp in the temporary folder.


Steps to Reproduce:
1. Install affected Libreoffice
2. Install https://gitlab.com/ojwb/lloconv
3. Convert any sample word or ppt document using
lloconv document tmp.html
4. Check for lu*.tmp empty folder in temp directory.

Actual Results:
Leaves lu*.tmp empty folder in temp directory

Expected Results:
No tmp file or folder left in temp directoryu


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Mike Kaganski 2019-01-31 05:56:15 UTC
I'd suppose that's something to file against that "lloconv". Only if that turns out to be not the converter wrapper's bug, should it be filed here, and with steps not involving installation of third-party software.
Comment 2 Olly Betts 2019-01-31 19:06:41 UTC
lloconv is just a minimal command-line wrapper around the LibreOfficeKit API - it just calls documentLoad() then saveAs().  Any temporary files or directories are being created by LibreOffice.

To demonstrate a bug in the LibreOfficeKit API requires some code to call it, and lloconv is the example program for using the LibreOfficeKit API suggested by yourselves here: https://docs.libreoffice.org/libreofficekit.html
Comment 3 Mike Kaganski 2019-02-01 17:00:18 UTC
Reproducible.

Regression from https://git.libreoffice.org/core/+/005abf983d34042a7ced46d886f8ef2250cb3fce
Comment 4 Michael Meeks 2019-02-02 01:12:49 UTC
Hmm - so in Online it is necessary to initialize with the system temporary paths, and then re-initialize that with new paths inside the chroot jail.

Nevertheless - this should work - I assume the bug is caused by not cleaning up the previous .tmp folder from the first initialization here.

Possibly we want to do that "re-initialization" only in the SECOND_INIT phase - it would be good to test for:

+        if (eStage == SECOND_INIT)

just for that piece, any chance of a test ? =) should special-case it just for LOK - where leaking one .tmp directory on the system for the long-lived forkit is no big deal.

Thanks !
Comment 5 Mike Kaganski 2019-02-02 09:53:18 UTC
I cannot run lloconv with current master (to try the suggestion in comment 4) unfortunately :-( - LibreOffice segfaults. Master build works fine when started normally (in UI mode, or using --convert-to).
Comment 6 Gaurav Arora 2020-10-05 05:31:21 UTC
I tried change proposed in comment 4 of `if (eStage == SECOND_INIT)` by Mike by compiling libreoffice locally with lloconv.

But it doesn't solves the issue. It still leaves the temporary file behind. 



Another thing, we noticed while working on this was temporary files is left behind only during pre-initialisation. When the same instance of LibreOfficeKit libreoffice is reutilized, it doesn't leave temporary folder for each processed file. Just a single temporary folder is created and not cleaned up.
Comment 7 Michael Meeks 2020-10-05 16:24:02 UTC
Hmm; so - in general I'd really suggest consolidating on converting in a safer way by using the REST API of Online; there are some numbers around that here: https://www.collaboraoffice.com/document-conversion/ it does all the isolate you need there in a standard packaged form.
Comment 8 QA Administrators 2023-11-24 03:15:44 UTC
Dear Gaurav Arora,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug