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 38C41DA3C for ; Wed, 12 Dec 2012 04:15:24 +0000 (UTC) Received: (qmail 64431 invoked by uid 500); 12 Dec 2012 04:15:24 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 64196 invoked by uid 500); 12 Dec 2012 04:15:23 -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 64164 invoked by uid 99); 12 Dec 2012 04:15:22 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2012 04:15:22 +0000 Date: Wed, 12 Dec 2012 04:15:22 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-7205) Coprocessor classloader is replicated for all regions in the HRegionServer 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-7205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13529614#comment-13529614 ] Ted Yu commented on HBASE-7205: ------------------------------- Did some experiment. First, as http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/management/ManagementFactory.html#getGarbageCollectorMXBeans%28%29 says, we may need to deal with several GarbageCollectorMXBean's. Here is what I came up with: {code} admin.disableTable(htd.getName()); admin.deleteTable(htd.getName()); List mxbeans = ManagementFactory.getGarbageCollectorMXBeans(); LOG.info("There are " + mxbeans.size() + " MXBeans"); GarbageCollectorMXBean mxbean = mxbeans.get(0); long initialCollectionCount = mxbean.getCollectionCount(); long startTime = System.currentTimeMillis(); System.gc(); while (mxbean.getCollectionCount() == initialCollectionCount && System.currentTimeMillis() - startTime < 30000) { Thread.sleep(10); } for (Path p : CoprocessorHost.classLoadersCache.keySet()) { ClassLoader cl = CoprocessorHost.classLoadersCache.get(p); assertTrue(" " + cl, cl == null); } {code} After waiting for 30 seconds, the assertion fails: {code} testClassLoadingFromHDFS(org.apache.hadoop.hbase.coprocessor.TestClassLoading) Time elapsed: 39.79 sec <<< FAILURE! java.lang.AssertionError: org.apache.hadoop.hbase.coprocessor.CoprocessorClassLoader@24e7cb66 at org.junit.Assert.fail(Assert.java:93) at org.junit.Assert.assertTrue(Assert.java:43) at org.apache.hadoop.hbase.coprocessor.TestClassLoading.testClassLoadingFromHDFS(TestClassLoading.java:339) {code} I don't know how long the test should wait for GC to kick in. > Coprocessor classloader is replicated for all regions in the HRegionServer > -------------------------------------------------------------------------- > > Key: HBASE-7205 > URL: https://issues.apache.org/jira/browse/HBASE-7205 > Project: HBase > Issue Type: Bug > Components: Coprocessors > Affects Versions: 0.92.2, 0.94.2 > Reporter: Adrian Muraru > Assignee: Ted Yu > Priority: Critical > Fix For: 0.96.0, 0.94.4 > > Attachments: 7205-0.94.txt, 7205-v10.txt, 7205-v1.txt, 7205-v3.txt, 7205-v4.txt, 7205-v5.txt, 7205-v6.txt, 7205-v7.txt, 7205-v8.txt, 7205-v9.txt, HBASE-7205_v2.patch > > > HBASE-6308 introduced a new custom CoprocessorClassLoader to load the coprocessor classes and a new instance of this CL is created for each single HRegion opened. This leads to OOME-PermGen when the number of regions go above hundres / region server. > Having the table coprocessor jailed in a separate classloader is good however we should create only one for all regions of a table in each HRS. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira