xhprof icon indicating copy to clipboard operation
xhprof copied to clipboard

xhprof segfaults php56

Open hikmet opened this issue 10 years ago • 18 comments

Xhprof causes segfault on php56. We noticed there is an open bug here at https://bugs.php.net/bug.php?id=67997

thanks, --h.

hikmet avatar Sep 22 '14 18:09 hikmet

Can you try against HEAD? I think this was fixed by 55a47c0d8ffeea4b84133fd21103caa816676b5d

epriestley avatar Sep 22 '14 18:09 epriestley

I compiled https://github.com/phacility/xhprof/commit/91e0be91da03ec4aa2b63a991f70c1c10151cc71 from HEAD against PHP 5.6.0 and we still get a segfault when we have xhprof enabled. What kind of information do you need to help track this down?

shanemeyers avatar Sep 22 '14 23:09 shanemeyers

i have same segfault,can you fix it plz?

paulgao avatar Oct 14 '14 18:10 paulgao

maybe fix it. plz see https://github.com/QafooLabs/xhprof/commit/16b3ae28b2558f99461325db4c4d3032db9e3746 .

paulgao avatar Oct 14 '14 20:10 paulgao

Any luck on this yet?

onethumb avatar Nov 09 '14 22:11 onethumb

i use QafooLabs/xhprof@16b3ae2 to patch. not segfault more.

paulgao avatar Nov 10 '14 05:11 paulgao

It's gone... :(

FeepingCreature avatar Nov 10 '14 13:11 FeepingCreature

@paulgao Do you still have that patch somewhere? Can you share it?

onethumb avatar Nov 10 '14 14:11 onethumb

@paulgao Also possible that's a private repo and we just can't see it... mind making it public or re-publishing somewhere public?

onethumb avatar Nov 10 '14 14:11 onethumb

oh, it renamed. plz see https://github.com/QafooLabs/php-profiler-extension/commit/16b3ae28b2558f99461325db4c4d3032db9e3746 .

paulgao avatar Nov 10 '14 18:11 paulgao

I can not reproduce the reported crash using 5.6.3 and the current HEAD (91e0be91da03ec4aa2b63a991f70c1c10151cc71).

bd808 avatar Nov 28 '14 23:11 bd808

Crashes consistently for us on 5.6.3 with current HEAD (91e0be9). If we turn on XHPROF_FLAGS_NO_BUILTINS it no longer crashes.

onethumb avatar Dec 16 '14 23:12 onethumb

The crash still occurs for us using PHP 5.6.3 and HEAD (https://github.com/phacility/xhprof/commit/91e0be91da03ec4aa2b63a991f70c1c10151cc71). I tried using the https://github.com/QafooLabs/php-profiler-extension/commit/16b3ae28b2558f99461325db4c4d3032db9e3746 patch, but I couldn't get it to apply against HEAD.

shanemeyers avatar Dec 17 '14 00:12 shanemeyers

Manually applying this pull request to HEAD (https://github.com/phacility/xhprof/commit/91e0be91da03ec4aa2b63a991f70c1c10151cc71) makes the crashes go away for me.

Xon avatar Jan 04 '15 16:01 Xon

You don't need to apply the patch from Qafoo PHP Profiler, just use that extension it is compatible with XHPROF: https://github.com/QafooLabs/php-profiler-extension.

Either compile from the repository using the installation hints in the README. Or we have Debian/Ubuntu packages and precompiled binaries for Linux and any PHP version 5.3 - 5.6: https://qafoolabs.com/profiler/downloads

Its entirely usable without the SaaS platform we built around it, just use qafooprofiler_enable() and qafooprofiler_disable() instead.

beberlei avatar Jan 30 '15 08:01 beberlei

Applying pull https://github.com/phacility/xhprof/pull/48 to HEAD (https://github.com/phacility/xhprof/commit/91e0be91da03ec4aa2b63a991f70c1c10151cc71) compiles cleanly, but we still get crashes.

 [Wed Jan 21 11:02:59 2015] [notice] child pid 25559 exit signal Segmentation fault (11)

shanemeyers avatar Jan 31 '15 00:01 shanemeyers

Sep 15 21:18:02 dev kernel: in php-fpm[400000+888000] Sep 15 21:18:02 dev kernel: php-fpm[1982]: segfault at 0 ip 0000000000651d40 sp 00007ffe516d5380 error 6 in php-fpm[400000+888000] Sep 15 21:18:02 dev kernel: php-fpm[2105]: segfault at 0 ip 0000000000651d40 sp 00007ffe516d5380 error 6 in php-fpm[400000+888000]

sn01615 avatar Sep 15 '15 13:09 sn01615

kernel: php-fpm[51660]: segfault at 18 ip 00007f80e6f1c24f sp 00007fff264638e0 error 4 in xhprof.so[7f80e6f18000+6000]

try this: fix crash

xuanskyer avatar Jan 03 '17 03:01 xuanskyer