You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Vitaly Baranovsky (JIRA)" <je...@portals.apache.org> on 2007/07/25 15:32:31 UTC
[jira] Created: (JS2-761) ConcurrentModificationException in
FileCache after jetspeed 2.1.2 installation
ConcurrentModificationException in FileCache after jetspeed 2.1.2 installation
------------------------------------------------------------------------------
Key: JS2-761
URL: https://issues.apache.org/jira/browse/JS2-761
Project: Jetspeed 2
Issue Type: Bug
Components: Components Core
Affects Versions: 2.1.2
Environment: java 1.5, SuSe Linux 10, tomcat 5.5.20
Reporter: Vitaly Baranovsky
I've downloaded and installed jetspeed portal. I've created several pages and have looked into jetspeed.log.
There are some exceptions "org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
java.util.ConcurrentModificationException "
Stack:
2007-07-25 13:56:21,598 [Thread-2] ERROR org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
at java.util.HashMap$ValueIterator.next(HashMap.java:871)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
[jira] Assigned: (JS2-761) ConcurrentModificationException in
FileCache after jetspeed 2.1.2 installation
Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
[ https://issues.apache.org/jira/browse/JS2-761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Woonsan Ko reassigned JS2-761:
------------------------------
Assignee: Woonsan Ko
> ConcurrentModificationException in FileCache after jetspeed 2.1.2 installation
> ------------------------------------------------------------------------------
>
> Key: JS2-761
> URL: https://issues.apache.org/jira/browse/JS2-761
> Project: Jetspeed 2
> Issue Type: Bug
> Components: Components Core
> Affects Versions: 2.1.2
> Environment: java 1.5, SuSe Linux 10, tomcat 5.5.20
> Reporter: Vitaly Baranovsky
> Assignee: Woonsan Ko
> Fix For: 2.2
>
>
> I've downloaded and installed jetspeed portal. I've created several pages and have looked into jetspeed.log.
> There are some exceptions "org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException "
> Stack:
> 2007-07-25 13:56:21,598 [Thread-2] ERROR org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
> at java.util.HashMap$ValueIterator.next(HashMap.java:871)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
[jira] Commented: (JS2-761) ConcurrentModificationException in
FileCache after jetspeed 2.1.2 installation
Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
[ https://issues.apache.org/jira/browse/JS2-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639355#action_12639355 ]
Woonsan Ko commented on JS2-761:
--------------------------------
I think we should improve this by minimizing the locking.
Catching exceptions and retrying the refresh is not enough because the synchronizing codes can reduce the performance significantly in case that there are a lot of pages.
I'd like to improve this for the 2.2 release.
> ConcurrentModificationException in FileCache after jetspeed 2.1.2 installation
> ------------------------------------------------------------------------------
>
> Key: JS2-761
> URL: https://issues.apache.org/jira/browse/JS2-761
> Project: Jetspeed 2
> Issue Type: Bug
> Components: Components Core
> Affects Versions: 2.1.2
> Environment: java 1.5, SuSe Linux 10, tomcat 5.5.20
> Reporter: Vitaly Baranovsky
> Assignee: Woonsan Ko
> Fix For: 2.2
>
>
> I've downloaded and installed jetspeed portal. I've created several pages and have looked into jetspeed.log.
> There are some exceptions "org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException "
> Stack:
> 2007-07-25 13:56:21,598 [Thread-2] ERROR org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
> at java.util.HashMap$ValueIterator.next(HashMap.java:871)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
[jira] Updated: (JS2-761) ConcurrentModificationException in
FileCache after jetspeed 2.1.2 installation
Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
[ https://issues.apache.org/jira/browse/JS2-761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ate Douma updated JS2-761:
--------------------------
Fix Version/s: 2.1.3
> ConcurrentModificationException in FileCache after jetspeed 2.1.2 installation
> ------------------------------------------------------------------------------
>
> Key: JS2-761
> URL: https://issues.apache.org/jira/browse/JS2-761
> Project: Jetspeed 2
> Issue Type: Bug
> Components: Components Core
> Affects Versions: 2.1.2
> Environment: java 1.5, SuSe Linux 10, tomcat 5.5.20
> Reporter: Vitaly Baranovsky
> Fix For: 2.2
>
>
> I've downloaded and installed jetspeed portal. I've created several pages and have looked into jetspeed.log.
> There are some exceptions "org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException "
> Stack:
> 2007-07-25 13:56:21,598 [Thread-2] ERROR org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
> at java.util.HashMap$ValueIterator.next(HashMap.java:871)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
[jira] Commented: (JS2-761) ConcurrentModificationException in
FileCache after jetspeed 2.1.2 installation
Posted by "David Sean Taylor (JIRA)" <je...@portals.apache.org>.
[ https://issues.apache.org/jira/browse/JS2-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639169#action_12639169 ]
David Sean Taylor commented on JS2-761:
---------------------------------------
Woonsan,
Could we try catching the exception and retrying the refresh code?
> ConcurrentModificationException in FileCache after jetspeed 2.1.2 installation
> ------------------------------------------------------------------------------
>
> Key: JS2-761
> URL: https://issues.apache.org/jira/browse/JS2-761
> Project: Jetspeed 2
> Issue Type: Bug
> Components: Components Core
> Affects Versions: 2.1.2
> Environment: java 1.5, SuSe Linux 10, tomcat 5.5.20
> Reporter: Vitaly Baranovsky
> Assignee: Woonsan Ko
> Fix For: 2.2
>
>
> I've downloaded and installed jetspeed portal. I've created several pages and have looked into jetspeed.log.
> There are some exceptions "org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException "
> Stack:
> 2007-07-25 13:56:21,598 [Thread-2] ERROR org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
> at java.util.HashMap$ValueIterator.next(HashMap.java:871)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
[jira] Updated: (JS2-761) ConcurrentModificationException in
FileCache after jetspeed 2.1.2 installation
Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
[ https://issues.apache.org/jira/browse/JS2-761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ate Douma updated JS2-761:
--------------------------
Fix Version/s: (was: 2.1.3)
2.2
> ConcurrentModificationException in FileCache after jetspeed 2.1.2 installation
> ------------------------------------------------------------------------------
>
> Key: JS2-761
> URL: https://issues.apache.org/jira/browse/JS2-761
> Project: Jetspeed 2
> Issue Type: Bug
> Components: Components Core
> Affects Versions: 2.1.2
> Environment: java 1.5, SuSe Linux 10, tomcat 5.5.20
> Reporter: Vitaly Baranovsky
> Fix For: 2.2
>
>
> I've downloaded and installed jetspeed portal. I've created several pages and have looked into jetspeed.log.
> There are some exceptions "org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException "
> Stack:
> 2007-07-25 13:56:21,598 [Thread-2] ERROR org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
> at java.util.HashMap$ValueIterator.next(HashMap.java:871)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
[jira] Resolved: (JS2-761) ConcurrentModificationException in
FileCache after jetspeed 2.1.2 installation
Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
[ https://issues.apache.org/jira/browse/JS2-761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Woonsan Ko resolved JS2-761.
----------------------------
Resolution: Fixed
Modified FileCache to use an injected JetspeedCache instance. It doesn't need to synchronize any object any more.
> ConcurrentModificationException in FileCache after jetspeed 2.1.2 installation
> ------------------------------------------------------------------------------
>
> Key: JS2-761
> URL: https://issues.apache.org/jira/browse/JS2-761
> Project: Jetspeed 2
> Issue Type: Bug
> Components: Components Core
> Affects Versions: 2.1.2
> Environment: java 1.5, SuSe Linux 10, tomcat 5.5.20
> Reporter: Vitaly Baranovsky
> Assignee: Woonsan Ko
> Fix For: 2.2
>
>
> I've downloaded and installed jetspeed portal. I've created several pages and have looked into jetspeed.log.
> There are some exceptions "org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException "
> Stack:
> 2007-07-25 13:56:21,598 [Thread-2] ERROR org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
> at java.util.HashMap$ValueIterator.next(HashMap.java:871)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
[jira] Commented: (JS2-761) ConcurrentModificationException in
FileCache after jetspeed 2.1.2 installation
Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
[ https://issues.apache.org/jira/browse/JS2-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526138 ]
Woonsan Ko commented on JS2-761:
--------------------------------
After inspecting this issue, I came to the following conclusion:
- The FileCacheScanner#run() method has a problematic synchronization issue.
// line 402-407 of FileCache.java
Collection values = Collections.synchronizedCollection(FileCache.this.cache.values());
synchronized (values)
{
for (Iterator it = values.iterator(); it.hasNext(); )
{
FileCacheEntry entry = (FileCacheEntry) it.next();
...
It synchronizes the 'values', entry collection of the cache object, but it cannot block entry additions of other threads because it does not synchronize the cache object.
If the entry collection is modified, then the next() will sometimes throw a ConcurrentModificationException.
By the way, I think we'd better defer fixing this issue to the 2.2 release because of the following reasons:
- The problem may not be a critical problem in a production system because psml pages don't seem to be frequently added.
- There's no critical problem even though this exception is logged. It will just scan again later.
- I don't think it's a good idea that we improve this FileCache class. IMO, we'd better use good caching framework library such EhCache. This change could be bigger than we expect, so let's defer this issue.
> ConcurrentModificationException in FileCache after jetspeed 2.1.2 installation
> ------------------------------------------------------------------------------
>
> Key: JS2-761
> URL: https://issues.apache.org/jira/browse/JS2-761
> Project: Jetspeed 2
> Issue Type: Bug
> Components: Components Core
> Affects Versions: 2.1.2
> Environment: java 1.5, SuSe Linux 10, tomcat 5.5.20
> Reporter: Vitaly Baranovsky
>
> I've downloaded and installed jetspeed portal. I've created several pages and have looked into jetspeed.log.
> There are some exceptions "org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException "
> Stack:
> 2007-07-25 13:56:21,598 [Thread-2] ERROR org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration...
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
> at java.util.HashMap$ValueIterator.next(HashMap.java:871)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org