Jump to content

zend_mm_heap corrupted-Allowed memory size exhausted


NotionCommotion

Recommended Posts

If I start this client when the server isn't started, I get the following error.  If I get rid of the addPeriodicTimer, it doesn't appear to happen.  What is going on?  Thanks

 

EDIT.  A clue!  The following makes the error go away, and exit('addPeriodicTimer'); is executed.  Still would like to know what is going on.

// $socket = new TimeoutConnector(new TcpConnector($this->loop), 10, $this->loop);
$socket = new TcpConnector($this->loop);
<?php


namespace DataLogger;


use React\EventLoop\Factory;
use React\SocketClient\TcpConnector;
use React\SocketClient\TimeoutConnector;


class Client
{
    private $loop,$connection;


    public function start() {
        $this->loop = Factory::create();
        $this->connect();
        $this->loop->addPeriodicTimer(5, function(){
            exit('addPeriodicTimer');
        });
        $this->loop->run();
    }


    private function connect(){
        echo('.');
        $socket = new TimeoutConnector(new TcpConnector($this->loop), 10, $this->loop);
        $socket->create('127.0.0.1', 1337)->then(function($stream){
            echo('create connection');
        })->otherwise(function($reason){
            $this->connect();
        });
    }
}


require '../vendor/autoload.php';
require 'JSONStream.php';
$client=new Client();
$client->start();
[Michael@devserver kicken_original]$ php client2.php
...... etc, etc, etc, ..............
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 83 bytes) in /var/www/react/vendor/react/promise/src/Promise.php on line 102
zend_mm_heap corrupted
[Michael@devserver kicken_original]$
Edited by NotionCommotion
Link to comment
Share on other sites

Could be caused by recursion. Install Xdebug, set a stack limit of 100 (default), and see if you can get a stack trace of it failing.

 

 

Will do.  Never used it before.  Any ideas about the following error?  Thanks

 

[Michael@devserver db]$ sudo pecl install xdebug
[sudo] password for Michael:
downloading xdebug-2.5.0.tgz ...
Starting to download xdebug-2.5.0.tgz (267,640 bytes)
........................................................done: 267,640 bytes
76 source files, building
running: phpize
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.
ERROR: `phpize' failed
Link to comment
Share on other sites

You need to install the php development package if you are going to try compiling xdebug. You could also check and see if a pre-compiled version already exists in your package manager.

 

Finally getting around to this.  The PHP development package isn't compatible with my installed PHP.  Also tried a pre-compiled version with no success.  Any recommendations?  Thanks

 

EDIT.  Never mind.  sudo yum install php56u-devel

[Michael@devserver www]$ yum list installed | grep "php"
php-php-gettext.noarch                1.0.12-1.el6                      @epel
php-tcpdf.noarch                      6.2.11-1.el6                      @epel
php-tcpdf-dejavu-sans-fonts.noarch    6.2.11-1.el6                      @epel
php56u.x86_64                         5.6.29-1.ius.centos6              @ius
php56u-bcmath.x86_64                  5.6.29-1.ius.centos6              @ius
php56u-cli.x86_64                     5.6.29-1.ius.centos6              @ius
php56u-common.x86_64                  5.6.29-1.ius.centos6              @ius
php56u-gd.x86_64                      5.6.29-1.ius.centos6              @ius
php56u-imap.x86_64                    5.6.29-1.ius.centos6              @ius
php56u-mbstring.x86_64                5.6.29-1.ius.centos6              @ius
php56u-mcrypt.x86_64                  5.6.29-1.ius.centos6              @ius
php56u-mysqlnd.x86_64                 5.6.29-1.ius.centos6              @ius
php56u-opcache.x86_64                 5.6.29-1.ius.centos6              @ius
php56u-pdo.x86_64                     5.6.29-1.ius.centos6              @ius
php56u-pear.noarch                    1:1.10.1-4.ius.centos6            @ius
php56u-pecl-apcu.x86_64               4.0.11-2.ius.centos6              @ius
php56u-pecl-igbinary.x86_64           2.0.1-1.ius.centos6               @ius
php56u-pecl-jsonc.x86_64              1.3.10-2.ius.centos6              @ius
php56u-pecl-redis.x86_64              2.2.8-2.ius.centos6               @ius
php56u-pecl-redis-debuginfo.x86_64    2.2.8-2.ius.centos6               @ius
php56u-process.x86_64                 5.6.29-1.ius.centos6              @ius
php56u-soap.x86_64                    5.6.29-1.ius.centos6              @ius
php56u-tidy.x86_64                    5.6.29-1.ius.centos6              @ius
php56u-xml.x86_64                     5.6.29-1.ius.centos6              @ius
phpMyAdmin.noarch                     4.0.10.18-1.el6                   @epel
[Michael@devserver www]$ sudo yum install php-devel
Loaded plugins: fastestmirror, priorities, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.pac-12.org
 * epel: ftp.osuosl.org
 * extras: centos.chicago.waneq.com
 * ius: mirrors.kernel.org
 * updates: mirrors.kernel.org
192 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package php-devel.x86_64 0:5.3.3-48.el6_8 will be installed
--> Processing Dependency: php(x86-64) = 5.3.3-48.el6_8 for package: php-devel-5.3.3-48.el6_8.x86_64
--> Running transaction check
---> Package php.x86_64 0:5.3.3-48.el6_8 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-48.el6_8 for package: php-5.3.3-48.el6_8.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.3.3-48.el6_8 for package: php-5.3.3-48.el6_8.x86_64
--> Running transaction check
---> Package php-cli.x86_64 0:5.3.3-48.el6_8 will be installed
---> Package php-common.x86_64 0:5.3.3-48.el6_8 will be installed
--> Processing Conflict: php56u-5.6.29-1.ius.centos6.x86_64 conflicts php < 5.6
--> Processing Conflict: php56u-cli-5.6.29-1.ius.centos6.x86_64 conflicts php-cli < 5.6
--> Processing Conflict: php56u-common-5.6.29-1.ius.centos6.x86_64 conflicts php-common < 5.6
--> Finished Dependency Resolution
Error: php56u conflicts with php-5.3.3-48.el6_8.x86_64
Error: php56u-cli conflicts with php-cli-5.3.3-48.el6_8.x86_64
Error: php56u-common conflicts with php-common-5.3.3-48.el6_8.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[Michael@devserver www]$ sudo yum install php-pecl-xdebug.x86_64
Loaded plugins: fastestmirror, priorities, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.pac-12.org
 * epel: ftp.osuosl.org
 * extras: repos.forethought.net
 * ius: mirrors.kernel.org
 * updates: mirrors.kernel.org
192 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package php-pecl-xdebug.x86_64 0:2.1.4-2.el6 will be installed
--> Processing Dependency: php(zend-abi) = 20090626 for package: php-pecl-xdebug-2.1.4-2.el6.x86_64
--> Processing Dependency: php(api) = 20090626 for package: php-pecl-xdebug-2.1.4-2.el6.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.3.3-48.el6_8 will be installed
--> Processing Conflict: php56u-common-5.6.29-1.ius.centos6.x86_64 conflicts php-common < 5.6
--> Finished Dependency Resolution
Error: php56u-common conflicts with php-common-5.3.3-48.el6_8.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[Michael@devserver www]$
Edited by NotionCommotion
Link to comment
Share on other sites

Well there's a problem: you have PHP 5.3 installed on the system. Get rid of it.

 

How come yum list installed | grep "php" doesn't show php 5.3, and the following shows it as not being installed?

[Michael@devserver datalogger]$ sudo yum remove php-5.3.3-48.el6_8.x86_64
[sudo] password for Michael:
Loaded plugins: fastestmirror, priorities, security
Setting up Remove Process
No Match for argument: php-5.3.3-48.el6_8.x86_64
Loading mirror speeds from cached hostfile
epel/metalink                                            |  15 kB     00:00
 * base: mirrors.cat.pdx.edu
 * epel: ftp.osuosl.org
 * extras: centos.chicago.waneq.com
 * ius: mirrors.kernel.org
 * updates: mirrors.kernel.org
Webmin                                                   | 1.0 kB     00:00
base                                                     | 3.7 kB     00:00
epel                                                     | 4.3 kB     00:00
extras                                                   | 3.4 kB     00:00
ius                                                      | 2.3 kB     00:00
nodesource                                               | 2.5 kB     00:00
updates                                                  | 3.4 kB     00:00
virtualbox                                               |  951 B     00:00
192 packages excluded due to repository priority protections
Package(s) php-5.3.3-48.el6_8.x86_64 available, but not installed.
No Packages marked for removal
[Michael@devserver datalogger]$
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.