Apache works fine, after a fresh ebuild. I can use phpmyadmin and squirrelmail, under SSL. after the first restart of apache, apache does neither start properly or complain to console or logfile. Apache does start if i remove the -D PHP4 from the start script, which lead me to believe mod_php was to blame... though it worked after the initial build. I can "emerge mod_php" and suddenly it works fine ... until the next apache restart. Reproducible: Always Steps to Reproduce: 1. /etc/init.d/apache stop 2. /etc/init.d/apache start Actual Results: while monitoring with: ( while sleep 1; do ps acx | grep apache; done )& I see apache start it's initial process, which lasts for ~7 seconds. it then changes into a second process which lasts for 3 seconds. after that, there are no apache processes running at all. Expected Results: I expected apache to start and serve pages like it does initially. Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4) ================================================================= System uname: 2.4.20 i586 AMD-K6(tm) 3D processor GENTOO_MIRRORS="http://gentoo.oregonstate.edu/ http://distro.ibiblio.org/pub/Lin ux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/confi g /usr/kde/3/share/config /var/bind /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="x86 oss apm crypt cups gif imlib libg++ mikmod mmx ncurses pdflib quicktime spell xmms xv zlib alsa gdbm berkdb slang readline svga X gpm tcpd pam oggvorbi s gtk motif opengl mozilla -java -gnome -kde -arts -nls -postgres jpeg png truet ype xml xml2 avi aalib mpeg encode fbcon 3dnow sdl python perl qt mysql imap lib www maildir sasl ssl" COMPILER="gcc3" CHOST="i586-pc-linux-gnu" CFLAGS="-march=k6-2 -O3 -pipe -fomit-frame-pointer" CXXFLAGS="-march=k6-2 -O3 -pipe -fomit-frame-pointer" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache" ======================================================== uname -a Linux kavlax.vaevictus.net 2.4.20 #1 SMP Tue Apr 8 11:11:15 CDT 2003 i586 AMD-K6(tm) 3D processor AuthenticAMD GNU/Linux ======================================================== root@n8linux vae # emerge -p apache mod_php mod_perl mod_ssl These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] net-www/apache-1.3.27-r3 [ebuild R ] dev-php/mod_php-4.3.1 [ebuild R ] dev-perl/mod_perl-1.27-r1 [ebuild R ] net-www/mod_ssl-2.8.14 ========================================================
[Wed Apr 23 00:13:28 2003] [notice] Apache/1.3.27 (Unix) (Gentoo/Linux) mod_ssl/2.8.14 OpenSSL/0.9.6i mod_perl/1.27 PHP/4.3.1 configured -- resuming normal operations btw, you might notice the root@n8linux bit on the emerge -p line above, which is indeed from a separate system, but is exactly the same output from kavlax. So don't be alarmed by that. Sorry about any confusion there.
Can you reproduce this with either of mod_perl or mod_ssl disabled ? The fact that Apache seems to start initially, but dies very quickly indicates that it is dying for some reason. If you can, I recommend getting the output of strace -ff and digging thru the output files to find the one of the actual httpd binary to see where it dies. I saw something very similar on a Redhat9 box recently, I didn't work on it further as it vanished when mod_ssl was disabled.
Created attachment 11100 [details] output from strace -> SEGFAULT -> just using -D PHP4 this time, too.
I should clarify ... I'm probably completely off about the emerge mod_php helping. This morning, being grumpy, I tried to fix it with re-emerging mod_php again. This didn't help initially. I then did this: while ! ( sleep 25 && ps cax |grep apache ) ; do /etc/init.d/apache zap start; done ... and after 3 or 4 attempts to start apache, it was successful. So ... the emerge is probably not related... but I don't see how it can segfault 3 times in a row and then start to full production value with php ssl perl and the whole lot.
I had to reboot yesterday, and now I can't get apache to start at all, it seems. well... at least now it's being more consistant... though that means I can't get it to work at all.
please do the strace with 'strace -ff' or find out how apache calls 'httpd' and strace that with -ff directly. Looking at the current strace output, it could be possible that you have some bad RAM, but i'm not certain on that.
I thought I did do the strace with -ff. also, I ran memtest86 for 16 hours very recently, and found *no* problems with anything.
I don't know if this is of any help, but There's been some similar oddities like this when attempting to use apache + mod_ssl on sparc64. Using mod_ssl, and apache just silently dies. I've straced it, and it seems apache loads mod_ssl, mod_ssl attempts to bind to port 443, and gets an error back from the system saying "Address in Use". This is only seen on sparc64, works fine on other archs. I'm not sure if it might be related to this bug in any way, shape or form, but thought to mention it just in case.
*scrathes head* Nathan: if it is ok with you, could I please get temporary root access to your machine to dig out some more information and try a few things to solve this? I can work in a supervised shared screen session if you wish. If it is ok, please create a user account on the machine, and email me all the details (username/password/rootpassword/hostname) in a GPG encrypted email. My key is available here http://search.keyserver.net:11371/pks/lookup?template=netensearch%2Cnetennomatch%2Cnetenerror&search=0x34884E85&op=vindex&fingerprint=on&submit=Get+List Key ID: 34884E85 FingerPrint: 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
sent. Lemme know if you have issues.
How it will show up always: if you do '/etc/init.d/apache start' it always starts fine. Conditions to make it show the error: '-D PHP4' in conf.d/apache (other flags don't matter on or off, i have confirmed it exists with them off) AND you need to be starting from a non-interactive shell. A simple shell script works for this: '/etc/init.d/apache start' inside a file with chmod +x and run will show it happening. It's gremlins I say!
files changed: ok, now it is happening all the time with just '-D PHP4' The really strange thing is that there is NO error output. the mmap2 operation completes successfully, but right after that there is a segfault. However even with ulimit -c set properly, there is NO core file dumpped. /etc/php4/php.ini - grep for robbat2, there are 3 lines there commented out /var/log/apache/php.err - php was set to send errors here /etc/conf.d/apache - made copy of flags and played with them As a longshort, could you please try jark's solution from the forums: emerge -C apache php mod_php mod_ssl emerge sync emerge -u sablotron USE="-java -qt" emerge apache php mod_php mod_ssl but back up your apache+php config files first! As another idea, try emerging php+mod_php with USE="-crypt -java -qt".
Will do.
It's working! You Da Man! is there any explaination why this happened?
which part of my suggestions provided the solution? i want to track this down futher now.
Sure... I can give you access again if you'd like it, (i rotated passwords already)... but ... anyway... I simply: -------------------------------------------------------- emerge -C apache php mod_php mod_ssl emerge sync emerge -u sablotron USE="-java -qt" emerge apache php mod_php mod_ssl -------------------------------------------------------- and I'd note that when the problem was working before: I'd get 7 seconds with one process, 3 seconds with a 2nd, and then one or two actual spawned handling daemons. Now, I *quickly* get the 5 spawned daemons I was expecting.
I don't need access again. Could you try both of these USE="-java" emerge apache php mod_php mod_ssl USE="-qt" emerge apache php mod_php mod_ssl and see if you you reduce the bug to happening under one of them only?
it'll take a while... but i'll work on it. I'm rebuilding without any USE specified at all, just to verify that I still get the problem... then I'll do the other two. :D Sure wish I had more horsepower in that case.
Phase one: Verify problem with no "USE=" modification. finished. (apache doesn't work.). :D Phase two: Verify problem with "USE=-java" -- in progress.
Phase two: Verify problem with "USE=-java" -- finished: Apache still broken: probably not java. Phase three: Verify problem with "USE=-qt" -- finished: BINGO. "USE=-qt" is the culprit. Apache is now serving pages. :D You need anything else tested?
could you please try 4.3.1-r2] (not -r3) of mod_php with your original USE flags? -r1 and -r2 had some QT fixes and other bits.
i did: # emerge /usr/portage/dev-php/mod_php/mod_php-4.3.1-r2.ebuild and It appears to be working for me, after an apache restart of course.
oops... that was on the wrong machine... lemme try it again.
nope ... that didn't help. emerging mod_php (4.3.1-r2) still doesn't allow apache to start properly.
looks like you're having fun with this.
thanks for testing. I'll be careful with QT in my new php eclass. Could you tell me what version of QT you have installed? then i'll close this bug.
3.1.2, it seems. n8
Move to php-bugs
Closing this now, inconclusive. Nobody else has seen anything like it, so I suspect it is more of a gremlin in QT.
closing again
closing properly.