You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Manoj Kasichainula <ma...@io.com> on 1999/04/22 08:50:26 UTC

Possible proxy bug in hybrid server

While writing a patch to get rid of multithread.[ch] from the hybrid
server, I noticed this:

proxy_util.c:836

    static APACHE_TLS struct hostent hpbuf;
    static APACHE_TLS u_long ipaddr;
    static APACHE_TLS char *charpbuf[2];

For 1.3, on Unix, APACHE_TLS is #defined to nothing. On Windows, it
uses "__declspec(thread)". I guess this was a fix to get around thread
unsafeness in the proxy on NT. But why do these need to be static at
all?

We can save the effort of abstracting out thread-local storage for
APR if we get rid of these statics.

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/
"We can't protect the idiot." - David Vance of Glaxo Wellcome

Re: Possible proxy bug in hybrid server

Posted by David Whitmarsh <da...@dial.pipex.com>.
On Thu, 22 Apr 1999 02:50:26 -0400, you wrote:

>proxy_util.c:836
>
>    static APACHE_TLS struct hostent hpbuf;
>    static APACHE_TLS u_long ipaddr;
>    static APACHE_TLS char *charpbuf[2];
>
>For 1.3, on Unix, APACHE_TLS is #defined to nothing. On Windows, it
>uses "__declspec(thread)". I guess this was a fix to get around thread
>unsafeness in the proxy on NT. But why do these need to be static at
>all?

An anyway, it doesn't work on Win95. This is the cause of the failure
to load dynamically ApacheModuleProxy.dll

************************************

David Whitmarsh

Sparkle Computer Co Ltd

Sybase C C++ perl UNIX NT

************************************

Re: Possible proxy bug in hybrid server

Posted by Graham Leggett <mi...@sharp.fm>.
David Whitmarsh wrote:

> Me too. I'm adding some facilities to allow the cache to be used
> off-line, and a fix for the non-functioning windows garbage
> collection.

I am also interested in looking at a shared memory cache, so that
current problem of an object only becoming available in the cache when
it's finished it's download is solved. I have seen references to a
shared memory library for Apache modules to use - any pointers?

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight...

Re: Possible proxy bug in hybrid server

Posted by Dean Gaudet <dg...@arctic.org>.

On Sat, 24 Apr 1999, David Whitmarsh wrote:

> On Thu, 22 Apr 1999 10:10:58 +0200, you wrote:
> 
> >
> >I have found a few bugs, and a few problems with misleading error
> >messages that I want to fix.
> >
> >I just need to know if I should coordinate it with anyone?
> 
> Me too. I'm adding some facilities to allow the cache to be used
> off-line, and a fix for the non-functioning windows garbage
> collection.
> 
> How does one get patches placed in the contributed patches area?

In many senses the best thing to do with bug fixes is post here with a
subject "[PATCH] blah blah blah"... and lots of extra brownie points for a
"complete" patch which:

- is in "diff -u" or "diff -c" form
- includes a src/CHANGES update
- includes a list of PRs which are related/should be closed
- includes any documentation updates appropriate
- is against a recent CVS snapshot
- includes a brief discussion of the bug and how you fixed it
- considers portability issues (if appropriate)

If you include all that you make life easier on those of us with commit
privs...

Dean



Re: Possible proxy bug in hybrid server

Posted by David Whitmarsh <da...@dial.pipex.com>.
On Thu, 22 Apr 1999 10:10:58 +0200, you wrote:

>
>I have found a few bugs, and a few problems with misleading error
>messages that I want to fix.
>
>I just need to know if I should coordinate it with anyone?

Me too. I'm adding some facilities to allow the cache to be used
off-line, and a fix for the non-functioning windows garbage
collection.

How does one get patches placed in the contributed patches area?


David

************************************

David Whitmarsh

Sparkle Computer Co Ltd

Sybase C C++ perl UNIX NT

************************************

Re: Possible proxy bug in hybrid server

Posted by Graham Leggett <mi...@sharp.fm>.
Manoj Kasichainula wrote:

> proxy_util.c:836

Do you know who is doing development on the proxy module?

I have found a few bugs, and a few problems with misleading error
messages that I want to fix.

I just need to know if I should coordinate it with anyone?

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight...

Re: Possible proxy bug in hybrid server

Posted by Ryan Bloom <rb...@raleigh.ibm.com>.
I haven't looked at this code, but just by looking at the variable types
and names, I think this stuff can be removed from thread local storage in
apr regardless of what we do with the staticness of these variables.
Becuase apr will be responsible for creating the connection, the hostent
will most likely disappear into the apr call, and it will not be needed in
the Apache code.

The same goes for the ipaddr variable.

I would need to investigate the charpbuf to determine what it is being
used for.

Personally, I would ignore multithread.[ch] for now.  Let's finish apr and
see what code that lets us get rid of before we start ripping other stuff
out.

All MHO of course.

Ryan

On Thu, 22 Apr 1999, Manoj Kasichainula wrote:

> While writing a patch to get rid of multithread.[ch] from the hybrid
> server, I noticed this:
> 
> proxy_util.c:836
> 
>     static APACHE_TLS struct hostent hpbuf;
>     static APACHE_TLS u_long ipaddr;
>     static APACHE_TLS char *charpbuf[2];
> 
> For 1.3, on Unix, APACHE_TLS is #defined to nothing. On Windows, it
> uses "__declspec(thread)". I guess this was a fix to get around thread
> unsafeness in the proxy on NT. But why do these need to be static at
> all?
> 
> We can save the effort of abstracting out thread-local storage for
> APR if we get rid of these statics.
> 
> -- 
> Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/
> "We can't protect the idiot." - David Vance of Glaxo Wellcome
> 

_______________________________________________________________________
Ryan Bloom		rbb@raleigh.ibm.com
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.