[Helma-user] java.util.ConcurrentModificationException on app.addRepository
Hannes Wallnoefer
hannes at helma.at
Thu Jul 17 13:39:04 CEST 2008
2008/7/17 Burghard Britzke <bubi at charmides.in-berlin.de>:
>
> Am 17.07.2008 um 13:22 schrieb Hannes Wallnoefer:
>
>> 2008/7/17 Bernhard Fröhlich <decke at bluelife.at>:
>>>> Hello list,
>>>>
>>>> we load our widgets on helma start with app.addRepository and
>>>> sometimes we
>>>> get the following error code:
>>>>
>>>> ...
>>>> [2008/07/17 11:19:23] [ERROR] null:
>>>> java.util.ConcurrentModificationException
>>>> ...
>>>> the error is reproduceable on some machines (windows, linux) under
>>>> helma1.6.0 and helma 1.6.2, java1.6.0_01 and java1.6.0_06. it
>>>> seems to be
>>>> a
>>>> racing condition?
>>>
>>>
>>> I am not familiar with the Helma code but as far as i can tell
>>> there seems
>>> to be a missing synchronisation in
>>> TypeManager.java:checkRepositories()
>>> because the Iterator is not protected from getting invalid.
>>>
>>> So it seems like an helma bug - would you mind creating an bugreport?
>>
>> Yes, it's definitely a helma bug, so please file a bug report.
>>
>> I'm not sure just adding synchronization would help, as it could be
>> the same thread inserting into the prototype map, or synchronization
>> could result in a deadlock. It's probably worth a try, though.
>>
>> hannes
>>
>>> Bernhard Fröhlich
>
> ConcurrentModificationExceptions can be preventet by adding proper
> synchronization
not if the collection is modified by the same thread using the iterator.
> deadlocks can be prevented by accessing the resources in the same
> sequence for each thread.
If only that was so simple as it sounded!
hannes
> sincerely,
> burghard.
> _______________________________________________
> Helma-user mailing list
> Helma-user at helma.org
> http://helma.org/mailman/listinfo/helma-user
>
More information about the Helma-user
mailing list