Bug 694630 - PHP 5.3.6 update breaks php-pecl-mongo (or any mongodb adapter)
Summary: PHP 5.3.6 update breaks php-pecl-mongo (or any mongodb adapter)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: php-pecl-mongo
Version: 14
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Christof Damian
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-07 19:37 UTC by Martin Samson
Modified: 2012-08-16 21:25 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-08-16 21:25:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
strace with couchdb (2.57 KB, text/plain)
2011-04-08 01:30 UTC, Martin Samson
no flags Details
strace with mongodb and writting to session (236 bytes, text/plain)
2011-04-08 01:32 UTC, Martin Samson
no flags Details


Links
System ID Private Priority Status Summary Last Updated
PHP Bug Tracker 54491 0 None None None Never

Description Martin Samson 2011-04-07 19:37:36 UTC
Description of problem:
5.3.6 updates breaks mongo extension. 
Error reported by apache is zend_mm_heap corrupted

Mongo php extension installed with package php-pecl-mongo OR pecl install mongo OR from source produce the same error.

Version-Release number of selected component (if applicable):
php-5.3.6-1.fc14.x86_64
php-cli-5.3.6-1.fc14.x86_64
php-common-5.3.6-1.fc14.x86_64
php-devel-5.3.6-1.fc14.x86_64
php-pecl-mongo-1.0.10 OR mongo 1.1.4


Steps to Reproduce:
1. Install httpd, php, php-devel, php-pecl-mongo
2. Use the mongo extension

Comment 1 Martin Samson 2011-04-07 21:24:16 UTC
Sorry, It seems the bug is from somewhere else.


There is definitely something wrong with php 5.3.6, as 5.3.5 works with the same scripts, on F14.

Comment 2 Martin Samson 2011-04-08 01:19:00 UTC
Re-opening this. There is a problem with php-pecl-mongo coupled with HTTPD.

Tested this on a fresh VirtualBox F14 x64 image with:

yum groupinstall "Development Tools"
yum install php php-devel php-pecl-mongo httpd mongodb-server mongodb

For the sake of testing, i used the Lithium PHP framework as a start point, with a simple app:

config/bootstrap/connections.php:
Uncomment default mongodb connection

controllers/PostsController.php
<?php
namespace app\controllers;

class PostsController extends \lithium\action\Controller{
    public function index(){
        $posts = Posts::all();
        return compact('posts');
    }
}
?>
models/Posts.php:
<?php
namespace app\models;

class Posts extends \lithium\data\Model{}
?>

views/posts/index.html.php:
<?php var_dump($posts);?>


Using apache httpd as the webserver, quickly configured a virtualhost to serve /var/www/app/webroot/ and setup DirectoryIndex to be index.php

Started mongodb and apache.

Retreiving http://app/posts  produces zend_mm_heap corrupted
Using `strace webroot/index.php` does not produce zend_mm_heap corrupted.

On a larger application, `strace webroot/index.php` will produce zend_mm_heap corrupted error, just before closing all descriptors.


Then, thinking it would be a isolated issue, went and tried with CouchDb instead.

Same result: zend_mm_heap corrupted

Same code works on php 5.3.5

Comment 3 Martin Samson 2011-04-08 01:30:08 UTC
Created attachment 490674 [details]
strace with couchdb

This is the strace produce with:
`strace webroot/index.php`

Using CouchDb as the database adapter.

Exact same strace with MongoDb

Comment 4 Martin Samson 2011-04-08 01:32:17 UTC
Created attachment 490675 [details]
strace with mongodb and writting to session

This strace is with mongodb on a larger application. Writting to session at the end before exiting.

Comment 5 Martin Samson 2011-04-08 01:33:46 UTC
Also, unable to get a gdb backtrace, gdb says there is no stack.
PHP exit code is 1

Tried running gdb with httpd and with php, both says there's no stack.

Tried to get a dump, no dump generated.

Comment 6 Martin Samson 2011-04-08 01:36:18 UTC
Also, my mistake, the controller code is missing "use app\models\Posts;" between namespace and class declaration

Comment 7 Martin Samson 2011-04-08 03:15:28 UTC
Ok, so i went ahead, created a virtual machine.

Got httpd installed and dev tools.

Installed php 5.3.6 from source (compiled, not srpm).

Still the same behavior with both MongoDb and CouchDb.

Worst part is php dies just before delivering output. When sessions are used, one can see php writting to the file just before the crash.

Comment 8 Christof Damian 2012-05-01 14:32:33 UTC
Could you verify that this problem still exists in a current version of Fedora? 
Both PHP and the mongo pecl extension have been updated.

Comment 9 Fedora End Of Life 2012-08-16 21:25:22 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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