[JIRA] Created: (LBCLASSIC-255) LRUMessageCache is not multithread-safe.

LRUMessageCache is not multithread-safe. ---------------------------------------- Key: LBCLASSIC-255 URL: http://jira.qos.ch/browse/LBCLASSIC-255 Project: logback-classic Issue Type: Bug Affects Versions: unspecified Reporter: César Álvarez Núñez Assignee: Logback dev list Attachments: Added+synchronization+to+LRUMessageCache.+Now+it+is+multithread-safe.patch The LRUMessageCache used on DuplicateMessageFilter is not properly synchronized. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-255?page=com.atlassian.jira.plugin.syste... ] César Álvarez Núñez updated LBCLASSIC-255: ------------------------------------------ Attachment: Added+synchronization+to+LRUMessageCache.+Now+it+is+multithread-safe.patch Path & TestCase
LRUMessageCache is not multithread-safe. ----------------------------------------
Key: LBCLASSIC-255 URL: http://jira.qos.ch/browse/LBCLASSIC-255 Project: logback-classic Issue Type: Bug Affects Versions: unspecified Reporter: César Álvarez Núñez Assignee: Logback dev list Attachments: Added+synchronization+to+LRUMessageCache.+Now+it+is+multithread-safe.patch
The LRUMessageCache used on DuplicateMessageFilter is not properly synchronized.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-255?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu reassigned LBCLASSIC-255: ------------------------------------ Assignee: Ceki Gulcu (was: Logback dev list)
LRUMessageCache is not multithread-safe. ----------------------------------------
Key: LBCLASSIC-255 URL: http://jira.qos.ch/browse/LBCLASSIC-255 Project: logback-classic Issue Type: Bug Affects Versions: unspecified Reporter: César Álvarez Núñez Assignee: Ceki Gulcu Attachments: Added+synchronization+to+LRUMessageCache.+Now+it+is+multithread-safe.patch
The LRUMessageCache used on DuplicateMessageFilter is not properly synchronized.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-255?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-255: -------------------------------------- Hello César, On my machine, all tests in LRUMessageCacheTest pass without making any modifications to LRUMessageCache. This may be explained by the fact that the TestTask acts on amessage obtained from the current thread name. Thus, each task will work with a different message avoiding collisions between the various tasks. However, for testing purposes we would like to encourage collisions.
LRUMessageCache is not multithread-safe. ----------------------------------------
Key: LBCLASSIC-255 URL: http://jira.qos.ch/browse/LBCLASSIC-255 Project: logback-classic Issue Type: Bug Affects Versions: unspecified Reporter: César Álvarez Núñez Assignee: Ceki Gulcu Attachments: Added+synchronization+to+LRUMessageCache.+Now+it+is+multithread-safe.patch
The LRUMessageCache used on DuplicateMessageFilter is not properly synchronized.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-255?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu resolved LBCLASSIC-255. ---------------------------------- Fix Version/s: 0.9.29 Resolution: Fixed In any case, heeding your observation about the vulnerability of LinkedHashMap in multi-threaded environment, I have synchronized parts of the getMessageCountAndThenIncrement method in LRUMessageCache.
LRUMessageCache is not multithread-safe. ----------------------------------------
Key: LBCLASSIC-255 URL: http://jira.qos.ch/browse/LBCLASSIC-255 Project: logback-classic Issue Type: Bug Affects Versions: unspecified Reporter: César Álvarez Núñez Assignee: Ceki Gulcu Fix For: 0.9.29
Attachments: Added+synchronization+to+LRUMessageCache.+Now+it+is+multithread-safe.patch
The LRUMessageCache used on DuplicateMessageFilter is not properly synchronized.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (2)
-
Ceki Gulcu (JIRA)
-
César Álvarez Núñez (JIRA)