geerlingguy / drupal-vm

A VM for Drupal development
https://www.drupalvm.com/
MIT License
1.37k stars 645 forks source link

Installing APC along OPcache causes Segmentation errors in Apache #347

Closed jhovanic closed 8 years ago

jhovanic commented 8 years ago

Once you disable php-apc from php_packages the segmentation errors no longer happen. It's still unclear to me if this is caused by APC itself or the combination of APC and OPcache being installed at the same time, even though Zend OPcache was not enabled.

geerlingguy commented 8 years ago

Is this on Ubuntu 14.04, or a different OS? I'll take a look—but I haven't encountered this issue running either PHP 5.5, 5.6, or 7.0 on Ubuntu 14.04 or CentOS 7...

What other changes have you made in config.yml, and when do you encounter the segmentation errors?

jhovanic commented 8 years ago

This is for ubuntu/trusty64 although I must mention that this happened even with the default box when you first download the drupalvm repo(geerlingguy/ubuntu1404) and the config.yml it's as follows:

---
vagrant_box: ubuntu/trusty64
vagrant_user: vagrant
vagrant_hostname: drupalvm.dev
vagrant_machine_name: drupalvm
vagrant_ip: "192.168.10.122"
vagrant_public_ip: ""
vagrant_synced_folders:
  - local_path: ./docroot
    destination: /var/www/html/docroot
    type: nfs
    create: true
vagrant_memory: 1024
vagrant_cpus: 2
drupalvm_webserver: apache
build_makefile: true
drush_makefile_path: /vagrant/drupal.make.yml
install_site: true
drupal_major_version: 7
drupal_core_path: "/var/www/html/docroot"
drupal_domain: "drupalvm.dev"
drupal_site_name: "Drupal"
drupal_install_profile: standard
drupal_enable_modules: [ 'devel' ]
drupal_account_name: admin
drupal_account_pass: admin
drupal_mysql_user: drupal
drupal_mysql_password: drupal
drupal_mysql_database: drupal
drupal_site_install_extra_args: []
drupalvm_cron_jobs: []
configure_local_drush_aliases: true
apache_vhosts:
  - servername: "{{ drupal_domain }}"
    documentroot: "{{ drupal_core_path }}"
  - servername: "adminer.drupalvm.dev"
    documentroot: "/opt/adminer"
  - servername: "xhprof.drupalvm.dev"
    documentroot: "/usr/share/php/xhprof_html"
  - servername: "pimpmylog.drupalvm.dev"
    documentroot: "/usr/share/php/pimpmylog"
apache_remove_default_vhost: true
apache_mods_enabled:
  - expires.load
  - ssl.load
  - rewrite.load
nginx_hosts:
  - server_name: "{{ drupal_domain }}"
    root: "{{ drupal_core_path }}"
    is_php: true
  - server_name: "adminer.drupalvm.dev"
    root: "/opt/adminer"
    is_php: true
  - server_name: "xhprof.drupalvm.dev"
    root: "/usr/share/php/xhprof_html"
    is_php: true
  - server_name: "pimpmylog.drupalvm.dev"
    root: "/usr/share/php/pimpmylog"
    is_php: true
nginx_remove_default_vhost: true
mysql_databases:
  - name: "{{ drupal_mysql_database }}"
    encoding: utf8
    collation: utf8_general_ci
mysql_users:
  - name: "{{ drupal_mysql_user }}"
    host: "%"
    password: "{{ drupal_mysql_password }}"
    priv: "{{ drupal_mysql_database }}.*:ALL"
installed_extras:
  - adminer
  - drupalconsole
  - mailhog
  - memcached
  - nodejs
  - pimpmylog
  - ruby
  # - selenium
  # - solr
  - varnish
  - xdebug
  - xhprof
extra_packages:
  - unzip
nodejs_version: "0.12"
nodejs_npm_global_packages: 
  - name: gulp-cli
  - name: bower
ruby_install_gems: 
  - compass
extra_security_enabled: false
drush_version: master
drush_keep_updated: true
drush_composer_cli_options: "--prefer-dist --no-interaction"
firewall_allowed_tcp_ports:
  - "22"
  - "25"
  - "80"
  - "81"
  - "443"
  - "4444"
  - "8025"
  - "8080"
  - "8443"
  - "8983"
firewall_log_dropped_packets: false
php_version: "5.6"
php_memory_limit: "256M"
php_display_errors: "On"
php_display_startup_errors: "On"
php_enable_php_fpm: 1
php_realpath_cache_size: "1024K"
php_sendmail_path: "/usr/sbin/ssmtp -t"
php_opcache_enabled_in_ini: false
php_opcache_memory_consumption: "192"
php_opcache_max_accelerated_files: 4096
php_max_input_vars: "4000"
composer_path: /usr/bin/composer
composer_home_path: '/home/vagrant/.composer'
mysql_root_password: root
mysql_slow_query_log_enabled: true
mysql_slow_query_time: 2
mysql_wait_timeout: 300
adminer_install_filename: index.php
varnish_listen_port: "81"
varnish_default_vcl_template_path: templates/drupalvm.vcl.j2
varnish_default_backend_host: "127.0.0.1"
varnish_default_backend_port: "80"
pimpmylog_install_dir: /usr/share/php/pimpmylog
pimpmylog_grant_all_privs: true
php_xdebug_default_enable: 0
php_xdebug_coverage_enable: 0
php_xdebug_cli_enable: 1
php_xdebug_remote_enable: 1
php_xdebug_remote_connect_back: 1
php_xdebug_idekey: PHPSTORM
php_xdebug_max_nesting_level: 256
solr_version: "4.10.4"
solr_xms: "64M"
solr_xmx: "128M"
selenium_version: 2.46.0
known_hosts_path: ~/.ssh/known_hosts

I removed comments and empty lines for better readability here.

geerlingguy commented 8 years ago

@JhovaniC - A couple things to try:

  1. Can you run sudo ansible-galaxy install -r provisioning/requirements.yml --force in the same directory as the Vagrantfile to make sure you're running the latest version of all the roles.
  2. Can you try vagrant destroy -f then try running vagrant up after changing vagrant_box back to the default geerlingguy/ubuntu1404. There's a small chance something in the ubuntu official box is not correct our out of date.

Also, if you can provide a reliable set of steps to reproduce, I can see if I can get it to happen in one of my environments.

jhovanic commented 8 years ago

@geerlingguy I'm installing into a roles directory like this: ansible-galaxy install -r provisioning/requirements.yml -p provisioning/roles. I'd like to keep those roles contained inside the project. Also this happened with the geerlingguy/ubuntu1404 box.

geerlingguy commented 8 years ago

Can you run that command again, then, with --force, just to make sure you're on the latest versions of all the roles?

geerlingguy commented 8 years ago

This looks eerily similar to https://github.com/geerlingguy/drupal-vm/issues/341 — and the fix for that issue is to make sure the PHP role is up to date (it was fixed in the latest version).

jhovanic commented 8 years ago

@geerlingguy sure, I'm also downloading the project again to get error logs.

jhovanic commented 8 years ago

@geerlingguy the issue is solved with --force when installing the roles.

geerlingguy commented 8 years ago

Great!