Re: WOWorkerThread deadlocks
Re: WOWorkerThread deadlocks
- Subject: Re: WOWorkerThread deadlocks
- From: Chuck Hill <email@hidden>
- Date: Fri, 14 Sep 2012 09:38:10 -0700
I think you can safely ignore warnings from the finalizer.
On 2012-09-14, at 9:28 AM, Susanne Schneider wrote:
> Hi Chuck,
>
> many thanks for your answer.
>
> Am 13.09.2012 20:06, schrieb Chuck Hill:
>> Hi Susanne,
>>
>>
>> On 2012-09-13, at 8:57 AM, Susanne Schneider wrote:
>>
>>> Hi all,
>>>
>>> please allow me to add one question regarding this interesting topic.
>>>
>>> Alexis Tual (my mail client has problem with correct quoting) has suggested for EOF background handling:
>>> <snip>
>>> ec.lock();
>>> try {
>>> // huge loop to compute stats
>>> for (i = 0; i < 1000000; i++) {
>>> // doing stuff with ec...
>>> // cycling the ec
>>> if (i % 100 == 0) {
>>> ec.unlock();
>>> ec.dispose();
>>> ec = newEditingContextForMyWork();
>>> ec.lock();
>>> }
>>> }
>>> } finally {
>>> ec.unlock();
>>> }
>>> </snip>
>>>
>>> Now my question: is it correct to dispose the ec after unlock or would it be better to do this beforehand, like:
>>>
>>> ec.dipsose();
>>> ec.unlock();
>>
>> It is correct to unlock it before disposing it.
> Good to know, we will do it this way.
>
>>
>>> If I turn on the ec-lock logging in my application, there are many remarks from the Finalizers like: "*** EOEditingContext: access with no lock: _eoForGID()!" Is this a real problem or can it be ignored?
>>
>> I am not sure, can you send the full stack trace?
>>
> There is nor real exception, just the logging message. We have turned on debugging with
>
> NSLog.debug.setAllowedDebugLevel(NSLog.DebugLevelInformational);
> NSLog.allowDebugLoggingForGroups(NSLog.DebugGroupMultithreading);
> EOObjectStore._resetAssertLock();
>
> in the application constructor because we were experiencing sporadic deadlocks and hoped to get some information of any EC locking problem that way. Besides other information (about real unlocked ec usage) this results in messages like
>
> [120726 18:54:07] DEBUG <Finalizer> com.webobjects - *** EOEditingContext: access with no lock: _eoForGID()!
>
> at random intervals (whenever the garbage collection is done). There seem to be nothing related to this message. Explicitly disposing any local ec seems to help regarding this special message. But because I am not so familiar with the EOF internals, I was not sure if this is a real problem or just too chatty logging.
>
> Best regards.
> Susanne
> --
> Susanne Schneider
> Coordinator secuTrial Development
>
> iAS interActive Systems GmbH
> Dieffenbachstraße 33 c, D-10967 Berlin
>
> fon +49(0)30 22 50 50 - 498
> fax +49(0)30 22 50 50 - 451
> mail email@hidden
> web http://www.interActive-Systems.de
>
> ----------------------------------------------------
> Geschäftsführer: Dr. Marko Reschke, Thomas Fritzsche
> Sitz der Gesellschaft: Berlin
> Amtsgericht Berlin Charlottenburg, HRB 106103B
> ----------------------------------------------------
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/gvc/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden