On Sun, Oct 10, 2010 at 10:09 AM, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:


On Fri, Oct 8, 2010 at 7:40 PM, Igor Stasenko <siguctua@gmail.com> wrote:
2010/10/8 Pavel Krivanek <pavel.krivanek@gmail.com>:
>
>
> On Fri, Oct 8, 2010 at 7:15 PM, Pavel Krivanek <pavel.krivanek@gmail.com>
> wrote:
>>
>>
>> On Fri, Oct 8, 2010 at 5:06 PM, Igor Stasenko <siguctua@gmail.com> wrote:
>>>
>>> 2010/10/8 Pavel Krivanek <pavel.krivanek@gmail.com>:
>>> > Hi Marcus,
>>> > is that really all what happened between 12172 and 12186?
>>> >
>>> > update12186
>>> > Issue 3071: fixing timestamp tests
>>> > Issue 3068: Non portable SmalltalkImage>>platformName
>>> > deprecationWarning
>>> > Issue 3063: removing explain
>>> > Issue 3039: There should not be any configuration on Core
>>> > It doesn't explain the problems with VM versions and in 12186 I cannot
>>> > build
>>> > the PharoKernel (it hangs without error in unload phase)
>>> > -- Pavel
>>> >
>>> please , tell me if it keep hanging after you doing:
>>>
>>> WeakArray restartFinalizationProcess.
>>>
>>> it seems like a deadlock with WeakArray's FinalizationLock or
>>> FinalizationSemaphore.
>>
>> it hangs for me...
>> -- Pavel
>
> with the MCMethodDefinition>>shutdown hack it work well

so, at least we know what causing it.

Now i wonder, what may cause that
� WeakArray classPool at: #FinalizationLock
get locked by some other process and not released anymore?


if I replace critical:ifError: by critical:ifLocked: in WeakArray >> removeWeakDependent:, it shows that it is really locked. I can reproduce it everytime. Any idea how can I determine who locked it?

-- Pavel

It collides with HostSystemMenusProxy class >> unregister�

this is the call stack:

[caught := true.
self wait.
blockValue := mutuallyExcludedBlock value] in Semaphore>>critical:

BlockClosure>>ensure:

Semaphore>>critical:

Semaphore>>critical:ifError:

WeakRegistry>>protected:

WeakRegistry>>remove:ifAbsent:

HostSystemMenusProxy class>>unregister:

HostSystemMenusProxy>>unregister

HostSystemMenusProxy>>destroyEveryThing

[self destroyEveryThing] in HostSystemMenusProxy>>finalize

BlockClosure>>on:do:

BlockClosure>>ifError:

HostSystemMenusProxy>>finalize

WeakFinalizerItem>>finalizeValues

[:finItem | finItem finalizeValues] in [valueDictionary
expiredValuesDo: [:finItem | finItem finalizeValues]] in WeakRegistry>>finalizeValues

WeakIdentityKeyDictionary(WeakKeyDictionary)>>expiredValuesDo:

[valueDictionary
expiredValuesDo: [:finItem | finItem finalizeValues]] in WeakRegistry>>finalizeValues

[mutuallyExcludedBlock value] in [blockValue := [mutuallyExcludedBlock value]
ifError: [:msg :rcvr |�
hasError := true.
errMsg := msg.
errRcvr := rcvr]] in Semaphore>>critical:ifError:

BlockClosure>>on:do:

BlockClosure>>ifError:

[blockValue := [mutuallyExcludedBlock value]
ifError: [:msg :rcvr |�
hasError := true.
errMsg := msg.
errRcvr := rcvr]] in Semaphore>>critical:ifError:

[caught := true.
self wait.
blockValue := mutuallyExcludedBlock value] in Semaphore>>critical:

BlockClosure>>ensure:

Semaphore>>critical:

Semaphore>>critical:ifError:

WeakRegistry>>protected:

WeakRegistry>>finalizeValues

[:weakDependent | weakDependent
ifNotNil: [weakDependent finalizeValues]] in [WeakFinalizationList checkTestPair.
FinalizationDependents
do: [:weakDependent | weakDependent
ifNotNil: [weakDependent finalizeValues]]] in WeakArray class>>finalizationProcess

WeakArray(SequenceableCollection)>>do:

[WeakFinalizationList checkTestPair.
FinalizationDependents
do: [:weakDependent | weakDependent
ifNotNil: [weakDependent finalizeValues]]] in WeakArray class>>finalizationProcess

[mutuallyExcludedBlock value] in [blockValue := [mutuallyExcludedBlock value]
ifError: [:msg :rcvr |�
hasError := true.
errMsg := msg.
errRcvr := rcvr]] in Semaphore>>critical:ifError:

BlockClosure>>on:do:

BlockClosure>>ifError:

[blockValue := [mutuallyExcludedBlock value]
ifError: [:msg :rcvr |�
hasError := true.
errMsg := msg.
errRcvr := rcvr]] in Semaphore>>critical:ifError:

[caught := true.
self wait.
blockValue := mutuallyExcludedBlock value] in Semaphore>>critical:

BlockClosure>>ensure:

Semaphore>>critical:

Semaphore>>critical:ifError:

WeakArray class>>finalizationProcess

[self finalizationProcess] in WeakArray class>>restartFinalizationProcess

[self value.
Processor terminateActive] in BlockClosure>>newProcess


-- Pavel