|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62062 Github's XHProf@270b75ddd produces process segfaults
Submitted: 2012-05-18 17:51 UTC Modified: 2013-08-12 04:28 UTC
Avg. Score:4.3 ± 0.9
Reproduced:6 of 6 (100.0%)
Same Version:1 (16.7%)
Same OS:1 (16.7%)
From: graylin dot kim at gmail dot com Assigned: scottmac (profile)
Status: Closed Package: xhprof (PECL)
PHP Version: 5.3.13 OS: Ubuntu 11.10
Private report: No CVE-ID: None
 [2012-05-18 17:51 UTC] graylin dot kim at gmail dot com
The latest commit[1] on xhprof master creates frequent segmentation faults while profiling; no issues when xhprof_enable is not called.

  [notice] child pid 22045 exit signal Segmentation fault (11)

It seems like there a bug in the patch for proxying zend_compile_string. The errors come out while running a modified version[2] of CiviCRM 3.4[3] which makes extensive use of evals in some portions of the code. Building the extension without the zend_compile_string commit produces a stable extension and will be our workaround unless this gets patched.

We have produced reproduced in both of our internal environments:

Laptops Running Ubuntu 11.10:
  PHP 5.3.6-13ubuntu3.7 with Suhosin-Patch (cli) (built: May  4 2012 00:50:06) 
  Copyright (c) 1997-2011 The PHP Group
  Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
  Server version: Apache/2.2.20 (Ubuntu)
  Server built:   Feb 14 2012 16:35:35

Production servers running Slackware 13.37 
  PHP 5.4.3 (cli) (built: May 14 2012 03:37:06)
  Copyright (c) 1997-2012 The PHP Group
  Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologie
  Server version: Apache/2.4.2 (Unix)
  Server built:   May  8 2012 17:26:59



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-12 17:59 UTC]
-Assigned To: +Assigned To: scottmac
 [2012-07-30 22:59 UTC] karsten dot frohwein at comm-press dot de
I can confirm this. If I have the extension active I randomly get the same errors running Drupal 7 using xhprof with the help of the devel module.

[Tue Jul 31 00:35:59 2012] [notice]
child pid 6138 exit signal Segmentation fault (11)
[Tue Jul 31 00:38:15 2012] [notice]
child pid 6139 exit signal Segmentation fault (11)

Just deactivating Drupals devel module doesn't solve the problem. Only deactivating the extension does.

My VM:

Linux karsten-vm 3.2.0-23-generic
#36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64

PHP 5.3.10-1ubuntu3.2
with Suhosin-Patch (cli) (built: Jun 13 2012 17:19:58) 
Copyright (c) 1997-2012 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.3.0dev, Copyright (c) 2002-2012, by Derick Rethans

xhprof	0.9.2 directly cloned and builded from github.
 [2012-08-07 19:57 UTC] david at davidsteinsland dot net
This also happens with our setup:

PHP 5.4.4 (cli)
Apache 2.2
CentOS 6.2 64-bit

To prevent further segmentation faults, we have disabled the extension, but would prefer to have it turned on..
 [2012-11-12 14:52 UTC] andy at propcom dot co dot uk
I have also experienced this with PHP 5.3.18. Compiling and running the version 
previous revision (bc8ef04) is a workaround for now.
 [2012-11-21 10:58 UTC] code at tschinder dot de
Here is a pull request, that fixes the problem.
 [2013-08-12 04:28 UTC]
-Status: Assigned +Status: Closed
 [2013-08-12 04:28 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jun 17 08:01:24 2021 UTC