phacility / xhprof

XHProf is a function-level hierarchical profiler for PHP and has a simple HTML based user interface.
http://pecl.php.net/package/xhprof
Apache License 2.0
2.6k stars 924 forks source link

xhprof segfaults php56 #45

Open hikmet opened 9 years ago

hikmet commented 9 years ago

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

thanks, --h.

epriestley commented 9 years ago

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

shanemeyers commented 9 years ago

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?

paulgao commented 9 years ago

i have same segfault,can you fix it plz?

paulgao commented 9 years ago

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

onethumb commented 9 years ago

Any luck on this yet?

paulgao commented 9 years ago

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

FeepingCreature commented 9 years ago

It's gone... :(

onethumb commented 9 years ago

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

onethumb commented 9 years ago

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

paulgao commented 9 years ago

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

bd808 commented 9 years ago

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

onethumb commented 9 years ago

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

shanemeyers commented 9 years ago

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.

Xon commented 9 years ago

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

beberlei commented 9 years ago

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.

shanemeyers commented 9 years ago

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)
sn01615 commented 8 years ago

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]

xuanskyer commented 7 years ago

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

try this: fix crash