Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 7172 - apache cannot listen on multiple ports on sparc64
Summary: apache cannot listen on multiple ports on sparc64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: Sparc Linux
: High major (vote)
Assignee: Sparc Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-28 11:23 UTC by Troy Moniz
Modified: 2003-09-15 15:37 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
th3mp's mod_ssl notes (mod_ssl_notes,4.74 KB, application/octet-stream)
2003-07-23 17:27 UTC, Jason Wever (RETIRED)
Details
th3mp's mod_ssl notes (mod_ssl_notes,4.74 KB, text/plain)
2003-07-23 17:27 UTC, Jason Wever (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Troy Moniz 2002-08-28 11:23:57 UTC
When using emerge to emerge mod_ssl (which also emerges apache) it is broken 
out of box on both 1.1a for sparc64 and 1.4 beta tarballs.

Everything compiles and installs fine, and running plain apache will work, but 
if you pass apache the option -DSSL to start up mod_ssl, apache starts to load 
then dies with no errors or output.  It hangs when generating the DH keys.

This was tested on mulitple new installs on seperate ultra10 workstations and 
by someone else in #gentoo-linux on an ultra1.
Comment 1 Troy Moniz 2002-08-28 11:30:24 UTC
I forgot to mention that a straight vanilla download and hand compile of the 
latest openssl, mod_ssl and apache 1.3.26 works fine.  Somewhere the ebuild is 
doing something that is making apache not happy with mod_ssl.
Comment 2 Donny Davies (RETIRED) gentoo-dev 2002-08-28 15:01:45 UTC
bummer, but interesting...

it works fine out-of-the-box here on x86 as of today, 3:53PM EST starting
from a 1.4 stage-1 -> apache + mod_ssl.  this is with glibc-2.2.5-r6,
gcc-3.2-r1, mod_ssl-2.8.10, openssl-0.9.6e and also db-4 (probably 99%
people are using db-3 but ive been using it here s/db-3/db4/ fine
for months...)

im sorry i dont have any sparc hardware to test on, but from what i 
can tell, whatever it is is likely to be a small build issue or
other.  perhaps a small sparc patch...

i cant think of anything else atm without more information.
Comment 3 Troy Moniz 2002-08-28 18:34:30 UTC
Indeed it is only on sparc that this occurs.  I have a vanilla x86 box here and 
it works on 1.2 as well as 1.4 there.  However on any sparc it will not run.

Im positive it is the way emerge is compiling one of the pieces of software 
(openssl, mod_ssl, or apache) because as I said, if you download the source and 
do it by hand with no changes it works just fine.

I have an ultra10 you can test on if need be.  Just email me.
Comment 4 mccary 2002-10-09 19:31:16 UTC
i am experiencing this exact same problem on ppc-1.4. apache fine. apache+mod_php fine. but any combination with mod_ssl causes apache to die on load.  -brady 
Comment 5 mccary 2002-10-09 19:50:33 UTC
i just recomplied openssl. and apache appears to be working. 
 
before i was using -O3 and it wasnt working. 
 
now im using -O2 and it appears to be working. 
 
hope this helps. 
 
-brady 
Comment 6 mccary 2002-10-09 20:59:58 UTC
i was getting strange errors and sporadic brokenness from mod_ssl. 
 
then i recompiled mod_ssl, and now its exhibiting the exact same behavior as 
before. 
 
-brady 
Comment 7 Chris Russell (RETIRED) gentoo-dev 2002-11-23 04:08:53 UTC
same thing happening here, anyone got an idea yet?
I'll try rebuilding with less optimizations & post results later (my U1 isn't
that fast.. :) )
Comment 8 Christian Birchinger (RETIRED) gentoo-dev 2003-01-22 10:10:54 UTC
Just as info about CFLAGS. I tested the following packages with CFLAGS='-O2 -pipe'
on sparc64 and the error was _NOT_ fixed.

apache-1.3.27-r1.tbz2  mod_php-4.2.3.tbz2  mod_ssl-2.8.12.tbz2 openssl-0.9.6g.tbz2

Test was done long time ago but i think i post the infos here because every time
someone brings this topic back to life, people start talking about CFLAGS and
optimisation again.
Comment 9 Christian Birchinger (RETIRED) gentoo-dev 2003-02-08 17:10:25 UTC
apache2 also fails with SSL enabled. It doesn't crash though. Apache starts and binds the ports but doesn't answer to any requests. Theres also an error in the logfile if SSL is enabled: "[error] initialize MM 746a8 RMM 74770"
Comment 10 Christian Birchinger (RETIRED) gentoo-dev 2003-02-09 10:16:17 UTC
I retried today with less CFLAGS hacks on "dev-lib/mm" because apache2 writes
the error "[error] initialize MM 746a8 RMM 74770" to it's logfiles.

Now apache 1.3.27 also doesn't crash anymore but behaves like apache2 (it starts
and listens but doesn't answer any request). 

This test shows 2 things. First that it's also not a CFLAGS thing on dev-lib/mm.
The second and much more important thing is that it could be something with dev-lib/mm on linux/sparc. 1.2.1 hat the keyword added around the 6. Dec. It doesn't work (still) but it bahaves different. Before it crashed (segfault) and now it starts and runs but doesn't behave correct.
Comment 11 Christian Birchinger (RETIRED) gentoo-dev 2003-02-11 09:50:16 UTC
Problem doesn't seem to go away when apache and mod_ssl is compiled without "mm" support. So it's most likely not a "dev-lib/mm" issue.
Comment 12 Joshua Brindle (RETIRED) gentoo-dev 2003-02-11 12:09:38 UTC
dropping optimizations on all related packages (openssl, apache, mm, mod_ssl) doesn't help, changing the ssl session cache to not use semaphores doesn't help, changing the sslmutex doesn't help, excluding mm from apache and mod_ssl doesn't help and there is nothing enlightening in the strace of apache. We really need someone with very technical expertise to look at this, any volunteers?
Comment 13 Donny Davies (RETIRED) gentoo-dev 2003-02-11 13:41:50 UTC
try building without SHARED_CHAIN, see if that makes a difference.
im guessing not, but who knows.

remove it from the ./configure and try that.

if fails, im out of idea as Method has tried my other ideas.
Comment 14 Jason Wever (RETIRED) gentoo-dev 2003-04-26 13:28:20 UTC
As as side note, apache-1.3.27-r3 and mod_ssl-2.8.14 work out of the box for me om a SparcStation 4.  Still no luck on an UltraSparc machine however.
Comment 15 Jason Wever (RETIRED) gentoo-dev 2003-05-09 09:12:43 UTC
apache and mod_ssl work out of the box on an Ultra 1 using the default-sparc64-1.0 profile.  I built up a 1.0 system in a chroot using the stage3-sparc64-1.1a.tbz2 and emerge -u system, then emerged apache and mod_ssl.  So it would seem that gcc 3.x and/or glibc 2.3.x might have something to do with this.
Comment 16 Jason Wever (RETIRED) gentoo-dev 2003-06-14 16:47:11 UTC
Looking at this a little more.  Tried building apache + mod_ssl outside of portage to make sure it wasn't somehow a Gentoo problem.  No change.  I'm going to try posting to the mod_ssl users mailing list and see what comes up.
Comment 17 Jason Wever (RETIRED) gentoo-dev 2003-07-10 17:58:20 UTC
This happens with apache2 as well.  Submitted a bug to the Apache2 ppl about it.  Wanted to submit a bug to the mod_ssl people for apache1, but their bug reporting mechanism is broken.
Comment 18 Jason Wever (RETIRED) gentoo-dev 2003-07-23 17:27:43 UTC
Created attachment 14943 [details]
th3mp's mod_ssl notes

These are the notes th3mp made about getting mod_ssl and apache 1.x to work on
sparc64.  If anyone wants to play around feel free as I will not have time for
a week or so.
Comment 19 Jason Wever (RETIRED) gentoo-dev 2003-07-23 17:27:59 UTC
Created attachment 14944 [details]
th3mp's mod_ssl notes

These are the notes th3mp made about getting mod_ssl and apache 1.x to work on
sparc64.  If anyone wants to play around feel free as I will not have time for
a week or so.
Comment 20 Jason Wever (RETIRED) gentoo-dev 2003-07-23 17:29:36 UTC
If anyone wants to follow the bug I've submitted with the apache2 people, it's available at http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21485.
Comment 21 Jason Wever (RETIRED) gentoo-dev 2003-08-24 11:33:31 UTC
If you add the line

AcceptMutex fcntl

to your /etc/apache/conf/apache.conf file near the top (w/DocumentRoot), it solves this problem.
Comment 22 Jason Wever (RETIRED) gentoo-dev 2003-08-24 14:04:51 UTC
So here's the scoop on what's happening here.

It isn't mod_ssl that's causing the problem, it's having apache listen on more than one port.  You can replicate it by adding an additional Listen port to your /etc/apache/conf/apache.conf while SSL is disabled.  This effects apache 1.3.x as well as apache 2.0.x.  Waiting to  hear back from the apache folks to see if they have a suggested method of fixing this. 

In the mean time, we could fix this by adding an AcceptMutex line into the installed configs for sparc64s.  Woodchip, how does that sound to you?
Comment 23 Donny Davies (RETIRED) gentoo-dev 2003-08-24 15:53:45 UTC
No problem with me.  The configs are maintained in apache/files so if you
want to stuff in a line if sparc64's somewhere in src_install that sounds
like it'd work for ya.
Comment 24 Jason Wever (RETIRED) gentoo-dev 2003-08-25 12:17:49 UTC
Current portage ebuilds have now been adjusted to use AcceptMutex fcntl by default for sparcs.  Everyone please test and provide feedback.
Comment 25 Nick Hadaway 2003-09-15 09:00:39 UTC
works fine here.
apache-2.0.47
Linux sparcy 2.4.20-sparc-r8 #4 Thu Jun 19 00:08:44 CDT 2003 sparc64 sun4u TI UltraSparc IIe GNU/Linux
Comment 26 Jason Wever (RETIRED) gentoo-dev 2003-09-15 15:37:39 UTC
Marking as fixed as no one has reported problems with the modified ebuilds.