[Pharo-project] [update 1.2] #12161 - #12172

Igor Stasenko siguctua at gmail.com
Fri Oct 1 10:15:12 EDT 2010


2010/10/1 Levente Uzonyi <leves at elte.hu>:
> On Fri, 1 Oct 2010, Igor Stasenko wrote:
>
>> On 1 October 2010 16:15, Stéphane Ducasse <stephane.ducasse at inria.fr>
>> wrote:
>> Igor
>>
>> I was thinking to rollback now because we cannot do anything.
>> Is is ok for you?
>> And after we can include everything.
>>
>
> Sure, no problem. It should not behave like that.
> There could be some very little speed degradation, but not like you
> describing.
>
> I found that after update 12172->12174
> a FinalizationDependents in WeakArray
> held 4 weak registries before,
> but after update it also holds a WeakIdentityKeyDictionary with 9387
> elements.
>
> This is something from monticello cache, but it screwed somehow..
> I were able to delete it from weakdependents,manually,  like in this script:
>
> arr := (WeakArray classPool at: #FinalizationDependents ).
> arr
> withIndexDo: [:e :i |
>        e class == WeakRegistry ifFalse: [ arr at: i put: nil
>        ]]
>
> After that, everything vent back to normal.
>
> This dictionary comes from MCMethodDefinition Definitions class var.
> So you can simply do:
>
> MCMethodDefinition shutDown
>
> to stop CPU hogging.
>
> But i wonder, if this is just one-time issue, or it will repeat again,
> after update.
>
> During writing this, i found that you already rewinded update, so i
> was unable to check if
> it will start consuming CPU on new code loaded, or its just some
> tension between MC and
> my migration procedure, which can be healed by
> MCMethodDefinition shutDown.
>
>
> IIRC the WeakKeyDictionary is Pharo doesn't work (doesn't free slots or so)
> if it's not registered to the finalization process, but Henrik will correct
> me if I'm wrong.
>
It marks associations whose keys became nil as expired ones
(association key: association).

So, then associations get reused when new entries added.

But i tricked myself by using #allAssociationsDo: , which were wiping
out associations,
before sending #finalize to their values... so, no finalization were run.
Somehow, this lead to blowing up an MC method definitions cache.

>
> Levente
>
>> Stef
>>
>> On Oct 1, 2010, at 3:08 PM, Igor Stasenko wrote:
>>
>>> On 1 October 2010 15:47, Stéphane Ducasse <stephane.ducasse at inria.fr>
>>> wrote:
>>>>
>>>> Igor
>>>> Can you have a look because right now in 12174 I cannot
>>>> do any update anymore so
>>>>        - either we fix it now
>>>>        or we have to rollbakc to 12161.
>>>>
>>> I will take a look
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> On Oct 1, 2010, at 12:49 PM, Igor Stasenko wrote:
>>>>
>>>>> 2010/10/1 Levente Uzonyi <leves at elte.hu>:
>>>>>>
>>>>>> On Fri, 1 Oct 2010, Igor Stasenko wrote:
>>>>>>
>>>>>>> On 1 October 2010 12:06, Levente Uzonyi <leves at elte.hu> wrote:
>>>>>>> On Fri, 1 Oct 2010, Marcus Denker wrote:
>>>>>>>
>>>>>>>> Issue 3002:     A new finalization code ready for integration in
>>>>>>>> Pharo
>>>>>>>> Issue 3026: after 12172, sync with repository and reload
>>>>>>>
>>>>>>> If you didn't fix the migration code, then WeakFinalizationRegistry
>>>>>>> is
>>>>>>> still
>>>>>>> in the system. Details here:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-September/154009.html
>>>>>>>
>>>>>> You mean this not work:
>>>>>>        Smalltalk forgetClass: #WeakFinalizationRegistry logged: false.
>>>>>>
>>>>>> should be
>>>>>>        Smalltalk forgetClass: WeakFinalizationRegistry logged: false.
>>>>>>
>>>>>> right?
>>>>>>
>>>>>>
>>>>>> Yes.
>>>>>>
>>>>>>
>>>>> Thanks for noticing.
>>>>>
>>>>>> Levente
>>>>>>
>>>>>>>
>>>>>>> Levente
>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Marcus Denker  -- http://www.marcusdenker.de
>>>>>>>> INRIA Lille -- Nord Europe. Team RMoD.
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Pharo-project mailing list
>>>>>>>> Pharo-project at lists.gforge.inria.fr
>>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Pharo-project mailing list
>>>>>>> Pharo-project at lists.gforge.inria.fr
>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best regards,
>>>>>> Igor Stasenko AKA sig.
>>>>>>
>>>>>> _______________________________________________
>>>>>> Pharo-project mailing list
>>>>>> Pharo-project at lists.gforge.inria.fr
>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>> _______________________________________________
>>>>>> Pharo-project mailing list
>>>>>> Pharo-project at lists.gforge.inria.fr
>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best regards,
>>>>> Igor Stasenko AKA sig.
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> Pharo-project at lists.gforge.inria.fr
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project at lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko AKA sig.
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project at lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project at lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> _______________________________________________
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



-- 
Best regards,
Igor Stasenko AKA sig.




More information about the Pharo-dev mailing list