php5-pgsql crash on getting an error back from postgres
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php5 (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Maverick |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: php5
A connect failure in pg_connect() or an error in pg_query() will result in php exiting after printing a WARNING instead of continuing execution.
I have attached a test script that tries to connect to a non-existent DB - on Debian Lenny prints an error correctly:
$ php test.php
Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: database "mary" does not exist in /home/mattc/
Connection Failure
But on Maverick simply dies after the pg_connect() failure - note that "Connection Failure" is not printed:
$ php test.php
Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: database "mary" does not exist
in /home/mattc/
This looks like a related upstream bug:
http://
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: php5-pgsql 5.3.3-1ubuntu9
ProcVersionSign
Uname: Linux 2.6.35-22-generic i686
NonfreeKernelMo
Architecture: i386
Date: Thu Oct 14 10:23:38 2010
ProcEnviron:
PATH=(custom, no user)
LANG=en_NZ.UTF-8
SHELL=/bin/bash
SourcePackage: php5
=== Stable Release Update (SRU) information ===
IMPACT
The patch being removed does not fix any reproducible problem, so it really should not have been added in the first place.
DEV BRANCH
Natty is not open yet.
PATCH
See associated merge proposal
TEST CASE:
The php script labeled "Test script" attached to this bug reproduces the problem exactly. If the string "Connection Failure" is not seen after running it, the bug is present.
REGRESSION POTENTIAL
If we did fix the pgsql segfaulting problem reported in
https:/
It will return. However, that bug was never actually confirmed by users, and so I think the potential is "VERY LOW"
Related branches
- Ubuntu Sponsors: Pending requested
- Ubuntu Development Team: Pending requested
- Diff: 0 lines
- Ubuntu Sponsors: Pending requested
- Ubuntu Development Team: Pending requested
-
Diff: 107 lines (+7/-79)3 files modifieddebian/changelog (+7/-0)
debian/patches/php52389-pgsql-segfault.patch (+0/-78)
debian/patches/series (+0/-1)
tags: | added: regression-release |
Changed in php5 (Ubuntu): | |
assignee: | nobody → Clint Byrum (clint-fewbar) |
status: | Confirmed → In Progress |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
Changed in php5 (Ubuntu): | |
assignee: | Clint Byrum (clint-fewbar) → nobody |
tags: | added: testcase |
I've tried the test.php script on maverick and it definitely exits abruptly where one would not expect it to.
Marking Confirmed, setting Importance to High, as I believe this may affect all php5-pgsql users in a very negative way (errors should not crash your PHP!)