[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-dev
Subject:    [PECL-DEV] [PHP-BUG] Bug #74073 [NEW]: zend_string_free: Assertion `(s)->gc.refcount <= 1' failed
From:       "rmoisto at gmail dot com"<pecl-dev () lists ! php ! net>
Date:       2017-02-10 11:02:32
Message-ID: bug-74073 () bugs ! php ! net
[Download RAW message or body]

From:             rmoisto at gmail dot com
Operating system: Ubuntu
PHP version:      7.1.1
Package:          mongodb
Bug Type:         Bug
Bug description:zend_string_free: Assertion `(s)->gc.refcount <= 1' failed

Description:
------------
A project I'm working on, recently started using MongoDB for some of
it's storage. I can't share the entire project, the following is the
smallest code example that reproduces the crash.

This is not an issue with the official Ubuntu PHP 7.0 packages. I have
compiled PHP 7.1.1 and MongoDB extension myself.

I tried getting a core dump but couldn't figure it out. I have a debug
build so it should be possible but I can't get it set up.


Steps to reproduce:
1. Use PHP 7.1.1
2. Install mongodb extension
3. Create composer.json with the following contents:
{
	"require" : {
	}
}

4. Run `composer install`
5. Save test script as test.php
6. Run `php test.php`


Test script:
---------------
<?php

require 'vendor/autoload.php';

$manager = new MongoDB\Driver\Manager("mongodb://localhost:27017");

$bulk = new MongoDB\Driver\BulkWrite;
$id = $bulk->insert(['x' => 1]);
$manager->executeBulkWrite('db.collection', $bulk);

$query = new MongoDB\Driver\Query(['_id' => $id]);
$cursor = $manager->executeQuery('db.collection', $query);
$cursor->setTypeMap([
	'array' => 'MongoDB\\Model\\BSONArray',
	'document' => 'MongoDB\\Model\\BSONDocument',
	'root' => 'MongoDB\\Model\\BSONDocument'
]);


Expected result:
----------------
Unhandled exception

Actual result:
--------------
php: /home/rauno/php7/include/php/Zend/zend_string.h:263:
zend_string_free: Assertion `(s)->gc.refcount <= 1' failed.
Aborted (core dumped)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=74073&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=74073&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=74073&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=74073&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=74073&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=74073&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=74073&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=74073&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=74073&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=74073&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=74073&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=74073&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=74073&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=74073&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74073&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=74073&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=74073&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=74073&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74073&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=74073&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=74073&r=mysqlcfg


-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic