Bug #14070: Segfault with concurrent postgres connections

From: Date: Thu, 15 Nov 2001 16:09:26 +0000
Subject: Bug #14070: Segfault with concurrent postgres connections
Groups: php.dev 
Request: Send a blank email to php-dev+get-70571@lists.php.net to get a copy of this message
From: mw@sime.com Operating system: Linux 2.2.19ext3 PHP version: 4.0.6 PHP Bug Type: Reproducible crash Bug description: Segfault with concurrent postgres connections PHP segfaults in several places, when the following conditions occur: 1. two or more concurrent connections from the same script to the same datebase, with EXACTLY the same connect string. 2. one of the links must be closed 3. the other link is used 4. postgres sends notices (e.g. rollback; commit) etc. the problem is in pgsql.c/php_pgsql_do_connect(), around line 443. it uses the connect string as hash key to find such a connection, and if subsequenct connect calls use the same connect string, the connection seems to be reused (which is wrong. it should NOT be reused). the effects vary, sometimes it segfaults, sometimes not. -- Edit bug report at: http://bugs.php.net/?id=14070&edit=1

« previous php.dev (#70571) next »