Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B657D200C04 for ; Tue, 24 Jan 2017 20:02:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B4EA9160B5C; Tue, 24 Jan 2017 19:02:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 06DE7160B3E for ; Tue, 24 Jan 2017 20:02:46 +0100 (CET) Received: (qmail 99183 invoked by uid 500); 24 Jan 2017 19:02:39 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 98990 invoked by uid 99); 24 Jan 2017 19:02:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jan 2017 19:02:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A01BC181A72 for ; Tue, 24 Jan 2017 19:02:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id QRV5nu5yK2Xl for ; Tue, 24 Jan 2017 19:02:37 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 1ED7E5FD75 for ; Tue, 24 Jan 2017 19:02:31 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 49B2EE06A7 for ; Tue, 24 Jan 2017 19:02:28 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id D9C60252AE for ; Tue, 24 Jan 2017 19:02:27 +0000 (UTC) Date: Tue, 24 Jan 2017 19:02:27 +0000 (UTC) From: "Wiktor N (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (JCS-171) Multiple CacheEventQueue.QProcessor spawned for the same cache region MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 24 Jan 2017 19:02:47 -0000 [ https://issues.apache.org/jira/browse/JCS-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15836453#comment-15836453 ] Wiktor N commented on JCS-171: ------------------------------ One of our users reported that he sees messages related in my opinion to this change: {noformat} java.util.concurrent.RejectedExecutionException: Task PutEvent for key: Bing aerial imagery:http://www.bing.com/maps/14/5836/9279 value: org.openstreetmap.josm.data.cache.BufferedImageCacheEntry@20ae54f3 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(ThreadPoolExecutor.java:2047) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369) at org.apache.commons.jcs.engine.PooledCacheEventQueue.put(PooledCacheEventQueue.java:127) at org.apache.commons.jcs.engine.AbstractCacheEventQueue.addPutEvent(AbstractCacheEventQueue.java:187) at org.apache.commons.jcs.auxiliary.disk.AbstractDiskCache.update(AbstractDiskCache.java:215) at org.apache.commons.jcs.engine.control.CompositeCache.updateAuxiliaries(CompositeCache.java:368) at org.apache.commons.jcs.engine.control.CompositeCache.update(CompositeCache.java:253) at org.apache.commons.jcs.engine.control.CompositeCache.update(CompositeCache.java:205) at org.apache.commons.jcs.access.CacheAccess.put(CacheAccess.java:239) {noformat} 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: https://issues.apache.org/jira/browse/JCS-171 > 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, jcs-perf-test.zip > > > 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 (v6.3.4#6332)