php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73366 Segmentation Fault with gzencode/gzhandler after apache reload
Submitted: 2016-10-21 14:34 UTC Modified: 2021-09-12 04:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: fantequera at lagrange-holidays dot com Assigned: cmb (profile)
Status: No Feedback Package: ibm_db2 (PECL)
PHP Version: 7.0.12 OS: openSUSE Leap 42.1 - x86_64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2016-10-21 14:34 UTC] fantequera at lagrange-holidays dot com
Description:
------------
Hi,

ibm_db2 package causes Apache "segmentation fault(11)" after a reload or graceful restart (not normal restart) when a script contain functions related to gzip compression [gzencode / ob_start('ob_gzhandler')]

ibm_db2 without gz function => no problem
gz function without ibm_db2 => no problem

Config:
openSUSE Leap 42.1 (x64)
Apache 2.4
PHP 7.0.12
package ibm_db2 1.9.9 (or 1.9.8)
Db2 Connect v10.5.0.3 64b

only 2 PHP mods for my test script: 
ibm_db2.so
zlib.so

ini interesting values for my test script:
zlib.output_compression = Off
output_buffering = 4096 or highest
memory_limit = 128M or highest
opcache.enable=0

gdb backtrace shows that my test script invades many apache child processes (server-status confirm that)

One child process executing my script only shows this :
#0  0x00007faee5ecf407 in ?? ()
#1  0x00007faee63d047a in ?? ()
#2  0x00000000ffffffff in ?? ()
#3  0x0000000000000001 in ?? ()
#4  0x00007faee65e4998 in ?? ()
#5  0x00007faee6eaa4e0 in ?? ()
#6  0x0000000000000080 in ?? ()
#7  0x0000000000000000 in ?? ()

Test script:
---------------
<?php
echo $gz = gzencode('foo');
?>

OR

<?php
ob_start('ob_gzhandler');
?>


Expected result:
----------------
Expected result : no Apache crash on apache reload or graceful restart.

Actual result:
--------------
Actual result is Apache "[core:notice] [pid xxxxx] AH00052: child pid xxxxx exit signal Segmentation fault (11)" when using ob_start('ob_gzhandler')
Apache is crashed.

Actual result is Apache "PHP Fatal error:  Maximum execution
time of 30 seconds exceeded in Unknown on line 0" when using gzencode()
Apache is crashed.

Thanks,
Regards.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-25 10:07 UTC] fantequera at lagrange-holidays dot com
-Summary: Segmentation Fault with gzencode/gzhandler after apache reload +Summary: Segmentation Fault with gzencode/gzhandler/memcached after apache reload
 [2016-10-25 10:07 UTC] fantequera at lagrange-holidays dot com
Hi,
Add: activating memcached.so (cache system using compression) at the same time of ibm_db2.so causes Apache segFault too.

thanks for your help.
 [2017-01-16 12:29 UTC] fantequera at lagrange-holidays dot com
Hi,
EDIT : added memcached.so do not cause the segFault, it was a mistake.
I have tested this bug on another server with IBM DB2 Connect 11.1, updates of the OS/zlib/php7/apache packages and still have the problem when ibm_db2.so is loaded (when apache is reloading).
I don't have the problem with old SLES/OpenSuse (32b) php5 and DB2 8.1 / DB2 9 / DB2 10.5
Need help please.
 [2017-01-16 13:50 UTC] fantequera at lagrange-holidays dot com
-Summary: Segmentation Fault with gzencode/gzhandler/memcached after apache reload +Summary: Segmentation Fault with gzencode/gzhandler after apache reload
 [2017-01-16 13:50 UTC] fantequera at lagrange-holidays dot com
Edit : memcached removed from summary field
 [2017-07-14 12:46 UTC] vnkbabu@php.net
Hi,
  Does "segmentation fault(11)" occurs when run on standalone php ?
 [2017-07-17 10:02 UTC] fantequera at lagrange-holidays dot com
Hi vnkbabu@php.net,
this do not occur when running php in standalone.
I switched to php-fpm.
 [2021-08-30 16:35 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-08-30 16:35 UTC] cmb@php.net
Is this still an issue with the latest ibm_db2 package (2.1.3)?
 [2021-09-12 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 16:01:28 2024 UTC