You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Cliff Woolley <cl...@yahoo.com> on 2001/07/27 01:32:16 UTC

CGI showstopper: Re: http://bugs.apache.org/ gives us a 500

On Thu, 26 Jul 2001, Greg Ames wrote:

> > Greg, what are you seeing?  Was this the latest inherit fix or an
> > earlier iteration?
>
> OK, I just bounced us twice.  Once to yesterday's build (the most
> recent) which gave me this on the console:
>
> Warning: SuexecUserGroup directive requires SUEXEC wrapper.
>
> ...and many more in the error_log.  I didn't see these last might when I
> first brought it up.
>
> So I bounced us back to the 2.0.21 tarball build.  suexec and
> bugs.apache.org appear to be healthy once more.  I'll investigate
> further.


The bad news is that it's apparently not an suexec problem... I just tried
it on my machine against /cgi-bin/printenv and got a 500.  :-(  All CGIs
are apparently broken.

Showstopper.

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA


Re: CGI showstopper: Re: http://bugs.apache.org/ gives us a 500

Posted by Cliff Woolley <cl...@yahoo.com>.
On Thu, 26 Jul 2001, William A. Rowe, Jr. wrote:

> Which is why I just patched Win32's build to determine the path to
> perl for the printenv.pl :-)  You aren't the only one to trip on this.
> Never mind the things I was tripping over today (whoops ... forgot
> apr/apr-util ... gee, maybe we should warn the user in the make file
> :)

Is there any particular reason we aren't just using #!perl and crossing
our fingers that it's in the path?  I guess we're intentionally making it
hard to run the standard CGIs... but I think the user having to move them
out of cgi-examples is chore enough.  If they do that, they want them and
presumably understand the risks and will probably expect them to just
work, as I did.  Oops.  =-)

> Those sorts o' things.  It makes for a better system, when we actually
> get around and fix them up.

Yep.

In the process of debugging the easy problems as if they were hard (:-), I
discovered that mod_cgi.c doesn't compile in DEBUG_CGI mode because of
some undeclared variables (looks like that particular line got moved to a
new function where the variables no longer exist).  I'll fix that later...

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: CGI showstopper: Re: http://bugs.apache.org/ gives us a 500

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
From: "Cliff Woolley" <cl...@yahoo.com>
Sent: Thursday, July 26, 2001 7:34 PM


> On Thu, 26 Jul 2001, Greg Ames wrote:
> 
> > The bad news is that it's apparently not an suexec problem... I just tried
> > it on my machine against /cgi-bin/printenv and got a 500.  :-(  All CGIs
> > are apparently broken.
> 
> Duhhhhhh... now don't I feel like an idiot.  Simple configuration problem.
> It helps if the #! in your cgi script is the right path to perl.  :-/


Which is why I just patched Win32's build to determine the path to perl for the
printenv.pl :-)  You aren't the only one to trip on this.  Never mind the things
I was tripping over today (whoops ... forgot apr/apr-util ... gee, maybe we should
warn the user in the make file :) 

Those sorts o' things.  It makes for a better system, when we actually get around
and fix them up.

> Nevermind.  I don't know what the hell the problem is with
> bugs.apache.org.

Nor here :(  I suspect it's a symlink we are using, or the inherit patch is causing
us to close the std handles, but beyond that, I dunno.



Re: CGI showstopper: Re: http://bugs.apache.org/ gives us a 500

Posted by Cliff Woolley <cl...@yahoo.com>.
On Thu, 26 Jul 2001, Greg Ames wrote:

> The bad news is that it's apparently not an suexec problem... I just tried
> it on my machine against /cgi-bin/printenv and got a 500.  :-(  All CGIs
> are apparently broken.

Duhhhhhh... now don't I feel like an idiot.  Simple configuration problem.
It helps if the #! in your cgi script is the right path to perl.  :-/

Nevermind.  I don't know what the hell the problem is with
bugs.apache.org.

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: CGI showstopper: Re: http://bugs.apache.org/ gives us a 500

Posted by Greg Ames <gr...@remulak.net>.
Cliff Woolley wrote:
> 
> On Thu, 26 Jul 2001, Greg Ames wrote:
> 
> > I don't know where the libdir junk comes from, but it looks wrong.  I
> > cp'ed my source tree from the previous build,

uhh, no, I didn't do the cp, I just re-used the same updated source tree
for the new (bad) build

> >              then did a "cvs up".  Then
> > I think I did a "make distclean" and "./buildconf" because of Cliff's
> > changes to apr's configure.in.  So either "make distclean" isn't as
> > clean as I thought, or I forgot to do it.
> >
> > In any case, a fresh cvs checkout will cure it in the future if I need
> > to do something similar.
> 
> Did you maybe have an old libdir stuck in your config.nice 

nope.  not even a new one.

> (assuming you used config.nice)?

all the time...it's the greatest thing since sliced bread.

Greg
-----------------------------------------------------------------	
#! /bin/sh
#
# Created by configure
 
"./configure" \
"--with-mpm=prefork" \
"--prefix=/usr/local/apache2.0.22-dev2" \
"--with-suexec-logfile=/usr/local/apache2.0.22-dev2/logs/www/suexec.log"
\
"--enable-maintainer-mode" \
"--disable-threads" \
"--disable-cgid" \
"--enable-cgi=shared" \
"--enable-vhost_alias=shared" \
"--enable-alias=shared" \
"--enable-env=shared" \
"--enable-log_config=shared" \
"--enable-mime_magic=shared" \
"--enable-mime=shared" \
"--enable-negotiation=shared" \
"--enable-status=shared" \
"--enable-info=shared" \
"--enable-include=shared" \
"--enable-autoindex=shared" \
"--enable-dir=shared" \
"--enable-auth=shared" \
"--enable-auth_anon=shared" \
"--enable-auth_dbm=shared" \
"--enable-auth_db=shared" \
"--enable-auth_digest=shared" \
"--enable-cern_meta=shared" \
"--enable-expires=shared" \
"--enable-headers=shared" \
"--enable-usertrack=shared" \
"--enable-unique_id=shared" \
"--enable-setenvif=shared" \
"--enable-asis=shared" \
"--enable-imap=shared" \
"--enable-actions=shared" \
"--enable-access=shared" \
"--enable-userdir=shared" \
"--enable-speling=shared" \
"--enable-rewrite=shared" \
"--enable-suexec=shared" \
"--with-suexec-caller=nobody" \
"--with-suexec-docroot=/da1/www/bugs.apache.org" \
"$@"

Re: CGI showstopper: Re: http://bugs.apache.org/ gives us a 500

Posted by Cliff Woolley <cl...@yahoo.com>.
On Thu, 26 Jul 2001, Greg Ames wrote:

> I don't know where the libdir junk comes from, but it looks wrong.  I
> cp'ed my source tree from the previous build, then did a "cvs up".  Then
> I think I did a "make distclean" and "./buildconf" because of Cliff's
> changes to apr's configure.in.  So either "make distclean" isn't as
> clean as I thought, or I forgot to do it.
>
> In any case, a fresh cvs checkout will cure it in the future if I need
> to do something similar.

Did you maybe have an old libdir stuck in your config.nice (assuming you
used config.nice)?

--Cliffp


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: CGI showstopper: Re: http://bugs.apache.org/ gives us a 500

Posted by Greg Ames <gr...@remulak.net>.
Marc Slemko wrote:
> 
> On Thu, 26 Jul 2001, Greg Ames wrote:
> 
> > maybe not.  bugs.apache.org/suexec was working on yesterday's build
> > until 08:09 daedalus time, then abruptly quit.  About a minute before
> > that I deleted a couple of install directories we aren't using any
> > more.  hmmmm....
> 
> maybe it is trying to execute suexec from the wrong place, that no longer
> exists?
> 
> truss/ktrace it and see if it is getting as far as trying to exec
> suexec and, if so, what path.
> 
> and maybe try restarting httpd, if no one has, to see if it says anything
> about suexec at startup now, after the directories were removed...

Mark,

u da man!

Mystery nearly solved.  It's a build problem.

Thanks much!
Greg
----------------------------------------------------------------------------
gory details:

as a matter of fact, whenever I try starting httpd from yesterday's
build, I now get:

Warning: SuexecUserGroup directive requires SUEXEC wrapper.  

on the console, and (at least on the production config) a bunch of times
in the error log.  I like your suggestions...

(types in truss)

stat("/usr/local/apache2.0.22-dev/sbin/suexec",0xbfbff9b8) ERR#2 'No
such file or directory'

bingo!  that's one of the directories I wiped out right before
bugs.apache.org quit working.  hmmm...  

[gregames@daedalus httpd-2.0.22-dev]$ strings httpd | grep apache2
 -D HTTPD_ROOT="/usr/local/apache2.0.22-dev2"
 -D SUEXEC_BIN="/usr/local/apache2.0.22-dev2/sbin/suexec"
/usr/local/apache2.0.22-dev2
/usr/local/apache2.0.22-dev2/htdocs
/usr/local/apache2.0.22-dev/sbin/suexec  <===== wrong!

[gregames@daedalus httpd-2.0.22-dev]$ grep -r "apache2.0.22-dev\/" .
Binary file ./os/unix/unixd.o matches
Binary file ./os/unix/.libs/libos.a matches
./srclib/apr/shmem/unix/mm/.libs/libmm.lai:libdir='/usr/local/apache2.0.22-dev/lib'
./srclib/apr/shmem/unix/mm/.libs/libmm.la:libdir='/usr/local/apache2.0.22-dev/lib'
./srclib/apr/shmem/unix/mm/libmm.la:libdir='/usr/local/apache2.0.22-dev/lib'
./srclib/apr/.libs/libapr.lai:libdir='/usr/local/apache2.0.22-dev/lib'
./srclib/apr/.libs/libapr.la:libdir='/usr/local/apache2.0.22-dev/lib'
./srclib/apr/libapr.la:libdir='/usr/local/apache2.0.22-dev/lib'
./srclib/apr-util/.libs/libaprutil.lai:libdir='/usr/local/apache2.0.22-dev/lib'
./srclib/apr-util/.libs/libaprutil.la:libdir='/usr/local/apache2.0.22-dev/lib'
./srclib/apr-util/libaprutil.la:libdir='/usr/local/apache2.0.22-dev/lib'
Binary file ./httpd matches  

I don't know where the libdir junk comes from, but it looks wrong.  I
cp'ed my source tree from the previous build, then did a "cvs up".  Then
I think I did a "make distclean" and "./buildconf" because of Cliff's
changes to apr's configure.in.  So either "make distclean" isn't as
clean as I thought, or I forgot to do it. 

In any case, a fresh cvs checkout will cure it in the future if I need
to do something similar.

Greg

Re: CGI showstopper: Re: http://bugs.apache.org/ gives us a 500

Posted by Marc Slemko <ma...@znep.com>.
On Thu, 26 Jul 2001, Greg Ames wrote:

> maybe not.  bugs.apache.org/suexec was working on yesterday's build
> until 08:09 daedalus time, then abruptly quit.  About a minute before
> that I deleted a couple of install directories we aren't using any
> more.  hmmmm....

maybe it is trying to execute suexec from the wrong place, that no longer
exists?

truss/ktrace it and see if it is getting as far as trying to exec
suexec and, if so, what path.

and maybe try restarting httpd, if no one has, to see if it says anything
about suexec at startup now, after the directories were removed...


Re: CGI showstopper: Re: http://bugs.apache.org/ gives us a 500

Posted by Greg Ames <gr...@remulak.net>.
Cliff Woolley wrote:
> 
> On Thu, 26 Jul 2001, Greg Ames wrote:
> 
> > > Greg, what are you seeing?  Was this the latest inherit fix or an
> > > earlier iteration?
> >
> > OK, I just bounced us twice.  Once to yesterday's build (the most
> > recent) which gave me this on the console:
> >
> > Warning: SuexecUserGroup directive requires SUEXEC wrapper.
> >
> > ...and many more in the error_log.  I didn't see these last might when I
> > first brought it up.
> >
> > So I bounced us back to the 2.0.21 tarball build.  suexec and
> > bugs.apache.org appear to be healthy once more.  I'll investigate
> > further.
> 
> The bad news is that it's apparently not an suexec problem... I just tried
> it on my machine against /cgi-bin/printenv and got a 500.  :-(  All CGIs
> are apparently broken.
> 
> Showstopper.

maybe not.  bugs.apache.org/suexec was working on yesterday's build
until 08:09 daedalus time, then abruptly quit.  About a minute before
that I deleted a couple of install directories we aren't using any
more.  hmmmm....

More investigation seems in order.

Greg

Re: CGI showstopper: Re: http://bugs.apache.org/ gives us a 500

Posted by Brian Pane <bp...@pacbell.net>.
Cliff Woolley wrote:
[...]

>The bad news is that it's apparently not an suexec problem... I just tried
>it on my machine against /cgi-bin/printenv and got a 500.  :-(  All CGIs
>are apparently broken.
>
I'm seeing the same error.  Interestingly, the pathname passed to execve
is just the filename ("printenv" in this case) rather than the absolute 
path;
thus the exec fails.

--Brian