Bug 144172 - An ODB hangs indefinitely when opening on Windows with another FB instance is running
Summary: An ODB hangs indefinitely when opening on Windows with another FB instance is...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.3.0 inReleaseNotes:7.3
Keywords:
: 144198 (view as bug list)
Depends on:
Blocks: Database-Import
  Show dependency treegraph
 
Reported: 2021-08-30 08:28 UTC by Mike Kaganski
Modified: 2022-01-24 12:18 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Internal FB DB hangs on opening (4.89 MB, application/vnd.sun.xml.base)
2021-08-30 08:28 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2021-08-30 08:28:48 UTC
Created attachment 174621 [details]
Internal FB DB hangs on opening

Opening the attached DB hangs on opening on Windows in Version: 7.2.1.1 (x64) / LibreOffice Community
Build ID: 3cfc32d9754d2d239bd8ce2941029c12873010c1
CPU threads: 12; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

and also in current master.

I thought that the problem was incorrect check introduced in [1], but as hvlad clarified in [2], I misunderstood the problem.

Filing it here, and attach the problematic file to allow inspection, but still assume upstream bug.

[1] https://github.com/FirebirdSQL/firebird/commit/0c73f2caef34af50f3069815c0329fbb9e105100
[2] https://github.com/FirebirdSQL/firebird/pull/6937#issuecomment-908146255
Comment 1 Julien Nabet 2021-08-30 21:06:17 UTC
*** Bug 144198 has been marked as a duplicate of this bug. ***
Comment 2 Mike Kaganski 2021-09-01 10:12:51 UTC
This is not related to the bug in the incorrect check - rather it's similar to https://github.com/FirebirdSQL/firebird/issues/4376. The problem is that FB uses a global locking mechanism with a name that is shared across all FB instances running on a session; and using a separate trace storage (which for LO is placed in LO's own temp directory) is unsupported by FB currently.

The problem is reproducible in one of the following ways:

1. Open FireBird's isql utility and connect to a local FDB; then open an ODB with embedded FB in LibreOffice, and try to open its tables;

2. Open a LibreOffice instance with an embedded FB ODB, and open a table in it; open another instance of LibreOffice (e.g., a dev build; or use another user profile) with another embedded FB ODB, and try to open its tables.

(the latter was how it occurred to me - the other running LO process was hung and invisible, and I needed to kill it).
Comment 3 Commit Notification 2021-09-02 06:40:31 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#144172: patch FB to use per-process LOCK directories

It will be available in 7.3.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.