Hi,
I'm following the installation procedure (http://community.aegirproject.org/installing/debian) to install Aegir (same thing with 6.x-1.0-rc7 and 6.x-1.0) on Debian 6.0.1a i386 installed in a virtual machine (virtualbox-4.0_4.0.4-70112~Ubuntu~maverick_amd64.deb) on Ubuntu 10.10 desktop amd64.
I run out of memory. On the console I see "Out of memory and no killable processes". And I am no more able to access to the virtual machine and have to close it and re-open it.
I first gave 512 Mb to the virtual machine, then 1Gb, then 2Gb and still out of memory.
This is where it stops during installation (apt-get install aegir) through ssh:
[...]
+ [ -d /var/aegir/.drush/provision ]
+ echo installing the Aegir frontend (Drupal with the hostmaster profile), please wait...
installing the Aegir frontend (Drupal with the hostmaster profile), please wait...
+ su aegir -c drush hostmaster-install --yes --debug --backend myserver | drush backend-parse
Bootstrap to phase 0. [0.03 sec, 1.63 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.03 sec, 1.77 MB] [bootstrap]
Running a "top" during installation, it freeze at:
top - 15:34:10 up 22 min, 3 users, load average: 2.31, 1.35, 0.75
Tasks: 58 total, 1 running, 57 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.1%us, 15.9%sy, 0.0%ni, 0.0%id, 77.2%wa, 1.0%hi, 3.8%si, 0.0%st
Mem: 1034480k total, 1022036k used, 12444k free, 56k buffers
Swap: 392184k total, 392184k used, 0k free, 772k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1403 aegir 20 0 1375m 985m 12 D 11.7 97.6 14:11.79 php
1321 myuser 20 0 2332 344 168 R 3.3 0.0 0:01.90 top
1478 root 20 0 1708 88 8 S 2.0 0.0 0:00.09 getty
1477 root 20 0 1708 84 8 S 1.8 0.0 0:00.08 getty
15 root 20 0 0 0 0 S 1.5 0.0 0:00.51 kblockd/0
1315 myuser 20 0 8392 116 4 S 1.5 0.0 0:00.64 sshd
[...]
And the last "ps ax" I did before the freeze:
myuser@myserver:~$ ps ax
PID TTY STAT TIME COMMAND
1 ? Ss 0:00 init [2]
2 ? S 0:00 [kthreadd]
3 ? S 0:00 [migration/0]
4 ? S 0:00 [ksoftirqd/0]
5 ? S 0:00 [watchdog/0]
6 ? S 0:00 [events/0]
7 ? S 0:00 [cpuset]
8 ? S 0:00 [khelper]
9 ? S 0:00 [netns]
10 ? S 0:00 [async/mgr]
11 ? S 0:00 [pm]
12 ? S 0:00 [sync_supers]
13 ? S 0:00 [bdi-default]
14 ? S 0:00 [kintegrityd/0]
15 ? S 0:00 [kblockd/0]
16 ? S 0:00 [kacpid]
17 ? S 0:00 [kacpi_notify]
18 ? S 0:00 [kacpi_hotplug]
19 ? S 0:00 [kseriod]
21 ? S 0:00 [kondemand/0]
22 ? S 0:00 [khungtaskd]
23 ? D 0:00 [kswapd0]
24 ? SN 0:00 [ksmd]
25 ? S 0:00 [aio/0]
26 ? S 0:00 [crypto/0]
133 ? S 0:00 [ata/0]
134 ? S 0:00 [ata_aux]
136 ? S 0:00 [scsi_eh_0]
137 ? S 0:00 [scsi_eh_1]
175 ? S 0:00 [kjournald]
222 ? S<s 0:00 udevd --daemon
314 ? S< 0:00 udevd --daemon
315 ? S< 0:00 udevd --daemon
356 ? S 0:00 [kpsmoused]
732 ? Sl 0:00 /usr/sbin/rsyslogd -c4
761 ? Ss 0:00 /usr/sbin/acpid
774 ? Sl 0:00 /usr/sbin/VBoxService
793 ? Ss 0:00 /usr/sbin/apache2 -k start
796 ? S 0:00 /usr/sbin/apache2 -k start
798 ? Sl 0:00 /usr/sbin/apache2 -k start
799 ? Sl 0:00 /usr/sbin/apache2 -k start
913 ? Ss 0:00 /usr/sbin/cron
926 ? S 0:00 /bin/sh /usr/bin/mysqld_safe
1044 ? Sl 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
1045 ? S 0:00 logger -t mysqld -p daemon.error
1057 ? S 0:00 [flush-8:0]
1200 ? Ss 0:00 /usr/lib/postfix/master
1224 tty1 Ss+ 0:00 /sbin/getty 38400 tty1
1225 tty2 Ss+ 0:00 /sbin/getty 38400 tty2
1226 tty3 Ss+ 0:00 /sbin/getty 38400 tty3
1227 tty4 Ss+ 0:00 /sbin/getty 38400 tty4
1228 tty5 Ss+ 0:00 /sbin/getty 38400 tty5
1229 tty6 Ss+ 0:00 /sbin/getty 38400 tty6
1246 ? Ss 0:00 dhclient -v -pf /var/run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0
1277 ? Ss 0:00 /usr/sbin/sshd
1296 ? S 0:00 pickup -l -t fifo -u -c
1297 ? S 0:00 qmgr -l -t fifo -u
1298 ? Ss 0:00 sshd: myuser [priv]
1301 ? S 0:00 sshd: myuser@pts/0
1302 pts/0 Ss 0:00 -bash
1307 pts/0 S 0:00 su -
1308 pts/0 S 0:00 -su
1312 ? Ss 0:00 sshd: myuser [priv]
1315 ? S 0:00 sshd: myuser@pts/1
1316 pts/1 Ss 0:00 -bash
1321 pts/1 S+ 0:01 top
1322 ? Ss 0:00 sshd: myuser [priv]
1324 ? S 0:00 sshd: myuser@pts/2
1325 pts/2 Ss 0:00 -bash
1359 pts/0 S+ 0:00 dpkg --configure -a
1365 pts/0 S+ 0:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/aegir-hostmaster.postinst configure
1386 pts/0 S+ 0:00 /bin/sh /var/lib/dpkg/info/aegir-hostmaster.postinst configure
1401 pts/0 S+ 0:00 su aegir -c drush hostmaster-install --yes --debug --backend myserver | drush backend-parse
1402 pts/0 S+ 0:00 bash -c drush hostmaster-install --yes --debug --backend myserver | drush backend-parse
1403 pts/0 R+ 10:51 php /usr/bin/drush hostmaster-install --yes --debug --backend myserver
1404 pts/0 S+ 0:00 php /usr/bin/drush backend-parse
1423 pts/2 R+ 0:00 ps ax
myuser@myserver:~$
Comments
Comment #1
anarcat commentedhello jo!
Can you try to run the install again, but this time manually? First install provision:
(i am confident this part works :)
Then install the frontend manually:
If that still freezes, try to run it within strace:
... or a debugger to figure out what the hell is going on.
I have never seen anything like this. :)
Comment #2
j0nathan commentedThanks for the help anarcat.
Assigning to me.
Comment #3
steven jones commentedCan you confirm what version of PHP you are using? When I was using PHP 5.3 I had this issue, after downgrading to 5.2 it was fine.
Comment #4
j0nathan commentedIt seems it installs php5-cli 5.3.3-7+squeeze1 in the process.
Before starting the installation of aegir, it's an empty Debian in my virtual machine ("dpkg -l |grep -i php" returns nothing). After trying to install aegir, I can find php5-cli, php5-common and php5-mysql at version 5.3.3-7+squeeze1, and php5-suhosin 0.9.32.1-1.
Comment #5
j0nathan commentedComment #6
anarcat commentedJ0nathan - if you want to test this again, let me know so we can sit in front of the console together for a while... next week?
Comment #7
chriszz commentedI can confirm that problem / exactly the same situation here / and I have bound my php to version 5.2...
regards
Christian
Comment #8
steven jones commented@ChrisZZ have you tried any of what anarcat said in comment 1?
Comment #9
chriszz commentedI just had it installed manually / and that worked like a charm like always...
Comment #10
anarcat commentedI can confirm all the above - we had two people (out of 12) in the training that suffered from that problem, both running Debian Squeeze and php 5.3.3. reverting to the manual install works.
Comment #11
ergonlogicI suspect this may be related to this bug #1075322: Creating a site gives many "Function ereg() is deprecated file.inc:941" errors and a broken site - or more precisely this bug in core: #883038: PHP warning: Function ereg() is deprecated in includes/file.inc, for which I have provided a new patch.
Can you try again by applying the patch in that latter bug?
Comment #12
anarcat commentedoops, sorry, that was me with ergonlogic logged into my laptop :)
Comment #13
vadym.kononenko commentedHi all.
I`ve got the same error.
In my case it was repeatedly returned prompt for admin`s e-mail request:
"Admin user e-mail [webmaster@vadym-desktop]:"
When I've replace 'vadym-desktop' name in
1) /etc/hostname and
2) /etc/hosts
to fully qualified name 'aegir-hostmaster' package was installed successfully.
Cheers.
Comment #14
anarcat commentedCan anyone test this here?
Maybe we can bundle #1128844: "Out of memory and no killable processes" during installation in the aegir makefile...?
Comment #15
ergonlogicThe issue I reported in #1300216: .deb install fails but reports "installed" may share this as a root cause, except that the process eventually dies, once memory is exhausted.
re. 14, what exactly would you like to have tested? As for the second part... huh?!?
Comment #16
ergonlogicI see the problem in 1.4.
Oh, I see, you mean bundle the patch from #883038: PHP warning: Function ereg() is deprecated in includes/file.inc? Could you upload a new version to testing repo?
Comment #17
anarcat commentedYes, sorry. :) To test it, you'd need to override the makefile parameter to the install, which involves installing with low priority... a bit tricky. I can't upload something right now, maybe next week...
Comment #18
steven jones commentedRight, I'm on the trail of this bug, and am getting somewhere.
Comment #19
steven jones commentedSo, I set up a makefile as anarcat suggested, and run the apt-get install aegir with the debug flag, it runs this command and stalls:
su aegir -c "drush hostmaster-install --yes --debug --makefile='/root/aegir.make' hostname"Note that my hostname has no dots in it.
Running this command manually gives this:
(This goes on forever, or until you run out of memory)
Yup, it's prompting for the email address as the auto generated one is not valid and ending up in a loop.
A quick hack to default the email address to always add in a '.example' to the end, and it works!
Comment #20
steven jones commentedAnarcat do you reckon this needs fixing in the debian package that installs Aegir? Should we prompt for an email address too? Or should we add something so that if someone tries to use an invalid email address say 100 times, then we'll pick a valid dummy one for them to use instead?
Comment #21
anarcat commentedCrap, this is the email validation procedure that craps out:
I seem to recall that this is a problem in drupal, but looking at this code makes me believe that everything is alright, as FILTER_VALIDATE_EMAIL should allow webmaster@hostname - I am not sure what's going on there, as it should pass validation.
I do not think the problem is with the debian package however. What we should do is handle the case where the terminal is dead in drush_prompt (or wrap around it) so that we don't loop like an idiot.
I have push a workaround in 6.x-2.x (4cfc0f2 and 512a2c8) that will not enter the loop - I am not sure this will fix things, but it's all i can do in the short term, let's see what jenkins thinks of it. Steven, can you test it?
Comment #22
steven jones commentedWill test it as soon as I can.
With regard to the email validation, I believe that PHP 5.3 is stricter about what it accepts as a valid email address than PHP 5.2, which is why dropping to 5.2 would magically allow the install to proceed.
Comment #23
steven jones commentedI've just tested, and this does indeed solve the issue!
Merged the fix into 6.x-1.x. Awesome work!
Comment #24
marafa commentedchanging the title of the issue as i also met this lovely bug on a centos vm