6042N/A * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 6042N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6042N/A * This code is free software; you can redistribute it and/or modify it 6042N/A * under the terms of the GNU General Public License version 2 only, as 6042N/A * published by the Free Software Foundation. 6042N/A * This code is distributed in the hope that it will be useful, but WITHOUT 6042N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 6042N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 6042N/A * version 2 for more details (a copy is included in the LICENSE file that 6042N/A * You should have received a copy of the GNU General Public License version 6042N/A * 2 along with this work; if not, write to the Free Software Foundation, 6042N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 6042N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 6042N/A * or visit www.oracle.com if you need additional information or have any 6042N/A * @summary check for deadlock between findLogger() and drainLoggerRefQueueBounded() 6042N/A * @author jim.gish@oracle.com 6042N/A * @build DrainFindDeadlockTest 6042N/A * This test is checking for a deadlock between 6042N/A * LogManager$LoggerContext.findLogger() and 6042N/A * LogManager.drainLoggerRefQueueBounded() (which could happen by calling 6042N/A * Logger.getLogger() and LogManager.readConfiguration() in different threads) 6042N/A // Get a ThreadMXBean so we can check for deadlock. N.B. this may 6042N/A // not be supported on all platforms, which means we will have to 6042N/A // resort to the traditional test timeout method. However, if 6042N/A // we have the support we'll get the deadlock details if one 6042N/A // make the threads daemon threads so they will go away when the 6042N/A // System.out.println("checkstate"); 6042N/A // they are both blocked, but this doesn't necessarily mean