php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42776 zend_mm_handler corrupted using mysqli, longtext
Submitted: 2007-09-27 07:38 UTC Modified: 2008-06-09 01:00 UTC
Votes:14
Avg. Score:4.4 ± 0.9
Reproduced:11 of 12 (91.7%)
Same Version:4 (36.4%)
Same OS:3 (27.3%)
From: asmith at arcstone dot com Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: 5.2.4 OS: CentOS 5
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-09-27 07:38 UTC] asmith at arcstone dot com
Description:
------------
Running with Zend Framework, MySQLi, connecting to database on seperate dedicated server, CentOS 5, PHP 5.2.4 build from utterramblings repository. I thought it was my problem or Zend Framework's problem until I changed the field type from longtext to text.

Reproduce code:
---------------
create mysql table with longtext field full of anything
connect to table using mysqli
select from that table

Expected result:
----------------
the text from the database

Actual result:
--------------
script execution stops, and the following appears in the apache error log

[Thu Sep 27 03:04:56 2007] [error] [client 209.98.251.245] PHP Warning:  Invalid argument supplied for foreach() in /www/wonderfile/lib/vendor/Zend/Db/Statement/Mysqli.php on line 221, referer: http://library.wonderfile.net/library/files/upload
zend_mm_heap corrupted
[Thu Sep 27 03:14:26 2007] [notice] child pid 7554 exit signal Segmentation fault (11)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-27 09:45 UTC] jani@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2007-09-27 17:10 UTC] asmith at arcstone dot com
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213928640 (LWP 24349)]
0xb77b6019 in zend_hash_find (ht=0x1c, arKey=0xbf959700 "closecursor", nKeyLength=12, pData=0xb251f619)
    at /home/brewbuilder/rpms/BUILD/php-5.2.4/Zend/zend_hash.c:878
878     /home/brewbuilder/rpms/BUILD/php-5.2.4/Zend/zend_hash.c: No such file or directory.
        in /home/brewbuilder/rpms/BUILD/php-5.2.4/Zend/zend_hash.c
 [2007-09-30 12:37 UTC] nlopess@php.net
you didn't provide the full backtrace. Please read the URL mentioned in order to provide a useful backtrace. In addition, it would be great if you could provide a sample script to allow us to reproduce the problem.
 [2007-10-08 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-12-31 17:41 UTC] marianoklein at gmail dot com
I?ve experienced the same problem using mysqli and a longtext field. Changing longtext to text solves the problem, but I can?t use just a text field.

I?m sorry I can?t generate a backtrace
 [2008-04-07 12:02 UTC] loke dot dupont at gmail dot com
This is also an issue for me.

[Mon Apr 07 13:46:52 2008] [notice] child pid 65694 exit signal Segmentation fault (11)

Is recorded in my errorlog when trying to fetch data from a longtext column with MySQLi. I'm using Zend Framework to fetch the data via, and it works when switching to the PDO_MySQL handler. It also works if the longtext column is empty.
 [2008-04-30 08:21 UTC] jesuslarag at gmail dot com
i try php 5.2.3, 5.2.5 and 5.2.6rc5

my configure:
./configure \
--prefix=/usr/php --sysconfdir=/etc/php5/apache2 --mandir=/usr/share/man \
--with-apxs2=/usr/sbin/apxs \
--libexecdir=/usr/lib/php5 --bindir=/usr/bin --libdir=/usr/lib/php5 \
--with-config-file-path=/etc/php5/apache2 --with-config-file-scan-dir=/etc/php5/conf.d \
--with-exec-dir=/usr/lib/php5/libexec --with-pear=/usr/share/php \
--enable-shared --with-gnu-ld --disable-inline-optimization \
--with-gd --disable-cgi --disable-ipv6 \
--disable-debug --with-curl --with-curlwrappers \
--enable-zip --with-bz2 --with-zlib \
--enable-bcmath --enable-calendar --enable-mbstring \
--with-libxml-dir=/usr --with-regex \
--with-pcre-regex=/usr --enable-exif --with-t1lib --with-xsl \
--with-mhash --with-mcrypt --enable-zend-multibyte \
--with-pspell --with-openssl --enable-sockets \
--enable-soap --enable-ftp --with-gd --with-ttf \
--enable-json --with-tidy --with-iconv --with-gettext \
--enable-gd-native-ttf --enable-gd-jis-conv --with-xmlrpc \
--enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-sigchild \
--with-ldap --with-pgsql --with-sqlite \
--enable-pdo --with-pdo-mysql --with-pdo-sqlite \
--with-mysql --with-mysql-sock=/var/run/mysqld/mysqld.sock \
--with-mysqli=shared --with-mysqli=/usr/mysql/bin/mysql_config

This sentence work in debian lenny with mysql 5.1 (32bits)

In Debian Etch (64bits) any application that use mysql/mysqli crash with this error:
zend_mm_heap corrupted
and a signal segmentation fault (11)
[notice] child pid 20330 exit signal Segmentation fault (11)

It's not a problem with php5 classes, because wordpress 2.3 and joomla 1.4 also fail.

with --enable-debug; dmesg returns:
apache2[12415] general protection rip:2ad199d719cc rsp:417f6ba0 error:0
apache2[12492]: segfault at 0000000001b2c738 rip 00002ad19d60431f rsp 0000000040ff6f90 error 4

apache2[3586]: segfault at 0000000001b2c738 rip 00002ad19d60431f rsp 0000000040ff6f90 error 4
apache2[3583] trap stack segment rip:43b64a rsp:41000f00 error:0
apache2[3637] trap stack segment rip:43b64a rsp:41000f00 error:0
apache2[17782]: segfault at 00002ad19d1db000 rip 00002ad19d1db047 rsp 00007fff12579c88 error 7

when i remove --with-mysqli, failures do not occur
 [2008-06-01 02:44 UTC] beiercai at gmail dot com
I had the same problem, very frustrating. Changed from LongText to Text solved the problem, but I need to use LongText. Why this bug has been suspended for almost a year?
 [2008-06-01 03:18 UTC] felipe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2008-06-09 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Aug 13 10:05:43 2022 UTC