[JBoss JIRA] (ISPN-5563) AsyncCacheLoader.load() may still return stale data
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-5563?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-5563:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 8.0.0.Beta1
7.2.4.Final
Resolution: Done
> AsyncCacheLoader.load() may still return stale data
> ---------------------------------------------------
>
> Key: ISPN-5563
> URL: https://issues.jboss.org/browse/ISPN-5563
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 5.0.0.FINAL, 6.0.0.Final, 7.0.0.Final
> Reporter: Karsten Blees
> Fix For: 8.0.0.Beta1, 7.2.4.Final
>
>
> There's a race condition that allows AsyncCacheLoader.load() / State.get() to return stale data. If the coordinator thread moves a modification to the head state because of a key conflict with tail, State.get() may miss that modification and return data from the back-end store instead.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 6 months
[JBoss JIRA] (ISPN-5562) AsyncCacheWriter should write all data to the back-end store before shutting down
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-5562?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-5562:
-------------------------------
Status: Open (was: New)
> AsyncCacheWriter should write all data to the back-end store before shutting down
> ---------------------------------------------------------------------------------
>
> Key: ISPN-5562
> URL: https://issues.jboss.org/browse/ISPN-5562
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 5.2.0.Final, 6.0.0.Final, 7.0.0.Final
> Reporter: Karsten Blees
> Fix For: 8.0.0.Beta1, 7.2.4.Final
>
>
> There is a chance that AsyncCacheWriter may stop before writing all midifications to the back-end store. This can primarily happen when writing the same keys in rapid succession. The coordinator thread will move these modifications to the head state (because of conflicts with tail), which is not checked before shutdown.
> There are two other minor race conditions if stop() is called concurrently to write() or clear() - these cannot happen in practice because PassivationManager is stopped before PersistenceManager:
> 1. AsyncStoreCoordinator checks State.stopped and State.modifications.isEmpty() without holding the readLock(). This is not reliable because a concurrent write() or remove() may still add to the modifications map.
> 2. clear() just replaces the head state, without copying the stopped flag that may have been set by a concurrent stop().
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 6 months
[JBoss JIRA] (ISPN-5562) AsyncCacheWriter should write all data to the back-end store before shutting down
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-5562?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-5562:
-------------------------------
Status: Pull Request Sent (was: Open)
> AsyncCacheWriter should write all data to the back-end store before shutting down
> ---------------------------------------------------------------------------------
>
> Key: ISPN-5562
> URL: https://issues.jboss.org/browse/ISPN-5562
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 5.2.0.Final, 6.0.0.Final, 7.0.0.Final
> Reporter: Karsten Blees
> Fix For: 8.0.0.Beta1, 7.2.4.Final
>
>
> There is a chance that AsyncCacheWriter may stop before writing all midifications to the back-end store. This can primarily happen when writing the same keys in rapid succession. The coordinator thread will move these modifications to the head state (because of conflicts with tail), which is not checked before shutdown.
> There are two other minor race conditions if stop() is called concurrently to write() or clear() - these cannot happen in practice because PassivationManager is stopped before PersistenceManager:
> 1. AsyncStoreCoordinator checks State.stopped and State.modifications.isEmpty() without holding the readLock(). This is not reliable because a concurrent write() or remove() may still add to the modifications map.
> 2. clear() just replaces the head state, without copying the stopped flag that may have been set by a concurrent stop().
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 6 months
[JBoss JIRA] (ISPN-5562) AsyncCacheWriter should write all data to the back-end store before shutting down
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-5562?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-5562:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 8.0.0.Beta1
7.2.4.Final
Resolution: Done
> AsyncCacheWriter should write all data to the back-end store before shutting down
> ---------------------------------------------------------------------------------
>
> Key: ISPN-5562
> URL: https://issues.jboss.org/browse/ISPN-5562
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 5.2.0.Final, 6.0.0.Final, 7.0.0.Final
> Reporter: Karsten Blees
> Fix For: 8.0.0.Beta1, 7.2.4.Final
>
>
> There is a chance that AsyncCacheWriter may stop before writing all midifications to the back-end store. This can primarily happen when writing the same keys in rapid succession. The coordinator thread will move these modifications to the head state (because of conflicts with tail), which is not checked before shutdown.
> There are two other minor race conditions if stop() is called concurrently to write() or clear() - these cannot happen in practice because PassivationManager is stopped before PersistenceManager:
> 1. AsyncStoreCoordinator checks State.stopped and State.modifications.isEmpty() without holding the readLock(). This is not reliable because a concurrent write() or remove() may still add to the modifications map.
> 2. clear() just replaces the head state, without copying the stopped flag that may have been set by a concurrent stop().
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 6 months
[JBoss JIRA] (ISPN-5559) "AsyncCacheWriter is dead!" errors cause deadlock or unbounded use of memory
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-5559?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-5559:
-------------------------------
Status: Open (was: New)
> "AsyncCacheWriter is dead!" errors cause deadlock or unbounded use of memory
> ----------------------------------------------------------------------------
>
> Key: ISPN-5559
> URL: https://issues.jboss.org/browse/ISPN-5559
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Loaders and Stores
> Affects Versions: 5.3.0.Final, 6.0.0.Final, 7.0.0.Final
> Reporter: Karsten Blees
> Fix For: 8.0.0.Beta1, 7.2.4.Final
>
>
> Caused by a relatively small AsyncStore shutdownTimeout (default 25s) in conjunction with large queue sizes or slow back-end stores.
> With assertions enabled, the coordinator thread will exit with AssertionError and the AsyncStore will deadlock, as no more changes are beeing processed.
> With assertions disabled, the coordinator thread will allocate an unbounded number of AsyncStoreProcessors. If AsyncStoreProcessors were multithreaded (see ISPN-3532), this would cause loss of data (due to older changes overwriting newer changes in the back-end store).
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 6 months
[JBoss JIRA] (ISPN-5559) "AsyncCacheWriter is dead!" errors cause deadlock or unbounded use of memory
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-5559?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-5559:
-------------------------------
Status: Pull Request Sent (was: Open)
> "AsyncCacheWriter is dead!" errors cause deadlock or unbounded use of memory
> ----------------------------------------------------------------------------
>
> Key: ISPN-5559
> URL: https://issues.jboss.org/browse/ISPN-5559
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Loaders and Stores
> Affects Versions: 5.3.0.Final, 6.0.0.Final, 7.0.0.Final
> Reporter: Karsten Blees
> Fix For: 8.0.0.Beta1, 7.2.4.Final
>
>
> Caused by a relatively small AsyncStore shutdownTimeout (default 25s) in conjunction with large queue sizes or slow back-end stores.
> With assertions enabled, the coordinator thread will exit with AssertionError and the AsyncStore will deadlock, as no more changes are beeing processed.
> With assertions disabled, the coordinator thread will allocate an unbounded number of AsyncStoreProcessors. If AsyncStoreProcessors were multithreaded (see ISPN-3532), this would cause loss of data (due to older changes overwriting newer changes in the back-end store).
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 6 months
[JBoss JIRA] (ISPN-5559) "AsyncCacheWriter is dead!" errors cause deadlock or unbounded use of memory
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-5559?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-5559:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 8.0.0.Beta1
7.2.4.Final
Resolution: Done
> "AsyncCacheWriter is dead!" errors cause deadlock or unbounded use of memory
> ----------------------------------------------------------------------------
>
> Key: ISPN-5559
> URL: https://issues.jboss.org/browse/ISPN-5559
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Loaders and Stores
> Affects Versions: 5.3.0.Final, 6.0.0.Final, 7.0.0.Final
> Reporter: Karsten Blees
> Fix For: 8.0.0.Beta1, 7.2.4.Final
>
>
> Caused by a relatively small AsyncStore shutdownTimeout (default 25s) in conjunction with large queue sizes or slow back-end stores.
> With assertions enabled, the coordinator thread will exit with AssertionError and the AsyncStore will deadlock, as no more changes are beeing processed.
> With assertions disabled, the coordinator thread will allocate an unbounded number of AsyncStoreProcessors. If AsyncStoreProcessors were multithreaded (see ISPN-3532), this would cause loss of data (due to older changes overwriting newer changes in the back-end store).
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 6 months