Bug 71550 - Other: Empty backups
Summary: Other: Empty backups
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.6.6.2 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:24.2.0 target:7.6.0.2
Keywords:
Depends on:
Blocks: AutoSave-AutoRecovery-Backup
  Show dependency treegraph
 
Reported: 2013-11-12 20:58 UTC by Vince Radice
Modified: 2023-08-03 01:37 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Listing of directory showing empty files (i.e. files with 0 byte count) (1.29 MB, text/plain)
2013-11-12 20:58 UTC, Vince Radice
Details
abc...odg: 243 character long named file that failes autosave, leaving 0-sized file (11.23 KB, application/vnd.oasis.opendocument.graphics)
2023-07-14 18:47 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vince Radice 2013-11-12 20:58:35 UTC
Created attachment 89106 [details]
Listing of directory showing empty files  (i.e. files with 0 byte count)

Problem description: 

Steps to reproduce:
1. ....Not sure
2. ....
3. ....

Current behavior:There were over 26,000 empty backups in ~/.config/libreoffice/4/user/backup.  At 10:00 AM over 8,000 had been created since midnight.  All were empty.  I have attached a ls -la from that directory.

Expected behavior: at least one would have been a valid backup.

              
Operating System: Fedora
Version: 3.6.6.2 release
Comment 1 Robert Großkopf 2013-11-13 19:28:31 UTC
How do you get backups from a *.odb-file? I have searched all my different installations of LO - have over 30 versions installed for testing. I couldn't find any file in any backup-folder of this versions.

My system: OpenSUSE 12.3 64bit rpm
Comment 2 Vince Radice 2013-11-14 03:27:36 UTC
Robert,  have you looked that the directory that I posted?  Does it exist?  Is there anything in it?
Comment 3 Robert Großkopf 2013-11-14 07:06:52 UTC
(In reply to comment #2)
> Robert,  have you looked that the directory that I posted?  Does it exist? 
> Is there anything in it?

The folders do exist. I have three folders in ~/.config/libreoffice : 3, 4 and 4-suse (also two old folders, renamed while testing something). In this folders I could open the /user/backup -folder, but there is nothing inside.

Backup for database-files doesn't work with the backup-functions of LO. It's because the data in the database where saved independent of the saving-function of LO.
Comment 4 ign_christian 2014-06-26 03:54:29 UTC
Following previous comment by Robert about backup behaviour for database files, should be notabug.

May be I'm wrong, please reopen..
Comment 5 Vince Radice 2014-06-26 05:00:09 UTC
I am still experiencing the problem.  I had changed some of the backup values in the options (don't remember what was changed) but I still have to go in and delete these empty files.  
The database engine is hsql.  From what I see the data is stored in the odb file.  In there also are my forms, queries, and reports.  I discovered this by opening the odb file with an archive manager (ark I believe).
I have thought about changing the database engine and tried mysql but the documentation that I found assumes that you know all about it which I don't.
I have learned to live with the quirks by manually copying the database and archiving it myself.

I am reopening this per ign Christian.
Comment 6 Robert Großkopf 2014-06-26 19:48:18 UTC
If you only want to save the database-file when the file has just been opened, try the following macro and link it to Tools → Customize → Open Document:

https://bugs.freedesktop.org/show_bug.cgi?id=80072#c1

The macro copies one file of the opened *.odb-file to to the Backup-Folder of LO. It will copy up to 5 files and then it will delete the oldest file with copying a new with the same name.

So you will have a backup without copying the file by hand.

Could it be Bug80072 has the same intention as this bug?
Comment 7 Joel Madero 2014-11-05 04:04:18 UTC
Never independently confirmed by QA team - moving to UNCONFIRMED to make sure they see it. Thanks for your patience and understanding.
Comment 8 Alex Thurgood 2014-11-05 10:10:36 UTC
@Vince : please retest with a latest production release of LibreOffice and a clean user profile to see if this is still happening.

LO is normally incapable of producing backup database files using the builtin backup mechanism used for other document types. This might explain why you were getting 0 byte length files.

If you feel that the issue is really that LO should be able to create such backup files, i.e. a new feature, please change your title to reflect that.
Comment 9 Robert Großkopf 2014-11-10 18:38:35 UTC
I have had a look at ...user/backup for other backup-files I created with a macro. There were a lot backup-files in the folder. All except one were created between 2014-10-14 8:23 and 2014-10-14 8:27. Beginning with the name of the *.odb-file and ending with _0odb up to _1643odb . Most of the files seem to be empty.
I don't know which LO-version I used at that time. Could be a 4.2-version, because I had created an example-database for Base Handbook.

There are some macros inside. Don't know the reason for this backups, but I could confirm the behavior happend also here.

My System: OpenSUSE 12.3 64bit rpm Linux with many different LO-versions for testing ...
Comment 10 Alex Thurgood 2015-01-03 17:40:00 UTC Comment hidden (no-value)
Comment 11 QA Administrators 2016-01-17 20:02:02 UTC Comment hidden (obsolete)
Comment 12 Robert Großkopf 2016-01-18 20:18:02 UTC
This bug is hard to reproduce. At this moment the .../user/backup-folder is complete empty here. No file inside, also no database-file.
Comment 13 Vince Radice 2016-01-19 01:40:46 UTC
I received a request to see if this was still happening.  I am running Version 5.0.0.5 and it is still happening.  I had turned off taking a backup by going to Options - Load/Save - General and clearing Always create backup copies.  I turned it back on, opened a Base window and opened a database.  After about 4 hours, there were over 86,000 entries in ~/.config/libreoffice/4/user/backup.  So, to me it looks like it is still happening.  BTW, I am turning backup back off.
Comment 14 Vince Radice 2016-01-19 02:05:40 UTC
I am currently running Fedora 21 64 bit.Version 5.0.0.5 is the latest version available through yum.  I am working on upgrading all of my systems to Fedora 23 with my main desktop as the last one to make sure I work out all of the kinks in the upgrade process.  It looks like Fed 23 has version 5.0.4.  I will try again after upgrading to 23.
Comment 15 Muhammet Kara 2016-06-22 13:34:15 UTC
Couldn't reproduce with 5.3.0.0 (master) or 5.1.4.1
Comment 16 QA Administrators 2017-09-01 11:15:21 UTC Comment hidden (obsolete)
Comment 17 TBeholder 2017-10-21 16:17:13 UTC
I had this happen in 5.1.6.2 (right when "recovery" managed to destroy half of a sheet, at that) - most likely it was because of a crash, since there's a lock file next to it.
Well, that and it crashed from as much as looking at it funny.

Do you have a bunch of corresponding "~lock.*#" files next to those zero-sized "*.bak" files too?

(And just to be sure, do you have free space on that partition when this happens? I had some bug a few years ago that spammed ~/.xsession-error with several GB of error messages until it suffocated partition with /home/ - and then there's ~/.cache etc)
Comment 18 QA Administrators 2018-10-22 02:49:55 UTC Comment hidden (obsolete)
Comment 19 QA Administrators 2021-03-15 04:21:31 UTC Comment hidden (obsolete, spam)
Comment 20 Justin L 2023-07-13 21:41:57 UTC
With
-no response for many years (since 5.0)
-no reproducible steps
-no duplicates and very few CCs
I'm going to close this as INSUFFICIENTDATA
Comment 21 Robert Großkopf 2023-07-14 05:52:48 UTC
We shouldn't close a bug if there isn't asked for new information.

I will get this buggy behavior while editing forms in Base with macros. Sometimes I see the GUI seems to hang, but is available a little bit later. Then I have a look into the backup folder and could see all this backups.

If we know reproducable steps we will report. But it is still a bug, also in LO 7.*!
Comment 22 Justin L 2023-07-14 18:47:15 UTC
Created attachment 188379 [details]
abc...odg: 243 character long named file that failes autosave, leaving 0-sized file

Since autosave is now the default in 7.6, the steps are simply to open the document and make a change. Every 10 minutes another 0-sized file is created (assuming a modification was made to trigger autosave).

The problem in this particular case is that it is trying to create a lock file, and adding the lock prefix pushes the filename beyond the 255 character limit.
Comment 23 Commit Notification 2023-07-14 20:21:53 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/65db5b6a34c4cb781e7a9ab813801a0e0d114da5

tdf#71550 autosave: remove empty, new file on failed autosave

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 24 Commit Notification 2023-07-15 04:59:41 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/973ef754442027b7508efbe8a7fb714856a72d1a

tdf#71550 autosave: remove empty, new file on failed autosave

It will be available in 7.6.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 25 Commit Notification 2023-08-03 01:37:50 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/eef0c5d4d45ba35acfb6d8f7551fe565ca4badaa

tdf#71550 autorecovery: use osl::File::Remove when isEmptyFileUrl

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.