php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69764 Seg Fault on phpinfo()
Submitted: 2015-06-06 14:06 UTC Modified: 2015-06-28 04:22 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: clay dot garland at agencymatrix dot com Assigned:
Status: No Feedback Package: pecl_http (PECL)
PHP Version: 5.4.41 OS: CentOS 7 x64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-06-06 14:06 UTC] clay dot garland at agencymatrix dot com
Description:
------------
Segmentation fault on phpinfo()

Test script:
---------------
<?php

    phpinfo();

Expected result:
----------------
I expect to see phpinfo()

Actual result:
--------------
Segmentation fault (core dumped)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-06 15:16 UTC] clay dot garland at agencymatrix dot com
gdb bt output:

#0  0x00007f3c9ca35ed8 in php_info_print_table_row_internal (num_cols=3, value_class=value_class@entry=0x7f3c9cbd07ff "v",
    row_elements=row_elements@entry=0x7fff6b11e850) at /usr/src/debug/php-5.4.41/ext/standard/info.c:1100
#1  0x00007f3c9ca369b0 in php_info_print_table_row (num_cols=num_cols@entry=3)
    at /usr/src/debug/php-5.4.41/ext/standard/info.c:1135
#2  0x00007f3c8c2601ed in zm_info_http (zend_module=0x7f3c9e7f5a30) at /var/tmp/pecl_http/php_http.c:221
#3  0x00007f3c9ca36af0 in _display_module_info_func (module=<optimized out>) at /usr/src/debug/php-5.4.41/ext/standard/info.c:186
#4  0x00007f3c9cae91a5 in zend_hash_apply (ht=ht@entry=0x7fff6b11e9b0,
    apply_func=apply_func@entry=0x7f3c9ca36ae0 <_display_module_info_func>) at /usr/src/debug/php-5.4.41/Zend/zend_hash.c:716
#5  0x00007f3c9ca379c1 in php_print_info (flag=flag@entry=-1) at /usr/src/debug/php-5.4.41/ext/standard/info.c:879
#6  0x00007f3c9cb88424 in do_cli (argc=2, argv=0x7fff6b120078) at /usr/src/debug/php-5.4.41/sapi/cli/php_cli.c:685
#7  0x00007f3c9c91a577 in main (argc=2, argv=0x7fff6b120078) at /usr/src/debug/php-5.4.41/sapi/cli/php_cli.c:1365
 [2015-06-06 16:43 UTC] cmb@php.net
-Status: Open +Status: Feedback
 [2015-06-06 16:43 UTC] cmb@php.net
That seems to be related to pecl_http. Does the segfault also
occur without this extension? Which version of pecl_http do you
use?
 [2015-06-08 10:38 UTC] mike@php.net
What does the following command output?

`ldd /usr/lib/php/modules/http.so` (or whatever your path to the pecl/http module is)
 [2015-06-08 10:43 UTC] mike@php.net
Okay, php_http.c:221 hints to the detected libevent version. Please try this:

$ pecl download pecl_http
$ tar xzf pecl_http-*.tgz
$ cd pecl_http-*
$ phpize
$ ./configure
$ grep EVENT config.h
 [2015-06-08 15:50 UTC] clay dot garland at agencymatrix dot com
-Status: Feedback +Status: Open
 [2015-06-08 15:50 UTC] clay dot garland at agencymatrix dot com
#define PHP_HTTP_EVENT_VERSION "2.0.21-stable"
#define PHP_HTTP_HAVE_EVENT 1
#define PHP_HTTP_HAVE_EVENT2 1

is the output of grepping config.h for EVENT.
 [2015-06-08 16:19 UTC] clay dot garland at agencymatrix dot com
disabling the http extension definitely gets rid of the error.
 [2015-06-08 16:32 UTC] cmb@php.net
-Package: *General Issues +Package: pecl_http
 [2015-06-16 10:12 UTC] mike@php.net
-Status: Open +Status: Feedback
 [2015-06-16 10:12 UTC] mike@php.net
Hm, not sure where to go from here without gdb...

Could you verify that libevent returns a sane version from its API?

█ mike@smugmug:/tmp$ cat evv.c
#include <stdio.h>
#include <event2/event.h>

int main(int argc, char *argv[]) {
	printf("version: %s\n", event_get_version());
	return 0;
}
█ mike@smugmug:/tmp$ gcc -levent -o evv evv.c
█ mike@smugmug:/tmp$ ./evv
version: 2.0.22-stable
 [2015-06-28 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.
 [2016-01-05 04:59 UTC] jsnell-php at e-normous dot com
I'm experiencing the same issue:

evv output:
version: 2.0.21-stable
 [2016-01-05 05:26 UTC] jsnell-php at e-normous dot com
Removing libevent-dev or installing libcurl4-openssl-dev in debian makes the segmentation fault go away
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 22:01:28 2019 UTC