RE: [picocontainer-dev] Commit 5799 Race Condition Fix....
"Michael Rimov" <[email protected]> Mon, 7 Nov 2011 18:07:32 -0800
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Organization | Centerline Computers, Inc. |
| Message-ID | <[email protected]> |
------=_NextPart_000_0079_01CC9D78.1EEF7E30
Content-Type: text/plain;
charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Oh that=E2=80=99s good, I remember when even volatile wasn=E2=80=99t =
enough and you had to synchronize the whole method=E2=80=A6. I =
don=E2=80=99t miss the days of JDK 1.0 (rofl)
=20
However, the variable =E2=80=98initialized=E2=80=99 wasn=E2=80=99t =
declared as volatile, so I=E2=80=99ve done it and checked it in=E2=80=A6 =
as I patch pico 3 I=E2=80=99ll go over it and see if there=E2=80=99s =
more items like that and I=E2=80=99ll get that fixed.
=20
Paul: Sorry I had the name wrong, it=E2=80=99s =E2=80=98double-checked =
locking=E2=80=99, not =E2=80=98double-lock checking=E2=80=99 Anyway, if =
you aren=E2=80=99t familiar with it, Wikipedia=E2=80=99s writeup =
isn=E2=80=99t too shabby:
http://en.wikipedia.org/wiki/Double-checked_locking
=20
When I=E2=80=99m done going through the code, I=E2=80=99ll let you guys =
know so you can release a 2.14.1 if we don=E2=80=99t get other things =
fixed when I=E2=80=99m done.
=20
=
=
-Mike
=20
=20
From: peter royal [mailto:[email protected]]=20
Sent: Monday, November 07, 2011 5:42 PM
To: dev-qxt/[email protected]
Subject: Re: [picocontainer-dev] Commit 5799 Race Condition Fix....
=20
it's safe in modern vms as long as injectionMembers is declared volatile
=20
-pete
--=20
(peter.royal|osi)@pobox.com - http://fotap.org/~osi
On Nov 7, 2011, at 7:31 PM, Paul Hammant <[email protected]> wrote:
I eliminated the situation I was getting in a production deployment. =
I'm not sure what you mean Mike.
=20
-ph
On Mon, Nov 7, 2011 at 6:43 PM, Michael Rimov <[email protected]> =
wrote:
Paul,
I was looking @ the diffs.... and this code in Iterative adapter:
if (injectionMembers =3D=3D null) {
synchronized (this) {
if (injectionMembers =3D=3D null) {
initializeInjectionMembersAndTypeLists();
}
}
}
Isn't that double-check locking and not really solving the race =
condition?
Or is Boolean assignment exempt from this kind of situation?
-Mike
-----Original Message-----
From: Paul Hammant [mailto:[email protected]]
Sent: Monday, November 07, 2011 11:53 AM
To: dev-qxt/[email protected]
Subject: Re: [picocontainer-dev] Release of Pico 2.14
My bad - I've only just done the nexus 'approval'. Give it four hours =
or
so. Meanwhile build from source :
=
http://svn.codehaus.org/picocontainer/java/2.x/tags/picocontainer-2.14/
mvn clean install -DskipTests -Preporting
On Mon, Nov 7, 2011 at 1:28 PM, Simon Brandhof =
<[email protected]>
wrote:
> Hi Paul,
>
> Will this release be deployed in Maven repository ?
>
> Thanks
>
>
> On 7 November 2011 19:04, Paul Hammant <[email protected]> wrote:
>>
>> Hey Mike. The answer is I'm not sure. It's pretty up to date - go
>> for it: The stuff that's in the latest release isn't in 3.x / Git
>> yet.
>>
>> - Paul
>>
>> On Mon, Nov 7, 2011 at 10:38 AM, Michael Rimov
>> <[email protected]>
>> wrote:
>> > Hey Paul,
>> >
>> > What is the last change you ported over to Pico 3?
>> >
>> > I'll be happy to manually port based on the diffs, but I wanted to
>> > make sure before I started that I wasn't duplicating efforts.
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
=20
------=_NextPart_000_0079_01CC9D78.1EEF7E30
Content-Type: text/html;
charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 14 (filtered =
medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=3Dwhite =
lang=3DEN-US link=3Dblue vlink=3Dpurple><div class=3DWordSection1><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Oh that=E2=80=99s good, I remember when even volatile wasn=E2=80=99t =
enough and you had to synchronize the whole method=E2=80=A6. I =
don=E2=80=99t miss the days of JDK 1.0 (rofl)<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>However, the variable =E2=80=98initialized=E2=80=99 wasn=E2=80=99t =
declared as volatile, so I=E2=80=99ve done it and checked it in=E2=80=A6 =
as I patch pico 3 I=E2=80=99ll go over it and see if there=E2=80=99s =
more items like that and I=E2=80=99ll get that =
fixed.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Paul:=C2=A0 Sorry I had the name wrong, it=E2=80=99s =
=E2=80=98double-checked locking=E2=80=99, not =E2=80=98double-lock =
checking=E2=80=99=C2=A0 Anyway, if you aren=E2=80=99t familiar with it, =
Wikipedia=E2=80=99s writeup isn=E2=80=99t too =
shabby:<o:p></o:p></span></p><p class=3DMsoNormal><a =
href=3D"http://en.wikipedia.org/wiki/Double-checked_locking">http://en.wi=
kipedia.org/wiki/Double-checked_locking</a><o:p></o:p></p><p =
class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>When I=E2=80=99m done going through the code, I=E2=80=99ll let you =
guys know so you can release a 2.14.1 if we don=E2=80=99t get other =
things fixed when I=E2=80=99m done.<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -Mike<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p> </o:p></span></p><div><div =
style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in =
0in 0in'><p class=3DMsoNormal><b><span =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span>=
</b><span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> =
peter royal [mailto:[email protected]] <br><b>Sent:</b> Monday, =
November 07, 2011 5:42 PM<br><b>To:</b> =
dev-qxt/[email protected]<br><b>Subject:</b> Re: =
[picocontainer-dev] Commit 5799 Race Condition =
Fix....<o:p></o:p></span></p></div></div><p =
class=3DMsoNormal><o:p> </o:p></p><div><p class=3DMsoNormal>it's =
safe in modern vms as long as injectionMembers is declared =
volatile<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p> </o:p></p></div><div><p =
class=3DMsoNormal>-pete<br><br>-- <o:p></o:p></p><div><p =
class=3DMsoNormal>(peter.royal|osi)@pobox.com - <a =
href=3D"http://fotap.org/~osi">http://fotap.org/~osi</a><o:p></o:p></p></=
div></div><div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><br>On Nov 7, 2011, at 7:31 PM, Paul =
Hammant <<a href=3D"mailto:[email protected]">[email protected]</a>> =
wrote:<o:p></o:p></p></div><blockquote =
style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><div><p =
class=3DMsoNormal>I eliminated the situation I was getting in a =
production deployment. I'm not sure what you mean =
Mike.<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p> </o:p></p></div><div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'>-ph<o:p></o:p></p><div><p =
class=3DMsoNormal>On Mon, Nov 7, 2011 at 6:43 PM, Michael Rimov <<a =
href=3D"mailto:[email protected]">[email protected]</a>> =
wrote:<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'>Paul,<br><br>I was looking @ the =
diffs.... and this code in Iterative adapter:<br><br> =
if (injectionMembers =3D=3D null) {<br> =
synchronized (this) {<br> =
if (injectionMembers =3D=3D null) {<br> =
=
initializeInjectionMembersAndTypeLists();<br> =
}<br> =
}<br> }<br><br>Isn't that =
double-check locking and not really solving the race condition?<br>Or is =
Boolean assignment exempt from this kind of =
situation?<br><br><br>-Mike<br><br><br><br>-----Original =
Message-----<br>From: Paul Hammant [mailto:<a =
href=3D"mailto:[email protected]">[email protected]</a>]<br>Sent: Monday, =
November 07, 2011 11:53 AM<br>To: <a =
href=3D"mailto:dev-qxt/[email protected]">dev-qxt/[email protected]=
.org</a><br>Subject: Re: [picocontainer-dev] Release of Pico =
2.14<br><br>My bad - I've only just done the nexus 'approval'. =
Give it four hours or<br>so. Meanwhile build from source =
:<br><br> <a =
href=3D"http://svn.codehaus.org/picocontainer/java/2.x/tags/picocontainer=
-2.14/" =
target=3D"_blank">http://svn.codehaus.org/picocontainer/java/2.x/tags/pic=
ocontainer-2.14/</a><br> mvn clean install -DskipTests =
-Preporting<br><br>On Mon, Nov 7, 2011 at 1:28 PM, Simon Brandhof <<a =
href=3D"mailto:[email protected]">[email protected]</a>>=
<br>wrote:<br>> Hi Paul,<br>><br>> Will this release be =
deployed in Maven repository ?<br>><br>> =
Thanks<br>><br>><br>> On 7 November 2011 19:04, Paul Hammant =
<<a href=3D"mailto:[email protected]">[email protected]</a>> =
wrote:<br>>><br>>> Hey Mike. The answer is I'm not =
sure. It's pretty up to date - go<br>>> for it: The =
stuff that's in the latest release isn't in 3.x / Git<br>>> =
yet.<br>>><br>>> - Paul<br>>><br>>> On Mon, Nov =
7, 2011 at 10:38 AM, Michael Rimov<br>>> <<a =
href=3D"mailto:[email protected]">[email protected]</a>><br>&g=
t;> wrote:<br>>> > Hey Paul,<br>>> ><br>>> =
> What is the last change you ported over to Pico 3?<br>>> =
><br>>> > I'll be happy to manually port based on the diffs, =
but I wanted to<br>>> > make sure before I started that I =
wasn't duplicating efforts.<br>>> ><br>>><br>>> =
---------------------------------------------------------------------<br>=
>> To unsubscribe from this list, please =
visit:<br>>><br>>> <a =
href=3D"http://xircles.codehaus.org/manage_email" =
target=3D"_blank">http://xircles.codehaus.org/manage_email</a><br>>>=
;<br>>><br>><br>><br><br>------------------------------------=
---------------------------------<br>To unsubscribe from this list, =
please visit:<br><br> <a =
href=3D"http://xircles.codehaus.org/manage_email" =
target=3D"_blank">http://xircles.codehaus.org/manage_email</a><br><br><br=
><br>--------------------------------------------------------------------=
-<br>To unsubscribe from this list, please visit:<br><br> <a =
href=3D"http://xircles.codehaus.org/manage_email" =
target=3D"_blank">http://xircles.codehaus.org/manage_email</a><br><br><o:=
p></o:p></p></div><p =
class=3DMsoNormal><o:p> </o:p></p></div></div></blockquote></div></b=
ody></html>
------=_NextPart_000_0079_01CC9D78.1EEF7E30--