Seg Fault when using modules linked both to libpq and libodbcpsql.

Lists: pgsql-bugs
From: Joseph Tate <jtate+pgsql(at)dragonstrider(dot)com>
To: PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org>
Subject: Seg Fault when using modules linked both to libpq and libodbcpsql.
Date: 2003-12-03 16:42:06
Message-ID: 3FCE125E.1030809@dragonstrider.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

I'm not really sure how to go about debugging this, but when I use PHP
to create large objects using libpq, with the php odbc module installed,
I get the following seg fault:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1226627936 (LWP 28034)]
0xb69f7987 in CC_send_function () from /usr/lib/libodbcpsql.so.2
(gdb) where
#0 0xb69f7987 in CC_send_function () from /usr/lib/libodbcpsql.so.2
#1 0xb6a06940 in lo_creat () from /usr/lib/libodbcpsql.so.2
#2 0xb69c6c23 in lo_import () from /usr/lib/libpq.so.3
#3 0xb69e4121 in zif_pg_lo_import (ht=2, return_value=0x8307424,
this_ptr=0x0, return_value_used=1)
at /usr/src/debug/php-4.3.2/ext/pgsql/pgsql.c:2099
#4 0xb697a542 in zend_assign_to_variable_reference ()
from /usr/local/Zend/lib/Optimizer-2.1.0/php-4.3.x/ZendOptimizer.so
#5 0x00000002 in ?? ()
#6 0x08307424 in ?? ()

When I don't have the php odbc module installed, no seg fault occurs.
What's my next step in working this out?

I don't know why libpq is calling into the libodbcpsql library. It
appears that somehow that libodbcpsql stuff is interfering with
libpq. Are there some symbols that could be clobbering each other?

I'm running postgresql 7.3.4 on RHL 9 with PHP 4.3.2 and Apache 2.0.46.

Joseph


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Tate <jtate+pgsql(at)dragonstrider(dot)com>
Cc: PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Seg Fault when using modules linked both to libpq and libodbcpsql.
Date: 2003-12-03 16:52:55
Message-ID: 1224.1070470375@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Joseph Tate <jtate+pgsql(at)dragonstrider(dot)com> writes:
> (gdb) where
> #0 0xb69f7987 in CC_send_function () from /usr/lib/libodbcpsql.so.2
> #1 0xb6a06940 in lo_creat () from /usr/lib/libodbcpsql.so.2
> #2 0xb69c6c23 in lo_import () from /usr/lib/libpq.so.3
> #3 0xb69e4121 in zif_pg_lo_import (ht=2, return_value=0x8307424,
> this_ptr=0x0, return_value_used=1)
> at /usr/src/debug/php-4.3.2/ext/pgsql/pgsql.c:2099

> I don't know why libpq is calling into the libodbcpsql library.

It's not supposed to do that.

> It appears that somehow that libodbcpsql stuff is interfering with
> libpq. Are there some symbols that could be clobbering each other?

Looks like a conflict on "lo_creat", to start with ...

regards, tom lane