You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Gregory Shimansky <gs...@gmail.com> on 2006/11/23 01:46:48 UTC

Re: [drlvm] APR latest release is 1.2.7, we're using 1.2.6. Should we switch?

Geir Magnusson Jr. wrote:
> 
> 
> Gregory Shimansky wrote:
>> Hello
>>
>> Today I've found a bug (HARMONY-2271) which lead down to APR 
>> implementation of getenv function on windows. I've looked at the APR 
>> page and found that there is a new release 1.2.7. In drlvm we still 
>> use 1.2.6.
>>
>> While the bug which I've found was apparently fixed after 1.2.7 was 
>> released, we still some more patches (1 replaced file on linux, 3 on 
>> windows) for APR in drlvm, some of the patches may be redundant now.
>>
>> Also some bugs which we still didn't find could be fixed. I know, some 
>> may be added too :). But I prefer to be optimistic. We could at least 
>> try to test APR 1.2.7 and remove patches which are no longer needed or 
>> even outdated.
> 
> That sounds like a good plan.  Have we ever tried to offer our patches 
> to APR to get them in main releases?

I've compared the files which we have patched in APR with what APR-1.2.7 
has. The changes except for env.c which I've committed today are all in 
threading. A lot of things are different in 
include/arch/win32/apr_arch_thread_cond.h and locks/win32/thread_cond.c.

I don't know how really correct they are (they could be a source for 
threading bugs in drlvm too). I wouldn't try to submit this code without 
strong understanding about what is changing and why.

On linux just one line is different from APR-1.2.7. I don't know which 
issue caused this patch, and why apr_thread_yield apparently does 
nothing on Linux on original APR-1.2.7.

-- 
Gregory


Re: [drlvm] APR latest release is 1.2.7, we're using 1.2.6. Should we switch?

Posted by Weldon Washburn <we...@gmail.com>.
On 11/30/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>
>
>
> Salikh Zakirov wrote:
> > Weldon Washburn wrote:
> >> After reading an excellent survey (
> >> http://www.cs.wustl.edu/~schmidt/win32-cv-1.html)on implementing
> >> posix-style
> >> condition variables on windowsxp,  its not clear that being dependent
> on
> >> any
> >> external posix-to-win32 wrapper is acceptable for Harmony.  If this
> >> paper is
> >> correct, it looks rather tricky to correctly implement condition
> variables
> >> on windows.  My take on the whole subject is that Harmony needs to fix
> >> and/or morph some "condition variable on win32" thingy.  Its OK if the
> >> "thingy" happens to be APR.  But I would not let APR slow Harmony
> down.  To
> >> do condition variables per the paper, the APR code base may change a
> bunch.
> >> Its unclear if the APR crowd will want to incorporate such mods.  I
> lean
> >> towards dumping APR.
> >
> > ... or just stop pretending we are using apr_thread_cond_t, while in
> fact
> > we are using completely different implementation.
> >
> > I think that patched (rewritten) thread_cond.c can easily be ported
> > to implement hycond_t directly (besides, currently hycond_t is #defined
> to be
> > apr_thread_cond_t).
> >
> > We do not need to get orthodox about "use APR" or "dump APR",
> > but instead just use what we need, and do not use what is not suitable.


That's exactly right.  The corollary is that there need be no discussion
about moving to latest APR release (the title of the email chain).  Whoever
maintains this part of threading can take from APR what they think is
appropriate w/o asking dev list.  No discussion about what to do w/ mods to
APR.  Let the APR folks take the mods from Harmony if they are motivated to
do so.


+1
>
> If we've patched the standard impl of apr_thread_cond_t into oblivion,
> lets just be honest and use our own method.
>
> (I'm more than happy if we wean ourselves off of the dogmatic use of
> APR, and just use what makes sense for *us*)
>
> geir
>



-- 
Weldon Washburn
Intel Enterprise Solutions Software Division

Re: [drlvm] APR latest release is 1.2.7, we're using 1.2.6. Should we switch?

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Salikh Zakirov wrote:
> Weldon Washburn wrote:
>> After reading an excellent survey (
>> http://www.cs.wustl.edu/~schmidt/win32-cv-1.html)on implementing
>> posix-style
>> condition variables on windowsxp,  its not clear that being dependent on
>> any
>> external posix-to-win32 wrapper is acceptable for Harmony.  If this
>> paper is
>> correct, it looks rather tricky to correctly implement condition variables
>> on windows.  My take on the whole subject is that Harmony needs to fix
>> and/or morph some "condition variable on win32" thingy.  Its OK if the
>> "thingy" happens to be APR.  But I would not let APR slow Harmony down.  To
>> do condition variables per the paper, the APR code base may change a bunch.
>> Its unclear if the APR crowd will want to incorporate such mods.  I lean
>> towards dumping APR.
> 
> ... or just stop pretending we are using apr_thread_cond_t, while in fact
> we are using completely different implementation.
> 
> I think that patched (rewritten) thread_cond.c can easily be ported
> to implement hycond_t directly (besides, currently hycond_t is #defined to be
> apr_thread_cond_t).
> 
> We do not need to get orthodox about "use APR" or "dump APR",
> but instead just use what we need, and do not use what is not suitable.

+1

If we've patched the standard impl of apr_thread_cond_t into oblivion, 
lets just be honest and use our own method.

(I'm more than happy if we wean ourselves off of the dogmatic use of 
APR, and just use what makes sense for *us*)

geir

Re: [drlvm] APR latest release is 1.2.7, we're using 1.2.6. Should we switch?

Posted by Salikh Zakirov <Sa...@Intel.com>.
Weldon Washburn wrote:
> After reading an excellent survey (
> http://www.cs.wustl.edu/~schmidt/win32-cv-1.html)on implementing
> posix-style
> condition variables on windowsxp,  its not clear that being dependent on
> any
> external posix-to-win32 wrapper is acceptable for Harmony.  If this
> paper is
> correct, it looks rather tricky to correctly implement condition variables
> on windows.  My take on the whole subject is that Harmony needs to fix
> and/or morph some "condition variable on win32" thingy.  Its OK if the
> "thingy" happens to be APR.  But I would not let APR slow Harmony down.  To
> do condition variables per the paper, the APR code base may change a bunch.
> Its unclear if the APR crowd will want to incorporate such mods.  I lean
> towards dumping APR.

... or just stop pretending we are using apr_thread_cond_t, while in fact
we are using completely different implementation.

I think that patched (rewritten) thread_cond.c can easily be ported
to implement hycond_t directly (besides, currently hycond_t is #defined to be
apr_thread_cond_t).

We do not need to get orthodox about "use APR" or "dump APR",
but instead just use what we need, and do not use what is not suitable.


Re: [drlvm] APR latest release is 1.2.7, we're using 1.2.6. Should we switch?

Posted by Weldon Washburn <we...@gmail.com>.
After reading an excellent survey (
http://www.cs.wustl.edu/~schmidt/win32-cv-1.html)on implementing posix-style
condition variables on windowsxp,  its not clear that being dependent on any
external posix-to-win32 wrapper is acceptable for Harmony.  If this paper is
correct, it looks rather tricky to correctly implement condition variables
on windows.  My take on the whole subject is that Harmony needs to fix
and/or morph some "condition variable on win32" thingy.  Its OK if the
"thingy" happens to be APR.  But I would not let APR slow Harmony down.  To
do condition variables per the paper, the APR code base may change a bunch.
Its unclear if the APR crowd will want to incorporate such mods.  I lean
towards dumping APR.



On 11/29/06, Rana Dasgupta <rd...@gmail.com> wrote:
>
> On 11/23/06, Alexey Varlamov <al...@gmail.com> wrote:
> >
> >
> > >Gregory, the locks/win32/thread_cond.c was fixed in HARMONY-1519 on 4
> > >Oct. The current patch is definitely more correct than the official
> > >version (apparently based on the previous patch). Don't know who
> > >submitted old patched to APR - Artem Aliev? At least he might have
> > >more complete clue...
>
>
> 1519 was a good fix for conditional variable emulation on Windows and I
> think was worth submitting back to the apr project. But once we have
> started
> making this type of changes, it is harder to upgrade to newer versions
> directly. Testing 1.2.7 is a good idea, they would have more bug fixes. If
> good, we could consider moving to 1.2.7 and reapplying our few patches.
> On Linux, APR seems to just delegate to the POSIX api's and works well,
> but
> I think we will discover more fixes on Windows. So we will have to
> conscientiously keep submitting back ( and hope that they make it ) or
> move
> away from apr. As such, I don't think that apr is adding a lot of value.
>
>


-- 
Weldon Washburn
Intel Enterprise Solutions Software Division

Re: [drlvm] APR latest release is 1.2.7, we're using 1.2.6. Should we switch?

Posted by Rana Dasgupta <rd...@gmail.com>.
On 11/23/06, Alexey Varlamov <al...@gmail.com> wrote:
>
>
> >Gregory, the locks/win32/thread_cond.c was fixed in HARMONY-1519 on 4
> >Oct. The current patch is definitely more correct than the official
> >version (apparently based on the previous patch). Don't know who
> >submitted old patched to APR - Artem Aliev? At least he might have
> >more complete clue...


1519 was a good fix for conditional variable emulation on Windows and I
think was worth submitting back to the apr project. But once we have started
making this type of changes, it is harder to upgrade to newer versions
directly. Testing 1.2.7 is a good idea, they would have more bug fixes. If
good, we could consider moving to 1.2.7 and reapplying our few patches.
On Linux, APR seems to just delegate to the POSIX api's and works well, but
I think we will discover more fixes on Windows. So we will have to
conscientiously keep submitting back ( and hope that they make it ) or move
away from apr. As such, I don't think that apr is adding a lot of value.

Re: [drlvm] APR latest release is 1.2.7, we're using 1.2.6. Should we switch?

Posted by Alexey Varlamov <al...@gmail.com>.
2006/11/23, Gregory Shimansky <gs...@gmail.com>:
> Geir Magnusson Jr. wrote:
> >
> >
> > Gregory Shimansky wrote:
> >> Hello
> >>
> >> Today I've found a bug (HARMONY-2271) which lead down to APR
> >> implementation of getenv function on windows. I've looked at the APR
> >> page and found that there is a new release 1.2.7. In drlvm we still
> >> use 1.2.6.
> >>
> >> While the bug which I've found was apparently fixed after 1.2.7 was
> >> released, we still some more patches (1 replaced file on linux, 3 on
> >> windows) for APR in drlvm, some of the patches may be redundant now.
> >>
> >> Also some bugs which we still didn't find could be fixed. I know, some
> >> may be added too :). But I prefer to be optimistic. We could at least
> >> try to test APR 1.2.7 and remove patches which are no longer needed or
> >> even outdated.
> >
> > That sounds like a good plan.  Have we ever tried to offer our patches
> > to APR to get them in main releases?
>
> I've compared the files which we have patched in APR with what APR-1.2.7
> has. The changes except for env.c which I've committed today are all in
> threading. A lot of things are different in
> include/arch/win32/apr_arch_thread_cond.h and locks/win32/thread_cond.c.

Gregory, the locks/win32/thread_cond.c was fixed in HARMONY-1519 on 4
Oct. The current patch is definitely more correct than the official
version (apparently based on the previous patch). Don't know who
submitted old patched to APR - Artem Aliev? At least he might have
more complete clue...

--
Alexey


>
> I don't know how really correct they are (they could be a source for
> threading bugs in drlvm too). I wouldn't try to submit this code without
> strong understanding about what is changing and why.
>
> On linux just one line is different from APR-1.2.7. I don't know which
> issue caused this patch, and why apr_thread_yield apparently does
> nothing on Linux on original APR-1.2.7.
>
> --
> Gregory
>
>