Open foo.odb file (tested with a HSQL embedded file), do some work in it. Close the file. Result: LibreOffice still has an open fd on foo.odb Expected result: LibreOffice closes all its open fds on foo.odb TODO: test with a non-embedded odb file. This becomes extremely annoying when foo.odb is on a CIFS mount actually served by a Windows computer, since it is exclusively locked by that open fd AND NO ONE CAN OPEN IT ANYMORE, not even the LibreOffice that has the leaked fd (probably since it tries to open a new fd for the same file, but the exclusive locking makes that fail).
On pc Debian x86-64 with master sources updated today and 4.2 updated some days ago, I don't reproduce this. Now here's the simple test I made: - Open 2 consoles - console 1 : open an empty hsqldb file on LO - console 2 : lsof|grep <name of the file>, about 20 lines - console 1 : close the hsqldb file (after having done nothing on it I must recognize) - console 2 : the same lsof command gives nothing Since the only remaining 4.1 version to be released is 4.1.6, I think it could be useful you give a try to 4.2.2 If you can't, could you try to find the minimal steps to reproduce this? BTW, I build in debug mode so if you want me to test something to retrieve console logs, don't hesitate! :-)
Further testing shows: 1) Not reproducible with *empty* HSQLDB; need a table in the database. (The table itself can be empty, though.) 2) Reproducible on one of my machines, but not on the other. Both amd64 Debian machines... different versions, though. (same LibreOffice version) 3) Not reproducible on LibreOffice 4.2.3.3 (TDF build)
No, even further testing shows that the bug is just more elusive than I thought: 1) Reproducible on *both* machines 2) With 4.1 *and* with 4.2 I "found" the bug in real-life scenarios, but here is a synthetic one that always works (reproduces the bug): 1) Start with an empty .odb 2) Use wizard to create a table 3) Category: Business / Sample Tables: Assets / Select all field Next 4) Next again 5) Use an existing field as primary key: AssetID, "Auto value" *checked* Next 6) Insert data immediately Finish 7) Do not insert any data. Close the Table Window. 8) Close the database window By contrast, reopening the same .odb, entering data in the table and then closing does not trigger the bug.
Obviously, one needs to have another LibreOffice window (e.g. a writer document) open during the proceedings to reproduce the bug; else the soffice(.bin) process exits and obviously the fd is closed then.
I gave a try with step by step process of comment 3 but I didn't reproduce this. However, it was with master sources updated today. I'll try to find some time to give a try with 4.2 sources (that I must build first).
I don't reproduce this with 4.2 sources updated 2 days ago or with 4.2.4 LO Debian package, I don't reproduce this. BTW, do you register the DB? Do you save odb file when closing?
(In reply to comment #6) > I don't reproduce this with 4.2 sources updated 2 days ago or with 4.2.4 LO > Debian package, I don't reproduce this. > BTW, do you register the DB? No. > Do you save odb file when closing? Yes. I just re-reproduced with master updated yesterday: Author: Markus Mohrhard <markus.mohrhard@googlemail.com> 2014-05-30 05:15:01 Committer: Markus Mohrhard <markus.mohrhard@googlemail.com> 2014-05-30 05:16:46 remove fsanitize=address from libgetuid.so makefile Change-Id: I3d292638b76ed09d84df36d096f70c9496a23fdf
To check for the leaked fd, do (after closing the .odb): $ lsof -p$(pidof soffice.bin)|grep odb_file_name soffice.b 17515 user 85uW REG 9,1 3323 45679326 /home/user/New Database.odb
Perhaps it's because I use debug mode but I still can't reproduce by following comment3 :( (master sources updated today) lsof -p$(pidof soffice.bin)|grep julien1 lsof: no process ID specified Just noticed these logs: warn:legacy.osl:21163:1:dbaccess/source/core/dataaccess/ModelImpl.cxx:895: caught an exception! in function:static bool dbaccess::ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors(const com::sun::star::uno::Reference<com::sun::star::embed::XStorage>&) type: com.sun.star.uno.DeploymentException message: component context fails to supply service 'com.sun.star.io.TempFile' of type 'com.sun.star.io.XTempFile' context: N4cppu16ComponentContextE warn:legacy.osl:21163:1:dbaccess/source/core/dataaccess/ModelImpl.cxx:804: ODatabaseModelImpl::commitRootStorage: could commit the storage!
(In reply to comment #9) > Perhaps it's because I use debug mode but I still can't reproduce by > following comment3 :( (master sources updated today) > lsof -p$(pidof soffice.bin)|grep julien1 > lsof: no process ID specified This looks like you don't have any LibreOffice running. Did you see comment 4? You cannot let LibreOffice exit, so you must have some *other* document (any, Calc, Writer, Base, Impress, ...) open at the same time, that you do *not* close.
You're right! I was focused on comment3 and had overlooked comment4. I could reproduce the problem and lsof|grep <filename> gives: 24 lines: - 18 soffice.b - 1 rtl_cache - 1 OfficeIPC - 1 gdbus - 1 ICEConnec - 1 Selection - 1 gmain
Created attachment 100200 [details] Valgrind trace with --track-fds=yes Here's a Valgrind trace with "--track-fds=yes" added in this line in instdir/program/soffice: VALGRINDCHECK="valgrind --tool=$VALGRIND --track-fds=yes --trace-children=yes $valgrind_skip --num-callers=50 --error-limit=no "
Adding self to CC if not already on
I see that retained open file on Windows Vista with LibreOffice ... Version: 5.1.0.0.alpha1+ Build ID: 21a6b99748db8a970ef7dc90d40e07901135b89a TinderBox: Win-x86@39, Branch:master, Time: 2015-06-03_05:45:39 Locale: en-CA (en_CA) as indicated by my inability to delete the file after closing its window. The behavior on Linux is different: at least once I was able to delete the .odb while the LibreOffice window was still open.
I should have said: my .odb was on the local disk.
(In reply to Terrence Enger from comment #14) > I see that retained open file on Windows Vista with LibreOffice ... > Version: 5.1.0.0.alpha1+ > Build ID: 21a6b99748db8a970ef7dc90d40e07901135b89a > TinderBox: Win-x86@39, Branch:master, Time: 2015-06-03_05:45:39 > Locale: en-CA (en_CA) > as indicated by my inability to delete the file after closing its window. > > The behavior on Linux is different: at least once I was able to delete > the .odb while the LibreOffice window was still open. That's a OS difference, not (necessarily) a LibreOffice difference. On Unix/Linux, one can delete an open file (it disappears from the directory, but it stays "under the hood" and is automatically deleted when it is closed); on Windows one cannot delete an open file.
Created attachment 116307 [details] lsof after creating embedded HSQLDB database Sheesh. Once again I have managed to overlook the obvious. The files appear to be left open after the database wizard creates the file, 17 after creating embedded HSQLDB, 9 after creating embedded Firebird.
** Please read this message in its entirety before responding ** 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 on a currently supported version of LibreOffice (5.1.5 or 5.2.1 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System 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) http://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: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20160920
still reproduced in 5.2.3.1 (Debian package)
** Please read this message in its entirety before responding ** 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 http://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://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
lsof still shows newly created .odb files left open after I close the Base window. Indeed there seem to be 17 fd's left open, both embedded firebird and embedded hsqldb, both if I go directly into edit database (without making any changes) or not. These observations are with daily linux dbgutil bibisect repository version 2017-12-01 running on debian buster.
Working on debian-buster in daily Linux dbgutil bibisect repository version 2018-12-18, I created a new embedded Firebird database and one table. After I close the .odb and LibreOffice displays Start Center, lsof shows the .odb file open 8 times.
Dear Lionel Elie Mamane, 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://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Dear Lionel Elie Mamane, 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
Lionel: following the fix for tdf#144256, any update for this one?