php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14070 Segfault with concurrent postgres connections
Submitted: 2001-11-15 11:09 UTC Modified: 2001-11-15 19:17 UTC
From: mw at sime dot com Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 4.0.6 OS: Linux 2.2.19ext3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mw at sime dot com
New email:
PHP Version: OS:

 

 [2001-11-15 11:09 UTC] mw at sime dot com
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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-15 19:17 UTC] sniper@php.net
This should be fixed in CVS. Try latest CVS snapshot from
http://snaps.php.net/ and if it doesn't work, reopen this 
bug report.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 15:01:31 2025 UTC