[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4389) Segfault on backsql_open_db_conn()



On 2/6/06, Pierangelo Masarati <ando@sys-net.it> wrote:
> On Sun, 2006-02-05 at 22:14 +0000, bigsmoke@gmail.com wrote:
>
> > (gdb) bt
> > #0  0x403d1869 in malloc_trim () from /lib/libc.so.6
> > #1  0x403d1d51 in free () from /lib/libc.so.6
> > #2  0x0820ac34 in SQLGetInfo_Internal ()
> > #3  0x0820b5ec in SQLGetInfo ()
> > #4  0x080fe3ba in backsql_get_db_conn (op=0xbffffa38, dbh=0xbffffc18) at
> > sql-wrap.c:384
> > #5  0x080f3e32 in backsql_db_open (bd=0x82ea6a8) at init.c:477
> > #6  0x0808c86e in backend_startup_one (be=0x82ea6a8) at backend.c:212
> > #7  0x0808cb73 in backend_startup (be=0x82ea6a8) at backend.c:301
> > #8  0x080714e7 in main (argc=3, argv=0xbffffd64) at main.c:791
> > (gdb) bt full
> > #0  0x403d1869 in malloc_trim () from /lib/libc.so.6
> > No symbol table info available.
> > #1  0x403d1d51 in free () from /lib/libc.so.6
> > No symbol table info available.
> > #2  0x0820ac34 in SQLGetInfo_Internal ()
> > No symbol table info available.
> > #3  0x0820b5ec in SQLGetInfo ()
> > No symbol table info available.
> > #4  0x080fe3ba in backsql_get_db_conn (op=0xbffffa38, dbh=0xbffffc18) at
> > sql-wrap.c:384
> >         bi = (backsql_info *) 0x82ea7b0
> >         dbc = (backsql_db_conn *) 0x832ddf0
> >         tmp = {ldap_cid = 4294967295, dbh = 0x0}
> >         rc = Variable "rc" is not available.
>
> The error appears to be inside the ODBC library; since it works with
> other implementations (unixODBC), there might be a bug in the ODBC
> library, or there might be a misuse of the ODBC library in back-sql that
> does not result in an error with unixODBC.  In any case, to debug this I
> fear we need to look at details of the ODBC driver, which is compiled
> without symbols and thus is not going to help us.

When debugging, I long for my Gentoo days :-(  It can be quite a pain
that most binaries are stripped in Debian.

> Can you try with unixODBC?  Note that unixODBC up to 2.2.11 has an
> annoying leak in the PostgreSQL driver (I didn't check other drivers);
> the bug is now fixed in the CVS on sourceforge.

I compiled back_sql against unixODBC to be struck by the _exact same_ 
problem. What do you think, is this an odbc-postgresql bug or a glibc
bug? There _is_ an upgrade of libc6 available, so I'll try that out
and let you know if it makes a difference.

Still, as you already pointed out, it could also be a problem with
back_sql; unixODBC's isql work fine, as did iodbctest with iODBC.

Thanks for your time so far,

  - Rowan

--
Morality is usually taught by the immoral.