Skip to content
This repository has been archived by the owner on Aug 20, 2019. It is now read-only.

Segmentation faults, possibly due to xhprof #469

Closed
danepowell opened this issue Mar 30, 2018 · 3 comments
Closed

Segmentation faults, possibly due to xhprof #469

danepowell opened this issue Mar 30, 2018 · 3 comments

Comments

@danepowell
Copy link

danepowell commented Mar 30, 2018

Problem/Motivation

Multiple people on our project team have started getting segfaults when running certain Drush commands against a beetbox-based DrupalVM via SSH.

The segfaults look like this in syslog:

vagrant kernel: [ 510.193496] php[17945]: segfault at 7fbcd1a00000 ip 00007fbce5a6584e sp 00007ffdc66766c8 error 4 in libc-2.23.so[7fbce59c6000+1c0000]

local kernel: [1043068.013040] php[574]: segfault at 7f83cea00000 ip 00007f83e4bda84e sp 00007ffc2072a958 error 4 in libc-2.23.so[7f83e4b3b000+1c0000]

The coredump backtrace looks like this:
https://pastebin.com/4iVHND1G

Steps to reproduce

I'm not sure of a reliable way to reproduce this from scratch, but for those of us that have started to experience it it is very repeatable. The same Drush command will produce the same segfault every single time.

For all of us, the problem is solved by disabling xhprof. I don't necessarily know that xhprof causes the bug (it is present in the backtrace): it's possible that this is some sort of exotic memory corruption and xhprof just happens to be the extension that breaks the camel's back. I opened an upstream issue to try to rule this out: phacility/xhprof#102

I've also never experienced this segfault on Jeff Geerling's Ubuntu base box, only on Beetbox. Possibly because xhprof isn't enabled by default on the Ubuntu box.

Proposed changes

Disable xhprof by default, just to be safe. It might or might not be a permanent fix, but it's probably not a bad idea all around. It appears that Beetbox has had problems with it in the past if you search the queue, there are better alternatives, and it appears to be marginally maintained (the maintainer claims to be supporting it but I see no commits in over 3 years): phacility/xhprof#85, phacility/xhprof#81

@oxyc
Copy link

oxyc commented Apr 3, 2018

I hit this with xhprof + php 7.1 as well. See geerlingguy/drupal-vm#1406 and the issues I link to there too.

@oxyc
Copy link

oxyc commented Apr 3, 2018

Latest d8 HEAD version of the xhprof module supports the tideways rename as well: https://cgit.drupalcode.org/XHProf/commit/?id=dafb2bc6efeb8241a4bc8b9e1e4eedbf68c13a3a.

Still no d7 support though.

@thom8
Copy link
Member

thom8 commented Apr 9, 2018

Disabled xhprof by default in #470 -- should be removed in the latest release 8.14

@thom8 thom8 closed this as completed Apr 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants