[unixODBC-support] Segmentation fault with unixODBC+apache+PDO

Emiliano Romero eromero at sitrack.com
Tue Nov 6 20:05:53 GMT 2007


Hi!, I'm making some test to use unixODBC in our Linux servers to make a
connection pool to Informix.

 

I have

Linux stknm_tux 2.6.14-gentoo-r2 #1 SMP PREEMPT Thu Nov 24 18:20:02 UTC 2005
i686 Intel(R) Pentium(R) 4 CPU 2.26GHz GenuineIntel GNU/Linux

Informix IDS 10

unixODBC installed with emerge.

Php 5.2.4

Apache 2.2

PECL::PDO

PECL::PDO_ODBC

 

My config is.

 

----------------------------------------------------------------------------
-------

# cat odbcinst.ini

[ODBC]

Trace       = Yes

Trace File      = /tmp/sql.log

Pooling = Yes

informix-p=Installed

 

[informix-p]

Description = Informix odbc IDS 10

TRANSLATIONDLL=/opt/informix/lib/esql/igo4a304.so

Driver = /opt/informix/lib/cli/libifcli.so

CPTimeout = 120

FileUsage = 1

DontDLClose = 1

----------------------------------------------------------------------------
----------

# cat odbc.ini

[stknm_tux_odbc]

Driver=informix-p

Server=stknm_tux

Database=db3g

CLIENT_LOCALE=en_US.819

DB_LOCALE=en_US.819

TRANSLATIONDLL=/opt/informix/lib/esql/igo4a304.so

----------------------------------------------------------------------------
# cat prueba.php

<?php

$db = new PDO("odbc:stknm_tux_odbc", "informix", "InfUser");

$casoTipo = $db->prepare("SELECT casotipoid from casotipo");

$casoTipo->execute();

while($result = $casoTipo->fetch(PDO::FETCH_ASSOC)) {

  echo "<pre>";

  print_r($result);

  echo "</pre>";

}

?>

----------------------------------------------------------------------------
--------------



PROBLEM:

This works fine, but sometimes, it get's me an error in the browser saying
that the page don't exists.

 

/var/log/apache2-php5/Error_log

[Tue Nov 06 18:20:26 2007] [notice] child pid 28897 exit signal Segmentation
fault (11)

[Tue Nov 06 18:20:37 2007] [notice] child pid 28899 exit signal Segmentation
fault (11)

[Tue Nov 06 18:23:25 2007] [notice] child pid 28988 exit signal Segmentation
fault (11)

[Tue Nov 06 18:23:50 2007] [notice] child pid 29023 exit signal Segmentation
fault (11)

 

This errors are random. So I run dbg to see what was happening. This is the
output of dbg:

 

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread -1420498032 (LWP 30049)]

0xb7186ad4 in ?? () from /usr/lib/libodbc.so.1

 

(gdb) bt

#0  0xb7186ad4 in ?? () from /usr/lib/libodbc.so.1

#1  0xab54b798 in ?? ()

#2  0xb7d45b32 in pthread_mutex_unlock () from /lib/libpthread.so.0

#3  0xb7153b75 in ?? () from /usr/lib/libodbc.so.1

#4  0x00007548 in ?? ()

#5  0x00000002 in ?? ()

#6  0xffffffff in ?? ()

#7  0x00000000 in ?? ()

 

 

I test the same script with same config, but using PDO_INFORMIX, not using
ODBC, and it works fine. But I'm looking for a solution with connection pool
to see it has better performance.

 

Thanks and Regards,

 

Emiliano Romero

 <http://www.sitrack.com/> www.sitrack.com

 <mailto:eromero at sitrack.com> eromero at sitrack.com

 



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.
If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20071106/a1531bd9/attachment.html>


More information about the unixODBC-support mailing list