Bug 150828 - Apache crashes when mod_python and php both access MySQL
Summary: Apache crashes when mod_python and php both access MySQL
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: MySQL-python
Version: 4.0
Hardware: i686
OS: Linux
Target Milestone: ---
: ---
Assignee: Tom Lane
QA Contact:
Whiteboard: RHEL4U3NAK
: 189554 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2005-03-10 23:54 UTC by Cory Wright
Modified: 2013-08-01 08:47 UTC (History)
6 users (show)

Fixed In Version: RHBA-2007-0295
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-05-08 00:23:48 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0295 normal SHIPPED_LIVE MySQL-python bug fix update 2007-04-28 18:36:54 UTC

Description Cory Wright 2005-03-10 23:54:15 UTC
Description of problem:
Under Red Hat Linux ES 4, on x86, when using Apache with
mod_python+MySQL-python and PHP+mysql, Apache crashes when a
mod_python page is loaded that accesses MySQL.  I commented out the
'extension=mysql.so' line in /etc/php.d/mysql.ini, restarted Apache
and everything worked fine in the mod_python application.  The PHP
application is able to access MySQL in either case. 

Version-Release number of selected component (if applicable):
The versions are the latest available from Red Hat:
# rpm -q mod_python MySQL-python php httpd mysql

How reproducible:
Every time.  If I comment out the line in /etc/php.d/mysql.ini the
problem goes away, if I re-enable mysql in php, the problem returns.

Steps to Reproduce:
1.  Ensure that Apache is loading php+mysql and mod_python
2.  Create a page that uses mod_python and MySQL-python
3.  Try to access the mod_python page that accesses data from MySQL
Actual results:
Apache segfaults

Expected results:
I would expect Apache to serve both php+mysql and
mod_python+MySQL-python pages that access MySQL.

Additional info:
This was in the /var/log/httpd/error_log (with LogLevel debug):
[Thu Mar 10 02:25:18 2005] [notice] mod_python: Creating 4 session
mutexes based on 256 max processes and 0 max threads.
[Thu Mar 10 02:25:18 2005] [notice] Apache/2.0.52 (Red Hat) configured
-- resuming normal operations
[Thu Mar 10 02:25:23 2005] [notice] child pid 1487 exit signal
Segmentation fault (11)
*** glibc detected *** double free or corruption (!prev): 0x0a0b4890 ***
[Thu Mar 10 02:25:25 2005] [notice] child pid 1488 exit signal Aborted (6)
*** glibc detected *** double free or corruption (!prev): 0x0a0b45a0 ***
[Thu Mar 10 02:25:27 2005] [notice] child pid 1489 exit signal Aborted (6)
[Thu Mar 10 02:25:29 2005] [notice] child pid 1490 exit signal
Segmentation fault (11)
*** glibc detected *** double free or corruption (!prev): 0x0a0c3998 ***
[Thu Mar 10 02:25:32 2005] [notice] child pid 1491 exit signal Aborted (6)
[Thu Mar 10 02:25:37 2005] [notice] child pid 1492 exit signal
Segmentation fault (11)

Comment 10 Joe Orton 2005-03-21 15:40:09 UTC
Thanks for the report, Cory.  The crash is likely to be happening due to
conflicting versions of MySQL being linked into the process; we're currently
deciding the best method to fix this.

Comment 20 Cory Wright 2005-04-11 04:10:19 UTC
Any update on this?  It's been a month since I reported the issue and we still
need this server to provide both PHP and Python pages but are not able with the
provided rpms.

Thanks for your help,


Comment 21 Joe Orton 2005-04-14 09:46:33 UTC
Cory, sorry for the delay, we have been trying to ascertain that there are no
legal issues here regarding the MySQL client library license change. 

To confirm whether the issue is as expected; I've put a test build of
MySQL-python here, which uses the MySQL 4.0 client library:


this should resolve the issues seen; any feedback from testing this is very welcome.

Comment 22 Owen Williams 2005-04-14 12:37:43 UTC
This has fixed my own site, so it looks good to me.

Comment 23 Cory Wright 2005-04-20 16:46:36 UTC
I've updated my system with the provided RPM and everything seems to be working
correctly from my initial tests.  Thanks for the update.


Comment 26 Cory Wright 2005-05-23 01:08:57 UTC
Any idea when an up2date will be provided for this?   The provided RPM works
fine, but I'd like to be be using official RPMs.

Comment 27 Joe Orton 2005-05-23 14:35:16 UTC
The fix is scheduled for U2.

Comment 33 Tom Lane 2005-07-28 17:15:25 UTC
Erratum is in the pipeline for U2.

Comment 35 Tom Lane 2005-08-29 14:55:38 UTC
Switching back to ASSIGNED state because the fix was postponed to U3.

Comment 40 Steven D. Harris 2006-01-24 16:15:54 UTC
Incompatible mysql lib linkage between PHP and DBD-Mysql causes similar problems
when running the DBI under mod_perl on the same server as the PHP.  Crashes are
demonstrated by the web server when running PHP, but were resolved when
recompiling the DBD lib against the same (current) MySQL libs.  I suggested that
any update of MySQL be accompanied by corresponding updates to DBD::MySQL and
php, and quite possibly python-mysql.  There seem to be problems within the web
server if this doesn't happen.  Extracting the MySQL layer from PHP as a
seperate RPM could be considered as well.  This appears to be a generic Linux

Comment 43 Tom Lane 2006-04-21 02:32:21 UTC
*** Bug 189554 has been marked as a duplicate of this bug. ***

Comment 55 Daniel Riek 2006-09-05 16:35:35 UTC
The component of this request is planned to be updated in Red Hat enterprise
Linux 4.5.

This enhancement request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux maintenance release.

Product Management has requested further review of this request by Red Hat
Engineering, for potential inclusion in a Red Hat Enterprise Linux Update
release for currently deployed products.

This request is not yet committed for inclusion in an Update release. 

Comment 63 Red Hat Bugzilla 2007-05-08 00:23:49 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.