.. and perhaps we should tell Chris to check Magma code about
potential leak by preventing unregistering external semaphores.
of course, that could be Pharo bug as well.

On 15 February 2012 02:11, Igor Stasenko <siguc...@gmail.com> wrote:
> So, what i suggest you to do is to replace Array with WeakArray in
>
> ExternalSemaphoreTable>>clearExternalObjects
>
> and restart the image, so change will be put in effect.
>
> And report an observation if it cures the problem (and not adds new ones ;).
>
> On 15 February 2012 01:23, Milan Mimica <milan.mim...@gmail.com> wrote:
>> | semaphores arr res |
>>
>> arr := ExternalSemaphoreTable unprotectedExternalObjects.
>> semaphores := arr reject: #isNil.
>>
>> res := semaphores collect: [:sema | sema pointersTo reject: [:ptr | ptr ==
>> arr or: [ptr == semaphores ] ] ].
>> res := res select: [ :each | each isEmpty ].
>> res size.
>>
>> Yes, that's what I did, I'm sure. All of my images, except a fresh 1.4,
>> answer a number >0.
>>
>>
>> On 15 February 2012 00:11, Igor Stasenko <siguc...@gmail.com> wrote:
>>>
>>> On 15 February 2012 00:54, Milan Mimica <milan.mim...@gmail.com> wrote:
>>> > On 14 February 2012 22:55, Igor Stasenko <siguc...@gmail.com> wrote:
>>> >>
>>> >>
>>> >> semaphores collect: [:sema |
>>> >>        sema ->
>>> >>                (sema pointersTo reject: [:ptr | ptr == arr or: [ptr ==
>>> >> semaphores ] ] ) ]
>>> >>
>>> >> Can you try invoking it on your image , look for those who has an
>>> >> empty array, which will mean that there is no references to it except
>>> >> semaphore table itself.
>>> >
>>> >
>>> > There is 69 of such semaphores, out of hundreds in total. Not much :-/
>>> > On a normal image there is only a few.
>>> >
>>>
>>> So, we got a leak somewhere. Can you double-check,
>>> this is semaphores which in the list which
>>> when you inspect that list
>>> will show entries like
>>>
>>> a Semaphore() -> #()
>>>
>>> but not a total number of entries.
>>>
>>> Oh, ok lets just change the code:
>>>
>>> | semaphores arr |
>>>
>>> arr := ExternalSemaphoreTable unprotectedExternalObjects.
>>> semaphores := arr reject: #isNil.
>>>
>>> semaphores reject: [:sema |
>>>       (sema pointersTo reject: [:ptr | ptr == arr or: [ptr ==
>>> semaphores ] ] ) isEmpty not ]
>>>
>>> so, normally this code should answer an empty array.
>>> If not, then there's leak
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko.
>>>
>>
>>
>>
>> --
>> Milan Mimica
>> http://sparklet.sf.net
>
>
>
> --
> Best regards,
> Igor Stasenko.



-- 
Best regards,
Igor Stasenko.

Reply via email to