Req #76144 [NEW]: 10298357640
| From: | gcan114115 at gmail dot com | Date: | Fri, 23 Mar 2018 17:51:07 +0000 |
| Subject: | Req #76144 [NEW]: 10298357640 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-214456@lists.php.net to get a copy of this message | ||
From: gcan114115 at gmail dot com
Operating system: çalma
PHP version: Next Major Version
Package: Other web server
Bug Type: Feature/Change Request
Bug description:10298357640
Description:
------------
Remove any limits you may have on core dump size from your shell:
tcsh: unlimit coredumpsize
bash/sh: ulimit -c unlimited
Ensure that the directory in which you're running PHP, or the
PHP-enabled httpd, has write permissions for the user who's running
PHP.
Cause PHP to crash:
PHP CGI: Simply run php with the script that crashes it
PHP Apache Module: Run httpd -X, and access the script that crashes PHP
Test script:
---------------
Set up the core pattern (run this command as root):
echo "<cores dir>/core-%e.%p" > /proc/sys/kernel/core_pattern
make sure the directory is writable by PHP
Set the ulimit (see above how to do it).
Restart/rerun PHP.
Expected result:
----------------
Run httpd -X under gdb with something like:
gdb /usr/local/apache/sbin/httpd
(gdb) run -X
Then use your web browser and access your server to force the crash. You
should see a gdb prompt appear and some message indicating that there
was a crash. At this gdb prompt, type:
(gdb) bt
or, running from the commandline
gdb /home/user/dev/php-snaps/sapi/cli/php
(gdb) run /path/to/script.php
(gdb) bt
Actual result:
--------------
Sample gdb session
(gdb) bt
#0 0x080ca21b in _efree (ptr=0xbfffdb9b) at zend_alloc.c:240
#1 0x080d691a in _zval_dtor (zvalue=0x8186b94) at zend_variables.c:44
#2 0x080cfab3 in _zval_ptr_dtor (zval_ptr=0xbfffdbfc) at
zend_execute_API.c:274
#3 0x080f1cc4 in execute (op_array=0x816c670) at ./zend_execute.c:1605
#4 0x080f1e06 in execute (op_array=0x816c530) at ./zend_execute.c:1638
#5 0x080f1e06 in execute (op_array=0x816c278) at ./zend_execute.c:1638
#6 0x080f1e06 in execute (op_array=0x8166eec) at ./zend_execute.c:1638
#7 0x080d7b93 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at zend.c:810
#8 0x0805ea75 in php_execute_script (primary_file=0xbffff650) at
main.c:1310
#9 0x0805cdb3 in main (argc=2, argv=0xbffff6fc) at cgi_main.c:753
#10 0x400c91be in __libc_start_main (main=0x805c580
, argc=2, ubp_av=0xbffff6fc,
init=0x805b080 <_init>, fini=0x80f67b4 <_fini>,
rtld_fini=0x4000ddd0 <_dl_fini>,
stack_end=0xbffff6ec) at
../sysdeps/generic/libc-start.c:129
(gdb) frame 3
#3 0x080f1cc4 in execute (op_array=0x816c670) at ./zend_execute.c:1605
(gdb) print (char
*)(executor_globals.function_state_ptr->function)->common.function_name
$14 = 0x80fa6fa "pg_result_error"
(gdb) print (char *)executor_globals.active_op_array->function_name
$15 = 0x816cfc4 "result_error"
(gdb) print (char *)executor_globals.active_op_array->filename
$16 = 0x816afbc "/home/yohgaki/php/DEV/segfault.php"
(gdb)
--
Edit bug report at https://bugs.php.net/bug.php?id=76144&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76144&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76144&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76144&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76144&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76144&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76144&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76144&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76144&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76144&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76144&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76144&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76144&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76144&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76144&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76144&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76144&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76144&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76144&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76144&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76144&r=mysqlcfg