You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Glenn Nielsen <gl...@mail.more.net> on 2003/07/18 16:32:39 UTC

mod_jk 1.2.5 test source distribution

I have generated another mod_jk 1.2.5 test source distribution,
it can be found at:

http://cvs.apache.org/~glenn/jakarta-tomcat-connectors-jk-1.2.5-src.tar.gz

Please build and test binaries for different OS and web servers.

I will call for a release vote for mod_jk 1.2.5 one week from today.
Then do the release Monday July 28 if the vote to release succeeds.

Does that schedule work for everyone?

Thanks,

Glenn


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk 1.2.5 test source distribution

Posted by Glenn Nielsen <gl...@mail.more.net>.
Henri Gomez wrote:
> Henri Gomez a écrit :
> 
>>
>>>>> So the idea will be to use APR implementation when we detect that 
>>>>> APR is available (configure should be updated accordingly).
>>>>>
>>>>> And under Apache 2.0, APR is allways available !
>>>>>
>>>>> Apache 1.3 use fork mode under Unix, so no thread problem.
>>>>>
>>>>> For Windows I wonder what happen, may be the implementation is safe ?
>>>>>
>>>>> BTW, using APR will remove the #idef AS400 ;)
>>>>>
>>>>
>>>>
>>>> Ahh, yeah, that should work.
>>>>
>>>> Your idea, do you want to implement it?
>>>
>>>
>>>
>>>
>>> I'll do it this night :)
>>>
>>>> I can test it once you have made your commits.
>>>
>>>
>>>
>>>
>>> No problem, stay tuned
>>
>>
>>
>> Some works should be conducted since apr use many apr_ types.
>>
>> The candidate is of course apr_sockaddr_info_get...
> 
> 
> 
> Code commited, thanks to test it but I've got no problem with it under
> my Linux box
> 

I have tested this on both Solaris 7 & 8 with apache 2.  The 4 CPU box on
which it had failed now works.

Thanks Henri.





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk 1.2.5 test source distribution

Posted by Henri Gomez <hg...@apache.org>.
Henri Gomez a écrit :
> 
>>>> So the idea will be to use APR implementation when we detect that 
>>>> APR is available (configure should be updated accordingly).
>>>>
>>>> And under Apache 2.0, APR is allways available !
>>>>
>>>> Apache 1.3 use fork mode under Unix, so no thread problem.
>>>>
>>>> For Windows I wonder what happen, may be the implementation is safe ?
>>>>
>>>> BTW, using APR will remove the #idef AS400 ;)
>>>>
>>>
>>>
>>> Ahh, yeah, that should work.
>>>
>>> Your idea, do you want to implement it?
>>
>>
>>
>> I'll do it this night :)
>>
>>> I can test it once you have made your commits.
>>
>>
>>
>> No problem, stay tuned
> 
> 
> Some works should be conducted since apr use many apr_ types.
> 
> The candidate is of course apr_sockaddr_info_get...


Code commited, thanks to test it but I've got no problem with it under
my Linux box


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk 1.2.5 test source distribution

Posted by Henri Gomez <hg...@apache.org>.
>>> So the idea will be to use APR implementation when we detect that APR 
>>> is available (configure should be updated accordingly).
>>>
>>> And under Apache 2.0, APR is allways available !
>>>
>>> Apache 1.3 use fork mode under Unix, so no thread problem.
>>>
>>> For Windows I wonder what happen, may be the implementation is safe ?
>>>
>>> BTW, using APR will remove the #idef AS400 ;)
>>>
>>
>>
>> Ahh, yeah, that should work.
>>
>> Your idea, do you want to implement it?
> 
> 
> I'll do it this night :)
> 
>> I can test it once you have made your commits.
> 
> 
> No problem, stay tuned

Some works should be conducted since apr use many apr_ types.

The candidate is of course apr_sockaddr_info_get...




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk 1.2.5 test source distribution

Posted by Henri Gomez <hg...@apache.org>.
Glenn Nielsen a écrit :

> Henri Gomez wrote:
> 
>>> When you build mod_jk for apache 2 _REENTRANT will be defined if
>>> it is needed by apache.  A simple #ifdef will work. I already did 
>>> this but when I tested it caused other problems.
>>> I haven't had a chance yet to go back and fully test and debug
>>> this change.  I'll get to it this week.
>>
>>
>>
>>>> Or maybe we should delegate it to APR if we detect
>>>> it in build :
>>>>
>>>> find_adresses seems a good candidate and when you
>>>> see all the OS case it handle, it's better use APR
>>>> in such case isn't it ?
>>>
>>>
>>>
>>>
>>> We don't use APR anywhere in mod_jk 1.2 except inside
>>> the apache 2 mod_jk.c.  No reason to require APR for
>>> all OS/servers for just this one thing.
>>
>>
>>
>> I understand but gethostbyname_r need many tweaking (from
>> what I could see in apr sockaddr.c) :
>>
>> Note the check for AIX/HPUP/DUX/LINUX/GLIBC2/SOLARIS/IRIX....
>> ....
>>
>> #if defined(GETHOSTBYNAME_R_HOSTENT_DATA)
>>         /* AIX, HP/UX, D/UX et alia */
>>         gethostbyname_r(hostname, &hs, &hd);
>>         hp = &hs;
>> #else
>> #if defined(GETHOSTBYNAME_R_GLIBC2)
>>         /* Linux glibc2+ */
>>         gethostbyname_r(hostname, &hs, tmp, GETHOSTBYNAME_BUFLEN - 1,
>>                         &hp, &hosterror);
>> #else
>>         /* Solaris, Irix et alia */
>>         hp = gethostbyname_r(hostname, &hs, tmp, GETHOSTBYNAME_BUFLEN 
>> - 1,
>>                              &hosterror);
>> #endif /* !defined(GETHOSTBYNAME_R_GLIBC2) */
>>         if (!hp) {
>>             return (hosterror + APR_OS_START_SYSERR);
>>         }
>> #endif /* !defined(GETHOSTBYNAME_R_HOSTENT_DATA) */
>> #else
>>         hp = gethostbyname(hostname);
>> #endif
>>
>> ....
>>
>>
>> So the idea will be to use APR implementation when we detect that APR 
>> is available (configure should be updated accordingly).
>>
>> And under Apache 2.0, APR is allways available !
>>
>> Apache 1.3 use fork mode under Unix, so no thread problem.
>>
>> For Windows I wonder what happen, may be the implementation is safe ?
>>
>> BTW, using APR will remove the #idef AS400 ;)
>>
> 
> 
> Ahh, yeah, that should work.
> 
> Your idea, do you want to implement it?

I'll do it this night :)

> I can test it once you have made your commits.

No problem, stay tuned


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk 1.2.5 test source distribution

Posted by Glenn Nielsen <gl...@mail.more.net>.
Henri Gomez wrote:
>> When you build mod_jk for apache 2 _REENTRANT will be defined if
>> it is needed by apache.  A simple #ifdef will work. I already did this 
>> but when I tested it caused other problems.
>> I haven't had a chance yet to go back and fully test and debug
>> this change.  I'll get to it this week.
> 
> 
>>> Or maybe we should delegate it to APR if we detect
>>> it in build :
>>>
>>> find_adresses seems a good candidate and when you
>>> see all the OS case it handle, it's better use APR
>>> in such case isn't it ?
>>
>>
>>
>> We don't use APR anywhere in mod_jk 1.2 except inside
>> the apache 2 mod_jk.c.  No reason to require APR for
>> all OS/servers for just this one thing.
> 
> 
> I understand but gethostbyname_r need many tweaking (from
> what I could see in apr sockaddr.c) :
> 
> Note the check for AIX/HPUP/DUX/LINUX/GLIBC2/SOLARIS/IRIX....
> ....
> 
> #if defined(GETHOSTBYNAME_R_HOSTENT_DATA)
>         /* AIX, HP/UX, D/UX et alia */
>         gethostbyname_r(hostname, &hs, &hd);
>         hp = &hs;
> #else
> #if defined(GETHOSTBYNAME_R_GLIBC2)
>         /* Linux glibc2+ */
>         gethostbyname_r(hostname, &hs, tmp, GETHOSTBYNAME_BUFLEN - 1,
>                         &hp, &hosterror);
> #else
>         /* Solaris, Irix et alia */
>         hp = gethostbyname_r(hostname, &hs, tmp, GETHOSTBYNAME_BUFLEN - 1,
>                              &hosterror);
> #endif /* !defined(GETHOSTBYNAME_R_GLIBC2) */
>         if (!hp) {
>             return (hosterror + APR_OS_START_SYSERR);
>         }
> #endif /* !defined(GETHOSTBYNAME_R_HOSTENT_DATA) */
> #else
>         hp = gethostbyname(hostname);
> #endif
> 
> ....
> 
> 
> So the idea will be to use APR implementation when we detect that APR is 
> available (configure should be updated accordingly).
> 
> And under Apache 2.0, APR is allways available !
> 
> Apache 1.3 use fork mode under Unix, so no thread problem.
> 
> For Windows I wonder what happen, may be the implementation is safe ?
> 
> BTW, using APR will remove the #idef AS400 ;)
> 


Ahh, yeah, that should work.

Your idea, do you want to implement it?

I can test it once you have made your commits.

Regards,

Glenn


----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk 1.2.5 test source distribution

Posted by Henri Gomez <hg...@apache.org>.
> When you build mod_jk for apache 2 _REENTRANT will be defined if
> it is needed by apache.  A simple #ifdef will work. 
> I already did this but when I tested it caused other problems.
> I haven't had a chance yet to go back and fully test and debug
> this change.  I'll get to it this week.

>> Or maybe we should delegate it to APR if we detect
>> it in build :
>>
>> find_adresses seems a good candidate and when you
>> see all the OS case it handle, it's better use APR
>> in such case isn't it ?
> 
> 
> We don't use APR anywhere in mod_jk 1.2 except inside
> the apache 2 mod_jk.c.  No reason to require APR for
> all OS/servers for just this one thing.

I understand but gethostbyname_r need many tweaking (from
what I could see in apr sockaddr.c) :

Note the check for AIX/HPUP/DUX/LINUX/GLIBC2/SOLARIS/IRIX....
....

#if defined(GETHOSTBYNAME_R_HOSTENT_DATA)
         /* AIX, HP/UX, D/UX et alia */
         gethostbyname_r(hostname, &hs, &hd);
         hp = &hs;
#else
#if defined(GETHOSTBYNAME_R_GLIBC2)
         /* Linux glibc2+ */
         gethostbyname_r(hostname, &hs, tmp, GETHOSTBYNAME_BUFLEN - 1,
                         &hp, &hosterror);
#else
         /* Solaris, Irix et alia */
         hp = gethostbyname_r(hostname, &hs, tmp, GETHOSTBYNAME_BUFLEN - 1,
                              &hosterror);
#endif /* !defined(GETHOSTBYNAME_R_GLIBC2) */
         if (!hp) {
             return (hosterror + APR_OS_START_SYSERR);
         }
#endif /* !defined(GETHOSTBYNAME_R_HOSTENT_DATA) */
#else
         hp = gethostbyname(hostname);
#endif

....


So the idea will be to use APR implementation when we detect that APR is 
available (configure should be updated accordingly).

And under Apache 2.0, APR is allways available !

Apache 1.3 use fork mode under Unix, so no thread problem.

For Windows I wonder what happen, may be the implementation is safe ?

BTW, using APR will remove the #idef AS400 ;)










---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk 1.2.5 test source distribution

Posted by Glenn Nielsen <gl...@mail.more.net>.
Henri Gomez wrote:
> Glenn Nielsen a écrit :
> 
>> It isn't quite that easy.  On Solaris the args for
>> gethostbyname_r are different than on the AS400.
>>
> 
> Arg, you're right, same thing on Linux ....
> 
> may be the configure task should get some discover
> code from apr (cf apr_network.m4 from APR).
> 

When you build mod_jk for apache 2 _REENTRANT will be defined if
it is needed by apache.  A simple #ifdef will work.  

I already did this but when I tested it caused other problems.
I haven't had a chance yet to go back and fully test and debug
this change.  I'll get to it this week.

> Or maybe we should delegate it to APR if we detect
> it in build :
> 
> find_adresses seems a good candidate and when you
> see all the OS case it handle, it's better use APR
> in such case isn't it ?

We don't use APR anywhere in mod_jk 1.2 except inside
the apache 2 mod_jk.c.  No reason to require APR for
all OS/servers for just this one thing.

Glenn





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk 1.2.5 test source distribution

Posted by Henri Gomez <hg...@apache.org>.
Glenn Nielsen a écrit :

> It isn't quite that easy.  On Solaris the args for
> gethostbyname_r are different than on the AS400.
> 

Arg, you're right, same thing on Linux ....

may be the configure task should get some discover
code from apr (cf apr_network.m4 from APR).

Or maybe we should delegate it to APR if we detect
it in build :

find_adresses seems a good candidate and when you
see all the OS case it handle, it's better use APR
in such case isn't it ?




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk 1.2.5 test source distribution

Posted by Glenn Nielsen <gl...@mail.more.net>.
It isn't quite that easy.  On Solaris the args for
gethostbyname_r are different than on the AS400.

I'll get it patched in the next day or so.

Glenn

Henri Gomez wrote:
> Glenn Nielsen a écrit :
> 
>> I have found another thread safe bug when running mod_jk 1.2 with 
>> Apache 2 and the worker
>> (threaded) MPM.  This one is due to not using the reentrant version of 
>> gethostbyname().
>> I have only seen the problem on multiple CPU Sun servers.
>>
>> I will be working on fixing this and will rebuild the test release 
>> once I have it
>> committed.
> 
> 
> 
> Hum, it seems there is patch for this provided by IBM Rochester team
> via #ifdef AS400 :
> 
> In jk_connect.c :
> 
> #ifdef AS400
>        /* If we found also characters we use gethostbyname_r()*/
>        struct hostent hostentry;
>        struct hostent *hoste = &hostentry;
>        struct hostent_data hd;
>        memset( &hd, 0, sizeof(struct hostent_data) );
>        if ( (gethostbyname_r( host, hoste, &hd )) != 0 ) {
>         return JK_FALSE;
>        }
> #else /* If we found also characters we use gethostbyname()*/
>       /* XXX : WARNING : We should really use gethostbyname_r in 
> multi-threaded env       */
>       /* take a look at APR which handle gethostbyname in 
> apr/network_io/unix/sa_common.c */
>         struct hostent *hoste = gethostbyname(host);
>         if(!hoste) {
>             return JK_FALSE;
>         }
> #endif
> 
> 
> Just replace #ifdef AS400 by _D_REENTRANT ?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> 


-- 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk 1.2.5 test source distribution

Posted by Henri Gomez <hg...@apache.org>.
Glenn Nielsen a écrit :
> I have found another thread safe bug when running mod_jk 1.2 with Apache 
> 2 and the worker
> (threaded) MPM.  This one is due to not using the reentrant version of 
> gethostbyname().
> I have only seen the problem on multiple CPU Sun servers.
> 
> I will be working on fixing this and will rebuild the test release once 
> I have it
> committed.


Hum, it seems there is patch for this provided by IBM Rochester team
via #ifdef AS400 :

In jk_connect.c :

#ifdef AS400
        /* If we found also characters we use gethostbyname_r()*/
        struct hostent hostentry;
        struct hostent *hoste = &hostentry;
        struct hostent_data hd;
        memset( &hd, 0, sizeof(struct hostent_data) );
        if ( (gethostbyname_r( host, hoste, &hd )) != 0 ) {
         return JK_FALSE;
        }
#else /* If we found also characters we use gethostbyname()*/
       /* XXX : WARNING : We should really use gethostbyname_r in 
multi-threaded env       */
       /* take a look at APR which handle gethostbyname in 
apr/network_io/unix/sa_common.c */
         struct hostent *hoste = gethostbyname(host);
         if(!hoste) {
             return JK_FALSE;
         }
#endif


Just replace #ifdef AS400 by _D_REENTRANT ?


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk 1.2.5 test source distribution

Posted by Glenn Nielsen <gl...@mail.more.net>.
I have found another thread safe bug when running mod_jk 1.2 with Apache 2 and the worker
(threaded) MPM.  This one is due to not using the reentrant version of gethostbyname().
I have only seen the problem on multiple CPU Sun servers.

I will be working on fixing this and will rebuild the test release once I have it
committed.

Regards,

Glenn

Henri Gomez wrote:
> Glenn Nielsen a écrit :
> 
>> I have generated another mod_jk 1.2.5 test source distribution,
>> it can be found at:
>>
>> http://cvs.apache.org/~glenn/jakarta-tomcat-connectors-jk-1.2.5-src.tar.gz 
>>
>>
>> Please build and test binaries for different OS and web servers.
>>
>> I will call for a release vote for mod_jk 1.2.5 one week from today.
>> Then do the release Monday July 28 if the vote to release succeeds.
>>
>> Does that schedule work for everyone?
> 
> 
> 
> That's ok for me.
> 
> It works for me on Redhat 7.2 + Apache 2.0.47 and Redhat 8.0 + Apache 
> 2.0.40 (+ updates from Redhat).
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk 1.2.5 test source distribution

Posted by Henri Gomez <hg...@apache.org>.
Glenn Nielsen a écrit :

> I have generated another mod_jk 1.2.5 test source distribution,
> it can be found at:
> 
> http://cvs.apache.org/~glenn/jakarta-tomcat-connectors-jk-1.2.5-src.tar.gz
> 
> Please build and test binaries for different OS and web servers.
> 
> I will call for a release vote for mod_jk 1.2.5 one week from today.
> Then do the release Monday July 28 if the vote to release succeeds.
> 
> Does that schedule work for everyone?


That's ok for me.

It works for me on Redhat 7.2 + Apache 2.0.47 and Redhat 8.0 + Apache 
2.0.40 (+ updates from Redhat).




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org