Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento2 PHP7中的分段错误_Magento2_Php 7_Magento 2.0 - Fatal编程技术网

Magento2 PHP7中的分段错误

Magento2 PHP7中的分段错误,magento2,php-7,magento-2.0,Magento2,Php 7,Magento 2.0,我们在PHP7.0中遇到了这个奇怪的问题。我们在PHP7.0上运行Magento2的索引器,在不同的环境中有不同的结果。 如果我们使用CentOS,并从或中获取PHP7.0,我们会得到一个分段错误,如下所示: Program received signal SIGSEGV, Segmentation fault. zend_mm_alloc_small (size=<optimized out>, bin_num=<optimized out>, heap=<opt

我们在PHP7.0中遇到了这个奇怪的问题。我们在PHP7.0上运行Magento2的索引器,在不同的环境中有不同的结果。 如果我们使用CentOS,并从或中获取PHP7.0,我们会得到一个分段错误,如下所示:

Program received signal SIGSEGV, Segmentation fault.
zend_mm_alloc_small (size=<optimized out>, bin_num=<optimized out>, heap=<optimized out>) at /usr/src/debug/php-7.0.1RC1/Zend/zend_alloc.c:1291
1291                    heap->free_slot[bin_num] = p->next_free_slot;
Missing separate debuginfos, use: debuginfo-install openssl-libs-1.0.1e-51.el7_2.1.x86_64
(gdb) backtrace
#0  zend_mm_alloc_small (size=<optimized out>, bin_num=<optimized out>, heap=<optimized out>) at /usr/src/debug/php-7.0.1RC1/Zend/zend_alloc.c:1291
#1  zend_mm_alloc_heap (size=<optimized out>, heap=<optimized out>) at /usr/src/debug/php-7.0.1RC1/Zend/zend_alloc.c:1358
#2  _emalloc (size=3, size@entry=32) at /usr/src/debug/php-7.0.1RC1/Zend/zend_alloc.c:2442
#3  0x0000555555666840 in zend_string_alloc (persistent=0, len=4) at /usr/src/debug/php-7.0.1RC1/Zend/zend_string.h:121
#4  php_pcre_replace_impl (pce=pce@entry=0x555555e76e40, subject_str=subject_str@entry=0x7fffd72fec68, subject=subject@entry=0x7fffd72fec80 "TypeId", subject_len=subject_len@entry=6, replace_val=replace_val@entry=0x7fffd2a393b0,
    is_callable_replace=is_callable_replace@entry=0, limit=<optimized out>, limit@entry=-1, replace_count=replace_count@entry=0x7fffffff7d5c) at /usr/src/debug/php-7.0.1RC1/ext/pcre/php_pcre.c:1217
程序接收信号SIGSEGV,分段故障。
zend_mm_alloc_small(size=,bin_num=,heap=)位于/usr/src/debug/php-7.0.1RC1/zend/zend_alloc.c:1291
1291 heap->free_slot[bin_num]=p->next_free_slot;
缺少单独的调试信息,请使用:debuginfo安装openssl-libs-1.0.1e-51.el7_2.1.x86_64
(gdb)回溯
#0 zend_mm_alloc_small(size=,bin_num=,heap=)位于/usr/src/debug/php-7.0.1RC1/zend/zend_alloc.c:1291
#1 zend_mm_alloc_heap(size=,heap=)位于/usr/src/debug/php-7.0.1RC1/zend/zend_alloc.c:1358
#2毫米(尺寸=3,size@entry=32)at/usr/src/debug/php-7.0.1RC1/Zend/Zend_alloc.c:2442
#3 0x000055555666840在/usr/src/debug/php-7.0.1RC1/zend/zend_string.h:121的zend_string_alloc(persistent=0,len=4)中
#4 php_pcre_replace_impl(pce=pce@entry=0x5555E76E40,主题\u str=subject_str@entry=0x7fffd72fec68,受试者=subject@entry=0x7fffd72fec80“类型ID”,主题长度=主题_len@entry=6,替换_val=replace_val@entry=0x7fffd2a393b0,
是否可调用\u替换=是否可调用_replace@entry=0,极限=,limit@entry=-1,替换\u计数=替换_count@entry=0x7fffff7d5c)at/usr/src/debug/php-7.0.1RC1/ext/pcre/php_pcre.c:1217
但是,如果我们使用编译后的PHP7版本,就不会有错误。我们还使用了一个配置了Ubuntu 14.0和PHP7.0.0(来自ppa:ondrej/PHP-7.0)的vagrant box进行了尝试,但也没有出现任何问题

你知道为什么在使用这些特定回购协议时会出现这种错误吗

已更新 与7.0.1堆栈跟踪不同:

`Program received signal SIGSEGV, Segmentation fault.
0x00007fffded34620 in ?? ()
#0  0x00007fffded34620 in ?? ()
#1  0x00005555557db82b in execute_ex (ex=<optimized out>) at /usr/src/debug/php-7.0.1/Zend/zend_vm_execute.h:414
#2  0x000055555578ddd9 in dtrace_execute_ex (execute_data=<optimized out>) at /usr/src/debug/php-7.0.1/Zend/zend_dtrace.c:83
`程序接收信号SIGSEGV,分段故障。
0x00007fffded34620英寸??()
#0 0x00007fffded34620英寸??()
#在/usr/src/debug/php-7.0.1/Zend/Zend\u vm\u execute.h:414的execute_ex(ex=)中的0x000055555557db82b
#2 0x00005555578DDD9,位于/usr/src/debug/php-7.0.1/Zend/Zend_dtrace.c:83的dtrace_execute_ex(execute_data=)中

请查看Magento论坛的链接:

这来自官方回购协议:

在一些本地测试中,我复制了这个问题(Ubuntu 14.04和ppa:ondrej/php-7.0),更糟糕的是,“分段错误”会使索引器处于“处理”状态(因为它没有成功完成),我们必须更改数据表(indexer_状态),并在重新运行重新索引之前手动修复这些值


似乎Magento 2还没有“完全”支持PHP7?

先试用昨天发布的7.0.1。我们试用了PHP7.0.1RC1,结果相同。我们刚刚试过使用php-7.0.1-1.el7.remi.x86_64,但仍然是segfault:(我认为最好在上提交一个上游bug,但使用一个简单的复制器…(可能与默认情况下RPM使用的dtrace功能或安全构建标志有关)PHP7问题已在中修复。请查看并告知您的问题是否已修复。