[jira] Reopened: (JCR-862) unsynchronized access on 'itemCache' map in ItemManager
[ https://issues.apache.org/jira/browse/JCR-862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tobias Bocanegra reopened JCR-862: -- This fix can cause deadlocks: Thread 1: getNode() - lock itemmanager - read lock on shared-ism Thread 2: save() - write lock on shared-ism - update() - notifies all localisms - notifies all itemmanagers - lock on itemmanager unsynchronized access on 'itemCache' map in ItemManager Key: JCR-862 URL: https://issues.apache.org/jira/browse/JCR-862 Project: Jackrabbit Issue Type: Bug Components: core Affects Versions: 1.2.3 Reporter: Tobias Bocanegra Assigned To: Stefan Guggisberg Fix For: 1.4 Attachments: ItemManager.patch, stacktrace.txt the access 'itemCache' map in ItemManager is mostly synchronized by not via the ItemStateListener methods: [...] public void stateCreated(ItemState created) { ItemImpl item = retrieveItem(created.getId()); if (item != null) { item.stateCreated(created); } } [...] private ItemImpl retrieveItem(ItemId id) { return (ItemImpl) itemCache.get(id); } [...] this can result in a corruption of a map (eg subsequent accesses may result in a endless loop). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Reopened: (JCR-862) unsynchronized access on 'itemCache' map in ItemManager
[ https://issues.apache.org/jira/browse/JCR-862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcel Reutegger reopened JCR-862: -- The fix introduces a deadlock between a reader and a writer session. See attached stacktrace. unsynchronized access on 'itemCache' map in ItemManager Key: JCR-862 URL: https://issues.apache.org/jira/browse/JCR-862 Project: Jackrabbit Issue Type: Bug Components: core Affects Versions: 1.2.3 Reporter: Tobias Bocanegra Assigned To: Stefan Guggisberg Fix For: 1.4 the access 'itemCache' map in ItemManager is mostly synchronized by not via the ItemStateListener methods: [...] public void stateCreated(ItemState created) { ItemImpl item = retrieveItem(created.getId()); if (item != null) { item.stateCreated(created); } } [...] private ItemImpl retrieveItem(ItemId id) { return (ItemImpl) itemCache.get(id); } [...] this can result in a corruption of a map (eg subsequent accesses may result in a endless loop). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Reopened: (JCR-862) unsynchronized access on 'itemCache' map in ItemManager
[ https://issues.apache.org/jira/browse/JCR-862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tobias Bocanegra reopened JCR-862: -- there are still some potential unsynchronized accesses: - itemExists(Path) calls evictItem() - itemExists(ItemId) calls evictItem() - dispose() does a cache.clear() - dump() accesses the cache as well unsynchronized access on 'itemCache' map in ItemManager Key: JCR-862 URL: https://issues.apache.org/jira/browse/JCR-862 Project: Jackrabbit Issue Type: Bug Components: core Affects Versions: 1.2.3 Reporter: Tobias Bocanegra Assigned To: Stefan Guggisberg Fix For: 1.4 the access 'itemCache' map in ItemManager is mostly synchronized by not via the ItemStateListener methods: [...] public void stateCreated(ItemState created) { ItemImpl item = retrieveItem(created.getId()); if (item != null) { item.stateCreated(created); } } [...] private ItemImpl retrieveItem(ItemId id) { return (ItemImpl) itemCache.get(id); } [...] this can result in a corruption of a map (eg subsequent accesses may result in a endless loop). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.