Itamar and all,

attached the patches solving this issue.

- ThreadLocal.cpp.diff: Unregistering the current thread, if a thread
local storage is destroyed.
- FieldsReader.cpp.diff: One of my colleagues observed that
uninitialized variables may also lead to crashes in this scenario too.
In particular, if exceptions are caught and ignored. Then these fields
stay uninitialized but will be used afterwards.
- CompoundFile.cpp.diff: ditto

Our systems seems to run very stable now with these patches.

Kind regards,

Veit

2010/3/24 Veit Jahns <nuncupa...@googlemail.com>:
> Itamar,
>
> thank you for your answer!
>
>> What OS / compiler were you testing this with?
>
> I tested with Vista/VS9 and Linux/gcc-4.4.1. This error occurs with
> both OS/compilers.
>
>> I'm not sure, but this could
>> be due to the same threading issue we already aware of. Were you able to run
>> the atomic tests from the test suite successfully?
>
> Yes the atomic tests run successfully. But if I add
>
> Term term(_T("id"), _T("ten"));
> TermDocs* td = r->termDocs(&term);
> _CLDELETE(td);
>
> to atomicSearchTest (diff attached), then I get the same error. I
> investigated it
> a little bit and my assumption is that the reason for this error lies the
> ThreadLocal class:
>
> If the IndexReader or the IndexSearcher is created and deleted within
> a thread, then they will also delete their ThreadLocal object and its
> content. But this object is also added to the ThreadLocals map, but not
> removed, when the thread itself deletes the ThreadLocal object. As a
> consequence the program tries to reference an already deleted object
> (in ThreadLocal::setNull()) during the unregistration of a thread.
>
> This error don't occur, if nothing is put into the thread local storage,
> which happens in the original atomic tests.
>
> Maybe this problem is the same which Celto reported some months ago [1].
>
> I will try to fix this error. But any suggestions are much appreciated.
>
>> In the meantime,
>> try perhaps applying the threading related fixes Ben has pushed recently to
>> his branch (ben_working), and let me know how it goes.
>
> I did, but they don't changed anything.
>
> Kind regards,
>
> Veit
>
> [1] 
> http://sourceforge.net/tracker/?func=detail&aid=2900857&group_id=80013&atid=558446
>

Attachment: ThreadLocal.cpp.diff
Description: Binary data

Attachment: CompoundFile.cpp.diff
Description: Binary data

Attachment: FieldsReader.cpp.diff
Description: Binary data

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers

Reply via email to