Bug 140332 - FIREBIRD - LibreOffice Vanilla fails to load tables or reports from an embedded Firebird ODB file
Summary: FIREBIRD - LibreOffice Vanilla fails to load tables or reports from an embedd...
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: ARM Mac OS X (All)
: highest critical
Assignee: Tor Lillqvist
URL:
Whiteboard: target:7.2.0 target:7.1.2
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-11 10:33 UTC by Alex Thurgood
Modified: 2021-04-02 10:34 UTC (History)
5 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 Alex Thurgood 2021-02-11 10:33:24 UTC
Description:
1) Attempting to reproduce bug 140285

2) Downloaded test ODB file provided by original reporter

3) Activated macros on loading ODB file

4) Noticed error message "Error #1 (An exception occurred : ) at line 1302 in OpenConnection" - clicked on OK to make error message go away

5) Tried to display a table, or load any report, generates an error message :

firebird_sdbc error:
*lock manager error
*failed to create database /Users/alex/Library/Containers/com.collabora.libreoffice-free/Data/Library/Application Support/LibreOfficeVanilla/4/user/temp/lu17362qz8l.tmp/lu17362qz8u.tmp/firebird.fdb
*Exiting before completion due to errors
caused by
'isc_service_query'

Steps to Reproduce:
See above

Actual Results:
Data fails to load in any selected table, no reports can be run.

Expected Results:
Table data should be loaded and displayed.
Reports should be loaded and displayed.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.0.4.4
Build ID: 841d27ff4cd6850c43bdd7333f8373cae686520d
CPU threads: 8; OS: Mac OS X 11.2; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded
Comment 1 Xisco Faulí 2021-02-11 14:24:40 UTC
Hi Alex,
Does it happen if you download LibreOffice from https://www.libreoffice.org/download/download/ ?
Comment 2 Xisco Faulí 2021-02-11 14:45:55 UTC
While checking this issue on Linux, I found bug 140339, which is only reproducible in 7.2 master
Comment 3 Alex Thurgood 2021-02-12 08:04:51 UTC
Hi Xisco,

No, the problem doesn't exist on :

TDF download (this was RC1)
Version: 7.1.0.1
Build ID: b585d7d90ab863bf29b2d110c174c0c2a98f3ee4
CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded

and also doesn't exist on:
TDF Version: 7.0.3.1
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded
Comment 4 Alex Thurgood 2021-02-12 09:13:59 UTC
Also tested with TDF
Version: 7.1.0.3 / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded

Not reproducible there either. This one's squarely in Collabora's territory.
Comment 5 Tor Lillqvist 2021-02-19 18:04:08 UTC
I finally spent some (of my own) time to debug this, and the root cause of the bug is that Firebird uses System V semaphores on macOS, and those don't work in a sandboxed process. Trying a patch that makes it use POSIX semaphores instead, let's see.
Comment 6 Commit Notification 2021-02-19 21:46:12 UTC
Tor Lillqvist committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/22e89d2ccd3ad3ee1b5ee00aebadd3d5a38fd5dd

tdf#140332: Can't use System V semaphores in a sandboxed macOS process

It will be available in 7.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 7 Tor Lillqvist 2021-02-21 09:03:12 UTC
Cherry-pick to 7.1 awaiting review in https://gerrit.libreoffice.org/c/core/+/111256 .
Comment 8 Tor Lillqvist 2021-02-22 09:09:16 UTC
(Note that this being "assigned" to me doesn't imply anything, really. It does not give random people any entitlement to demand that I do anything specific about it, more than what I did just for fun.)
Comment 9 Alex Thurgood 2021-02-22 10:03:19 UTC
@Tor : thanks for taking a stab at this.

Which version of LO Vanilla should I be testing this against ?
Current 7.4.0.4 still displays the issue, so I'm assuming a later build integrating your change hasn't yet made it to the AppStore release.


The problem didn't exist for me in

Version: 7.1.0.3 / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded
Comment 10 Commit Notification 2021-02-23 14:14:50 UTC
Tor Lillqvist committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/9d6159e86f32cc1fa96724e031d02ffaadd60337

tdf#140332: Can't use System V semaphores in a sandboxed macOS process

It will be available in 7.1.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 11 Buovjaga 2021-03-15 18:29:58 UTC
This was briefly discussed in the Firebird-devel list and looks like the next version (3.0.8?) will have a solution: https://github.com/FirebirdSQL/firebird/commit/6ec7a10aa3b772527320729b6c67d6bc83258d39
Comment 12 Alex Thurgood 2021-03-18 19:49:20 UTC
(In reply to Buovjaga from comment #11)
> This was briefly discussed in the Firebird-devel list and looks like the
> next version (3.0.8?) will have a solution:
> https://github.com/FirebirdSQL/firebird/commit/
> 6ec7a10aa3b772527320729b6c67d6bc83258d39

I won't be getting my hopes up anytime soon 😉

Much as I like to help out the actors in the LO workspace with my modest small business contributions, having a virtually  nonfunctional embedded database support renders Collabora and LO Vanilla useless for me.

Back to TDF LO it is, or something else that actually still works for my business use case, even if it turns out to be proprietary non-Foss.
Comment 13 Julien Nabet 2021-03-21 09:10:13 UTC
I know "Vanilla" LO isn't recent but I still find it weird that MacOs version has this name.
Indeed, "Vanilla LO" should be the same "TDF LO", so a not customized version (see https://en.wikipedia.org/wiki/Vanilla_software).
Comment 14 Alex Thurgood 2021-04-02 10:34:08 UTC
(In reply to Julien Nabet from comment #13)
> I know "Vanilla" LO isn't recent but I still find it weird that MacOs
> version has this name.
> Indeed, "Vanilla LO" should be the same "TDF LO", so a not customized
> version (see https://en.wikipedia.org/wiki/Vanilla_software).

Yes, there is a bit of a misnomer here, given that LO Vanilla as available through the AppStore is anything but a "vanilla" version of LO, but we digress ;-)