php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79190 Segfault in zm_activate_date
Submitted: 2020-01-29 10:48 UTC Modified: 2020-02-09 04:22 UTC
From: l dot lotz at reply dot de Assigned: cmb (profile)
Status: No Feedback Package: Date/time related
PHP Version: 7.2.27 OS: Ubuntu 16.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: l dot lotz at reply dot de
New email:
PHP Version: OS:

 

 [2020-01-29 10:48 UTC] l dot lotz at reply dot de
Description:
------------
I'm using the ondrej-ppa packages. This bug is triggered in a production setup with many requests and it does not seem to be triggered by specific requests. This is triggered in php-fpm and does not seem to be connected to a specific request.
We get the segfaults every few hours. I can imagine this bug gets triggered because RSHUTDOWN is not run, since this would set the DATEG(tzcache) = NULL; and thus not trigger the if condition in zm_activate_date:
	if (DATEG(timezone)) {
		efree(DATEG(timezone));
	}

Extensions loaded:
mysqlnd.so
opcache.so
pdo.so
xml.so
apcu.so
calendar.so
ctype.so
curl.so
dom.so
exif.so
fileinfo.so
ftp.so
gd.so
geoip.so
gettext.so
iconv.so
igbinary.so
intl.so
json.so
mbstring.so
mysqli.so
pdo_mysql.so
phar.so
posix.so
readline.so
redis.so
shmop.so
simplexml.so
sockets.so
sysvmsg.so
sysvsem.so
sysvshm.so
tideways.so
tokenizer.so
wddx.so
xmlreader.so
xmlwriter.so
xsl.so
zip.so
apc.so


Expected result:
----------------
No segfault

Actual result:
--------------
GDB Backtrace:
#0  zend_mm_free_heap (ptr=0x7fcab4135270, heap=0x7fcacd400040) at ./Zend/zend_alloc.c:1388
#1  _efree (ptr=0x7fcab4135270) at ./Zend/zend_alloc.c:2456
#2  0x000055b8b5a60795 in zm_activate_date (type=<optimized out>, module_number=<optimized out>) at ./ext/date/php_date.c:729
#3  0x000055b8b5c1b7b0 in zend_activate_modules () at ./Zend/zend_API.c:2600
#4  0x000055b8b5bae7e6 in php_request_startup () at ./main/main.c:1694
#5  0x000055b8b5a5f870 in main (argc=<optimized out>, argv=<optimized out>) at ./sapi/fpm/fpm/fpm_main.c:1927

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-29 11:47 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-01-29 11:47 UTC] cmb@php.net
Active support for PHP 7.2 has ended a month ago.  Can you
reproduce this segfault with any of the actively supported PHP
versions[1].

[1] <https://www.php.net/supported-versions.php>
 [2020-02-09 04:22 UTC] php-bugs 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: Wed Apr 24 22:01:30 2024 UTC