[logback-dev] [JIRA] Commented: (LBCORE-224) java.lang.IllegalMonitorStateException at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:68)

Ceki Gulcu (JIRA) noreply-jira at qos.ch
Tue Sep 27 13:01:16 CEST 2011


    [ http://jira.qos.ch/browse/LBCORE-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12144#action_12144 ] 

Ceki Gulcu commented on LBCORE-224:
-----------------------------------

Thanks for supplying a recipe for reproducing this problem. I've checked and compiled zookeeper  from SVN and added the resulting zookeeper-3.4.0.jar and zookeeper-3.4.0-test.jar files to my class path.

Here is my test case:

package ch.qos.logback.classic.issue.lbcore224;
import org.apache.zookeeper.test.QuorumUtil;
import org.junit.After;
import org.junit.Test;

public class LBCORE224Test {
  final QuorumUtil qU = new QuorumUtil(1);

  @After
  public void teatDown() throws Exception {
    qU.tearDown();
  }

  @Test
  public void test() throws Exception {
    for (int i = 0; i < 10; i++) {
      qU.startQuorum();
      qU.shutdownAll();
      System.out.println(i);
    }
  }
}

Running the above test case I get:
java.lang.RuntimeException: java.io.IOException: The system cannot find the path specified
	at org.apache.zookeeper.test.QuorumUtil.<init>(QuorumUtil.java:118)
	at ch.qos.logback.classic.issue.lbcore224.LBCORE224Test.<init>(LBCORE224Test.java:10)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:209)
	at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:258)
[snip]
Caused by: java.io.IOException: The system cannot find the path specified
	at java.io.WinNTFileSystem.createFileExclusively(Native Method)
	at java.io.File.checkAndCreate(File.java:1704)
	at java.io.File.createTempFile(File.java:1792)
	at org.apache.zookeeper.test.ClientBase.createTmpDir(ClientBase.java:320)
	at org.apache.zookeeper.test.ClientBase.createTmpDir(ClientBase.java:317)
	at org.apache.zookeeper.test.QuorumUtil.<init>(QuorumUtil.java:101)
	... 27 more


What else is required to run this test case?


> java.lang.IllegalMonitorStateException at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:68)
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LBCORE-224
>                 URL: http://jira.qos.ch/browse/LBCORE-224
>             Project: logback-core
>          Issue Type: Bug
>          Components: Appender
>    Affects Versions: 0.9.30
>         Environment: W7 64 bits, JRE 6u26 64 bits.
>            Reporter: César Álvarez Núñez
>            Assignee: Logback dev list
>
> I'm trying (unsuccessfully for the time being) to create a test case that will reproduce it.
> It happens randomly with 0.9.30 when running a regression testing with TestNG + Zookeeper + Own code.
> Apparently it does not happen with 0.9.29.
> java.lang.IllegalMonitorStateException
> 	at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(Unknown Source)
> 	at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(Unknown Source)
> 	at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(Unknown Source)
> 	at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:68)
> 	at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:285)
> 	at ch.qos.logback.classic.Logger.callAppenders(Logger.java:272)
> 	at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:473)
> 	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:427)
> 	at ch.qos.logback.classic.Logger.info(Logger.java:631)
> 	at org.apache.zookeeper.server.ZooKeeperServer.shutdown(ZooKeeperServer.java:420)
> 	at org.apache.zookeeper.server.quorum.Leader.shutdown(Leader.java:443)
> 	at org.apache.zookeeper.server.quorum.QuorumPeer.shutdown(QuorumPeer.java:766)
> 	at org.apache.zookeeper.test.QuorumUtil.shutdown(QuorumUtil.java:224)
> 	at org.apache.zookeeper.test.QuorumUtil.shutdownAll(QuorumUtil.java:211)
> 	at org.apache.zookeeper.test.QuorumUtil.tearDown(QuorumUtil.java:255)
> 	at eswf.zk2.agents.ZkEphemeralInfoPublisherTest.tearDown(ZkEphemeralInfoPublisherTest.java:55)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
> 	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:543)
> 	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:212)
> 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:772)
> 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:883)
> 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1208)
> 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> 	at org.testng.TestRunner.privateRun(TestRunner.java:753)
> 	at org.testng.TestRunner.run(TestRunner.java:613)
> 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:335)
> 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:330)
> 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
> 	at org.testng.SuiteRunner.run(SuiteRunner.java:241)
> 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
> 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
> 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1169)
> 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1094)
> 	at org.testng.TestNG.run(TestNG.java:1006)
> 	at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:107)
> 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:199)
> 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:170)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       


More information about the logback-dev mailing list