Hey, the virtual host file of one of my sites keeps disappearing. Only when verifying the site in aegir it's accessible for a couple of minutes than i get the under construction site.

When checking:

/data/disk/CLIENT/config/server_master/nginx/vhost.d/

the vhost file just get's deleted somehow...

Comments

muschpusch’s picture

Ok now i can reproduce!

i run a query on a data module table (some external table)


  $query = db_select('objecten', 'o');
  $query->addField('o', 'id');
  $query->addField('o', 'item_id');
  $query->condition('gid', $gid, '=');
  $query->condition('query', $query, '=');
  $query->groupBy('query');
  $results = $query->execute();

I get this error:

502 Bad Gateway 

(Even when just running the above code on devel/php)
After that some magic happens and the site is offline. After some time a site verify task seems to run and the site is back

My octopus.log

Sun May  6 14:41:49 CEST 2012 / Debian.squeeze x86_64 / Aegir BOA-2.0.2 / Octopus BOA-2.0.2 / FPM 5.2
Sat May 19 20:10:56 CEST 2012 / Debian.squeeze x86_64 / Aegir BOA-2.0.3 / Octopus BOA-2.0.3 / FPM 5.2 / CLI 5.2

My barracuda.log

Sun May  6 03:06:45 CEST 2012 / Debian.squeeze x86_64 XEN / Aegir BOA-2.0.2 / Barracuda BOA-2.0.2 / Nginx 1.0.12 / PHP 5.2.17 and 5.3.10 / FPM 5.2 / MariaDB localhost / Wildcard NO
Sat May 19 13:50:44 CEST 2012 / Debian.squeeze x86_64 XEN / Aegir BOA-2.0.3 / Barracuda BOA-2.0.3 / Nginx 1.3.0 / PHP 5.2.17 and 5.3.13 / MODERN-NO / FPM 5.2 / CLI 5.2 / MariaDB-5.5.23 localhost / Wildcard NO
Wed May 23 15:57:40 CEST 2012 / Debian.squeeze x86_64 XEN / Aegir BOA-2.0.3 / Barracuda BOA-2.0.3 / Nginx 1.3.0 / PHP 5.2.17 and 5.3.13 / MODERN-NO / FPM 5.2 / CLI 5.2 / MariaDB-5.5.23 localhost / Wildcard NO

.user.octopus.cnf

###
### Configuration created on 120506-1421 with
### Octopus version BOA-2.0.2
###
### NOTE: the group of settings displayed bellow
### will *override* all listed settings in the Octopus script.
###
_USER="user"
_MY_EMAIL="email"
_PLATFORMS_LIST="D7P D7S D7D D6P D6S D6D OAM"
_AUTOPILOT=NO
_HM_ONLY=NO
_O_CONTRIB_UP=YES
_DEBUG_MODE=NO
_MY_OWNIP=
_FORCE_GIT_MIRROR=""
_THIS_DB_HOST=localhost
_DNS_SETUP_TEST=YES
_HOT_SAUCE=NO
_USE_CURRENT=YES
_REMOTE_CACHE_IP=127.0.0.1
_LOCAL_NETWORK_IP=
###
### NOTE: the group of settings displayed bellow will be *overriden*
### by config files stored in the /data/disk/user/log/ directory,
### but only on upgrade.
###
_DOMAIN="somedomain"
_CLIENT_EMAIL="someemail"
_CLIENT_OPTION="CLASSIC"
_CLIENT_SUBSCR="M"
_CLIENT_CORES="4"
###
### Configuration created on 120506-1421 with
### Octopus version BOA-2.0.2
###
_PHP_FPM_VERSION=5.2
_PHP_CLI_VERSION=5.2
omega8cc’s picture

Component: Miscellaneous » Documentation
Category: bug » support
Status: Active » Closed (works as designed)

You may want to read explanation in the changelog: http://drupalcode.org/project/barracuda.git/blob/HEAD:/CHANGELOG.txt#l67

muschpusch’s picture

aaahh... just wanted to post this!

May 23 23:21:47 some kernel: [1502196.806709] php-fpm[39830]: segfault at 7fffc3dacf78 ip 000000000067549a sp 00007fffc3dacf40 error 6 in php5-fpm[400000+821000]
May 23 23:21:47 felix mysqld: 120523 23:21:47 [Warning] Aborted connection 351669 to db: 'site' user: 'site' host: 'localhost' (Unknown error)
May 23 23:22:01 felix /USR/SBIN/CRON[45041]: (root) CMD (bash /var/xdrago/second.sh >/dev/null 2>&1)
May 23 23:22:01 felix /USR/SBIN/CRON[45040]: (root) CMD (bash /var/xdrago/runner.sh >/dev/null 2>&1)
May 23 23:22:01 felix /USR/SBIN/CRON[45039]: (root) CMD (bash /var/xdrago/minute.sh >/dev/null 2>&1)

I got no mail and i'm the site owner. I also checked the mail.log. But more important what can i do to fix this? Why is a simple query causing a segfault?

muschpusch’s picture

Hm... i restarted php-fpm but the segfault is still there. Should i upgrade to php-fpm 5.3?

muschpusch’s picture

Sorry it was late yesterday. I had a good look at the links and the php bugs reports. I checked the whole platform for php files with 4096 or 8192 bytes but no results

find ./* -type f -exec ls -la {} \; | grep 4096
find ./* -type f -exec ls -la {} \; | grep 8192
omega8cc’s picture

Title: virtual hostfile disappears » The segfault monitor aggressive mode should be optional
Project: Barracuda » Octopus
Component: Documentation » Code
Category: support » feature
Status: Closed (works as designed) » Active

I think we should make it configurable and only send e-mail alerts by default, while the aggressive mode with disabling vhost should be optional.

muschpusch’s picture

Thanks for all your help! Just for others in 2.0.3 you can disable the segfault error system by renaming or deleting:

/var/xdrago/monitor/check/segfault_alert
muschpusch’s picture

Ok in the code i'm doing something extremely stupid:

  $query = db_select('objecten', 'o');
  $query->addField('o', 'id');
  $query->addField('o', 'item_id');
  $query->condition('gid', $gid, '=');
  $query->condition('query', $query, '=');
  $query->groupBy('query');
  $results = $query->execute();

I use a variable $query and the query object is $query. It's mean that php is punishing me for that with a segmentation fault but it's stupid too!

omega8cc’s picture

Project: Octopus » Barracuda
Status: Active » Fixed

We have disabled this aggressive mode in the BOA HEAD completely by default, so it only sends the e-mail warning when this happens. I don't think it should disable any site, as most probably it is PHP bug exposed and not really bad code in the site (which may happen, like in the #9 above, but is rare). E-mail alert sent to the server owner and Octopus instance owner should be enough.

The commit: http://drupalcode.org/project/barracuda.git/commit/afe3e83

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.