Issue 117904 - OOo Deadlocks And Leaks When Connecting To SQLite With ODBC
Summary: OOo Deadlocks And Leaks When Connecting To SQLite With ODBC
Status: CLOSED DUPLICATE of issue 126445
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 3.3
Hardware: PC (x86_64) Linux, all
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-21 13:16 UTC by drichard
Modified: 2018-08-27 19:35 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Drivers are correct and working, database access from command line (24.84 KB, image/png)
2011-04-21 13:17 UTC, drichard
no flags Details
The odb file saved by OOo, last working step before deadlock (1.66 KB, application/octet-stream)
2011-04-21 13:18 UTC, drichard
no flags Details
Sqlite database, tbl1 contains two records. (2.00 KB, application/octet-stream)
2011-04-21 13:20 UTC, drichard
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description drichard 2011-04-21 13:16:48 UTC
Tested only on Linux, but configured a small sqlite database and then installed unixODBC drivers and installed sqliteodbc-0.89.  This allows you to gain access to a sqlite database over ODBC.  From the command line, isql is working and allows you to gain access to the database.  (png attached).

OOo correctly sees the database as found in odbc.ini and allows me to save the .odb file and then deadlocks and leaks memory when it attempts to gain access.  The database was originally on a NFS mount, and I moved it to the local disk with the same results.  

odbc.ini:

[ex1local]
Description=My SQLite test database
Driver=SQLite
Database=/tmp/ex1
# optional lock timeout in milliseconds
Timeout=1000
StepAPI= No

odbcinst.ini:

[SQLite]
Description=SQLite ODBC Driver
Driver=/usr/local/lib/libsqlite3odbc.so
Driver64=/usr/local/lib/libsqlite3odbc.so
Setup=/usr/local/lib/libsqlite3odbc.so
Setup64=/usr/local/lib/libsqlite3odbc.so
FileUsage=1
CPTimeout=
CPReuse=
Threading=2

I tried to halt it with gdb when it was deadlocked and it indicated it was here:

Program received signal SIGINT, Interrupt.
0x00007fb7dfa964d9 in rtl_uString_new_WithLength ()
   from /opt/openoffice.org3/program/../basis-link/ure-link/lib/libuno_sal.so.3
(gdb) quit


Same results with OOo 3.4 beta and LibreOffice.
Comment 1 drichard 2011-04-21 13:17:50 UTC
Created attachment 76423 [details]
Drivers are correct and working, database access from command line
Comment 2 drichard 2011-04-21 13:18:34 UTC
Created attachment 76424 [details]
The odb file saved by OOo, last working step before deadlock
Comment 3 drichard 2011-04-21 13:20:27 UTC
Created attachment 76425 [details]
Sqlite database, tbl1 contains two records.
Comment 4 r4zoli 2011-04-23 08:42:13 UTC
With OOo 3.4 beta, on ubuntu 10.10, with locally stored file, ubuntu packaged libsqliteodbc 0.80, and unixODBC, I have no such problem.

I can reach table data, it works for me.
Comment 5 drichard 2011-04-25 19:00:49 UTC
Reopening, downgraded sqliteodbc to 0.80 and re-tested with 3.3 and 3.4 beta and problem remains.  Everything works fine from the command line.  Please don't close issues unless the originator agrees, this working on Ubuntu doesn't help me at all.  We are using an OpenSuse 64bit server.  Library variations might come into play.

I can easily replicate this issue, so any debugging tips are appreciated.  This enterprise feature is unavailable to our users until this can be resolved.

sqlite version is 3.6.16

Wondering if this is an issue of it incorrectly locating the 32 version which is also installed.
Comment 6 r4zoli 2011-04-26 05:46:41 UTC
@ drichard You npt mentioned opensuse in your original post, I tested on both system, mentioned only ubuntu.
 
I tested on opensuse 11.4 32bit, with sqliteodbc from buildservice 80.1-2.1 version: 
https://build.opensuse.org/package/show?package=sqliteodbc&project=home%3Ailluusio

OOo 3.3, 3.4 beta it works for me, too.
Comment 7 drichard 2011-04-26 20:02:11 UTC
@r4zoli:  I appreciate you looking into this issue.  I am more convinced today that this is a problem in only 64bit.  Do you have the ability to install 64bit OS 11.2 to confirm?  Here is what I found:  I installed the unixODBC driver that ships with OS 11.2.  The sqlodbc package that you found doesn't work correctly in 64bit.  So I compiled it from source (version 0.89) and it compiles and installs cleanly.  From the command line using isql I can query the database perfectly.  Just to ensure that 32bit wasn't coming into play, I de-installed the 32bit sqlite drivers completely.  This required removing a few other packages that are we are not using.  I wondered if maybe OOo was finding these by accident.  So I performed the same steps again, and it's still deadlocking when it tries to open the database, chews up memory continually.  I had to kill it from the process list when it hit 10G of physical memory.  If you can't replicate the conditions, I might have to build a 11.4 VM and try it on a newer version.
Comment 8 r4zoli 2011-04-27 06:53:51 UTC
Changes platform to x86_64.
I have no 64bit test environment now, sorry I can not test more.
Comment 9 Oliver-Rainer Wittmann 2012-06-13 12:32:41 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.
Comment 10 damjan 2017-11-17 05:14:13 UTC
Duplicate of #126445. Crashes identically, and works in the latest SVN with my committed patches.

*** This issue has been marked as a duplicate of issue 126445 ***