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 6E85E773C for ; Sat, 10 Sep 2011 16:30:30 +0000 (UTC) Received: (qmail 86794 invoked by uid 500); 10 Sep 2011 16:30:30 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 86766 invoked by uid 500); 10 Sep 2011 16:30:30 -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 86758 invoked by uid 99); 10 Sep 2011 16:30:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Sep 2011 16:30:30 +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, 10 Sep 2011 16:30:29 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DEA658EB13 for ; Sat, 10 Sep 2011 16:30:08 +0000 (UTC) Date: Sat, 10 Sep 2011 16:30:08 +0000 (UTC) From: "Andrew Purtell (JIRA)" To: issues@hbase.apache.org Message-ID: <16122682.13251.1315672208908.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 [ https://issues.apache.org/jira/browse/HBASE-4367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102075#comment-13102075 ] Andrew Purtell commented on HBASE-4367: --------------------------------------- This also needs to be applied to 0.90 branch, please. > 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: Ted Yu > Priority: Critical > Fix For: 0.92.0 > > Attachments: 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