commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wiktor N (JIRA)" <>
Subject [jira] [Commented] (JCS-171) Multiple CacheEventQueue.QProcessor spawned for the same cache region
Date Tue, 24 Jan 2017 19:02:27 GMT


Wiktor N commented on JCS-171:

One of our users reported that he sees messages related in my opinion to this change:

java.util.concurrent.RejectedExecutionException: Task PutEvent for key: Bing aerial imagery:
value: rejected from java.util.concurrent.ThreadPoolExecutor@1bd0f37c[Terminated,
pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 3898]
	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(
	at java.util.concurrent.ThreadPoolExecutor.reject(
	at java.util.concurrent.ThreadPoolExecutor.execute(
	at org.apache.commons.jcs.engine.PooledCacheEventQueue.put(
	at org.apache.commons.jcs.engine.AbstractCacheEventQueue.addPutEvent(
	at org.apache.commons.jcs.auxiliary.disk.AbstractDiskCache.update(
	at org.apache.commons.jcs.engine.control.CompositeCache.updateAuxiliaries(
	at org.apache.commons.jcs.engine.control.CompositeCache.update(
	at org.apache.commons.jcs.engine.control.CompositeCache.update(
	at org.apache.commons.jcs.access.CacheAccess.put(

I'll investigate further to check what's going on, as there is no clear way to reproduce.
Though it doesn't affect stability.

> Multiple CacheEventQueue.QProcessor spawned for the same cache region
> ---------------------------------------------------------------------
>                 Key: JCS-171
>                 URL:
>             Project: Commons JCS
>          Issue Type: Bug
>          Components: Composite Cache
>    Affects Versions: jcs-2.0
>            Reporter: Wiktor N
>            Assignee: Thomas Vandahl
>             Fix For: jcs-2.1
>         Attachments: CacheEventQueue.patch,
> I noticed that running on new version of JCS I get multiple CacheEventQueue.QProcessor
thread. They spawn from time to time.
> I've checked recent changes and changes few things in r1774925 look suspicious:
> 1. In previous code we spawned a new thread in synchronized section. This got us a guarantee,
that there will be no two threads trying to spawn a new thread in the same time. Maybe some
locking is needed around thread creation?
> 2. QProcessor uses isAlive() method. But this is defined by Thread.isAlive() while it
should probably check for CacheEventQueue.this.isAlive()

This message was sent by Atlassian JIRA

View raw message