[Pkg-erlang-devel] Bug#602342: [erlang-odbc] Always fails to connect

Sergei Golovan sgolovan at nes.ru
Thu Nov 4 11:15:25 UTC 2010


reassign 602342 libsqliteodbc
tags 602342 + patch
thanks

On Thu, Nov 4, 2010 at 9:43 AM, Sergei Golovan <sgolovan at nes.ru> wrote:
> On Thu, Nov 4, 2010 at 1:21 AM, Emil Langrock <emil.langrock at gmx.de> wrote:
>>
>>> odbc:start().
>>>
>> odbc:connect("Driver=SQLITE3;Database=/var/lib/ejabberd_archive/mod_archive.sqlite3;",
>> [{scrollable_cursors, off}]).
>>
>> =ERROR REPORT==== 3-Nov-2010::22:46:50 ===
>> ODBC: received unexpected info: {tcp_closed,#Port<0.670>}
>>
>>
>> =ERROR REPORT==== 3-Nov-2010::22:46:50 ===
>> ** Generic server <0.57.0> terminating
>> ** Last message in was {#Port<0.668>,{exit_status,139}}
>> ** When Server state == {state,#Port<0.668>,
>>                               {<0.35.0>,#Ref<0.0.0.109>},
>>                               <0.35.0>,undefined,on,undefined,undefined,off,
>>                               connecting,undefined,0,
>>                               [#Port<0.666>,#Port<0.667>],
>>                               #Port<0.669>,#Port<0.670>}
>
> odbcserver (the Erlang port which talks to unixodbc) segfaults when
> connecting to
> SQLite3 database. Seems like a bug in odbcserver. I'll try to
> investigate it. Though I think the fix will appear in unstable and
> testing first, not in experimental (where your 1:14.b-dfsg-1 comes
> from).

In fact, the segfault happens in /usr/lib/odbc/libsqlite3odbc.so which
is part of
libsqliteodbc package.

After some digging in the code I've found that setting connect attribute
SQL_AUTOCOMMIT leads to the segfault. (Perl and python do this other way,
so they work.)

Appears that the author of sqliteodbc has fixed this bug (see changelog for
version 0.87 at http://www.ch-werner.de/sqliteodbc/). I've extracted a small
patch which make crach gone and attached it to this message.

So, I'm reassigning this bug to libsqliteodbc.

Cheers!
-- 
Sergei Golovan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqliteodbc.diff
Type: application/octet-stream
Size: 1977 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-erlang-devel/attachments/20101104/74883f90/attachment-0001.obj>


More information about the Pkg-erlang-devel mailing list