Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 95B0D7BFD for ; Sat, 17 Sep 2011 00:31:32 +0000 (UTC) Received: (qmail 82470 invoked by uid 500); 17 Sep 2011 00:31:32 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 82443 invoked by uid 500); 17 Sep 2011 00:31:32 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 82435 invoked by uid 99); 17 Sep 2011 00:31:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Sep 2011 00:31:32 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Sep 2011 00:31:30 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id ED6D88A76C for ; Sat, 17 Sep 2011 00:31:08 +0000 (UTC) Date: Sat, 17 Sep 2011 00:31:08 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: <728458083.37435.1316219468969.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <475664110.12969.1315642509399.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-4367) Deadlock in MemStore flusher due to JDK internally synchronizing on current thread MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-4367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106957#comment-13106957 ] stack commented on HBASE-4367: ------------------------------ We can do without the removal of the Date from PriorityCompactionQueue (There is no PCQ in TRUNK as it happens). > Deadlock in MemStore flusher due to JDK internally synchronizing on current thread > ---------------------------------------------------------------------------------- > > Key: HBASE-4367 > URL: https://issues.apache.org/jira/browse/HBASE-4367 > Project: HBase > Issue Type: Bug > Components: regionserver > Affects Versions: 0.90.4 > Reporter: Todd Lipcon > Assignee: Todd Lipcon > Priority: Critical > Fix For: 0.92.0 > > Attachments: 4367.txt, hbase-4367.txt > > > We observed a deadlock in production between the following threads: > - IPC handler thread holding the monitor lock on MemStoreFlusher inside reclaimMemStoreMemory, waiting to obtain MemStoreFlusher.lock (the reentrant lock member) > - cacheFlusher thread inside flushRegion holds MemStoreFlusher.lock, and then calls PriorityCompactionQueue.add, which calls PriorityCompactionQueue.addToRegionsInQueue, which calls CompactionRequest.toString(), which calls Date.toString. If this occurs just after a GC under memory pressure, Date.toString needs to reload locale information (stored in a soft reference), so it calls ResourceBundle.loadBundle, which uses Thread.currentThread() as a synchronizer (see sun bug http://bugs.sun.com/view_bug.do?bug_id=6915621). Since the current thread is the MemStoreFlusher itself, we have a lock order inversion and a deadlock. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira