未解決の問題_クライアントがRPC呼び出し時にブロックする

11792 ワード

拡張ログ4 jのAppenderをテストすると、サーバーと通信するときにプログラムが反応せず、エラーを報告せず、返さない
具体的にはRPC呼び出しを開始した場所でプロセスがブロックされます.
fileSystem.exists(path)

File SystemはAppenderで作成されます.
this.conf = new Configuration();
		try {
			fileSystem = FileSystem.get(conf);
		} catch (IOException e) {
			if (e instanceof InterruptedIOException) {
				Thread.currentThread().interrupt();
			}
			LogLog.error(
					"cannot get  the configured filesystem implementation.", e);
		}

EclipseではConsole Viewでも終わりません.最後にAppenderを直接クラスタに捨てると,クラスタではこの問題はない.
環境問題のように見えますが、Appenderを使わずにHDFSに直接ファイルを書くという問題はありません.だからLOG 4 Jと直接関係がある
問題が解決しなかったため、このスレッドの完全な情報を残します.
Deadlock Detection:

No deadlocks found.

Thread 30697: (state = BLOCKED)
 - java.lang.Shutdown.exit(int) @bci=96, line=168 (Interpreted frame)
 - java.lang.Terminator$1.handle(sun.misc.Signal) @bci=8, line=35 (Interpreted frame)
 - sun.misc.Signal$1.run() @bci=8, line=195 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=662 (Interpreted frame)


Thread 30696: (state = BLOCKED)
 - java.lang.Shutdown.exit(int) @bci=96, line=168 (Interpreted frame)
 - java.lang.Terminator$1.handle(sun.misc.Signal) @bci=8, line=35 (Interpreted frame)
 - sun.misc.Signal$1.run() @bci=8, line=195 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=662 (Interpreted frame)


Thread 30695: (state = BLOCKED)
 - java.lang.Shutdown.exit(int) @bci=96, line=168 (Interpreted frame)
 - java.lang.Terminator$1.handle(sun.misc.Signal) @bci=8, line=35 (Interpreted frame)
 - sun.misc.Signal$1.run() @bci=8, line=195 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=662 (Interpreted frame)


Thread 30694: (state = BLOCKED)
 - org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(java.lang.String) @bci=9, line=154 (Interpreted frame)
 - org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(java.lang.Class) @bci=5, line=132 (Interpreted frame)
 - org.apache.commons.logging.LogFactory.getLog(java.lang.Class) @bci=4, line=272 (Interpreted frame)
 - org.apache.hadoop.hdfs.LeaseRenewer.() @bci=3, line=72 (Interpreted frame)
 - org.apache.hadoop.hdfs.DFSClient.getLeaseRenewer() @bci=9, line=575 (Interpreted frame)
 - org.apache.hadoop.hdfs.DFSClient.close() @bci=18, line=728 (Interpreted frame)
 - org.apache.hadoop.hdfs.DistributedFileSystem.close() @bci=8, line=561 (Interpreted frame)
 - org.apache.hadoop.fs.FileSystem$Cache.closeAll(boolean) @bci=114, line=2398 (Interpreted frame)
 - org.apache.hadoop.fs.FileSystem$Cache$ClientFinalizer.run() @bci=5, line=2414 (Interpreted frame)
 - org.apache.hadoop.util.ShutdownHookManager$1.run() @bci=42, line=54 (Interpreted frame)


Thread 30692: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.Thread.join(long) @bci=38, line=1186 (Interpreted frame)
 - java.lang.Thread.join() @bci=2, line=1239 (Interpreted frame)
 - java.lang.ApplicationShutdownHooks.runHooks() @bci=87, line=79 (Interpreted frame)
 - java.lang.ApplicationShutdownHooks$1.run() @bci=0, line=24 (Interpreted frame)
 - java.lang.Shutdown.runHooks() @bci=23, line=79 (Interpreted frame)
 - java.lang.Shutdown.sequence() @bci=26, line=123 (Interpreted frame)
 - java.lang.Shutdown.exit(int) @bci=96, line=168 (Interpreted frame)
 - java.lang.Terminator$1.handle(sun.misc.Signal) @bci=8, line=35 (Interpreted frame)
 - sun.misc.Signal$1.run() @bci=8, line=195 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=662 (Interpreted frame)


Thread 30691: (state = BLOCKED)
 - org.apache.log4j.Category.callAppenders(org.apache.log4j.spi.LoggingEvent) @bci=13, line=205 (Interpreted frame)
 - org.apache.log4j.Category.forcedLog(java.lang.String, org.apache.log4j.Priority, java.lang.Object, java.lang.Throwable) @bci=14, line=391 (Interpreted frame)
 - org.apache.log4j.Category.log(java.lang.String, org.apache.log4j.Priority, java.lang.Object, java.lang.Throwable) @bci=34, line=856 (Interpreted frame)
 - org.slf4j.impl.Log4jLoggerAdapter.log(org.slf4j.Marker, java.lang.String, int, java.lang.String, java.lang.Object[], java.lang.Throwable) @bci=148, line=602 (Interpreted frame)
 - org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(java.lang.Object) @bci=16, line=133 (Interpreted frame)
 - org.apache.hadoop.ipc.Client$Connection$3.run() @bci=82, line=891 (Interpreted frame)
 - java.util.concurrent.Executors$RunnableAdapter.call() @bci=4, line=441 (Interpreted frame)
 - java.util.concurrent.FutureTask$Sync.innerRun() @bci=30, line=303 (Interpreted frame)
 - java.util.concurrent.FutureTask.run() @bci=4, line=138 (Interpreted frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.runTask(java.lang.Runnable) @bci=59, line=886 (Interpreted frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=28, line=908 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=662 (Interpreted frame)


Thread 30690: (state = BLOCKED)
 - org.apache.log4j.Category.callAppenders(org.apache.log4j.spi.LoggingEvent) @bci=13, line=205 (Interpreted frame)
 - org.apache.log4j.Category.forcedLog(java.lang.String, org.apache.log4j.Priority, java.lang.Object, java.lang.Throwable) @bci=14, line=391 (Interpreted frame)
 - org.apache.log4j.Category.log(java.lang.String, org.apache.log4j.Priority, java.lang.Object, java.lang.Throwable) @bci=34, line=856 (Interpreted frame)
 - org.slf4j.impl.Log4jLoggerAdapter.log(org.slf4j.Marker, java.lang.String, int, java.lang.String, java.lang.Object[], java.lang.Throwable) @bci=148, line=602 (Interpreted frame)
 - org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(java.lang.Object) @bci=16, line=133 (Interpreted frame)
 - org.apache.hadoop.ipc.Client$Connection.run() @bci=49, line=831 (Interpreted frame)


Thread 30684: (state = BLOCKED)


Thread 30682: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=118 (Interpreted frame)
 - java.lang.ref.ReferenceQueue.remove() @bci=2, line=134 (Interpreted frame)
 - java.lang.ref.Finalizer$FinalizerThread.run() @bci=3, line=159 (Interpreted frame)


Thread 30681: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.Object.wait() @bci=2, line=485 (Interpreted frame)
 - java.lang.ref.Reference$ReferenceHandler.run() @bci=46, line=116 (Interpreted frame)


Thread 30675: (state = BLOCKED)
 - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
 - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=156 (Interpreted frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() @bci=1, line=811 (Interpreted frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int) @bci=55, line=969 (Interpreted frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int) @bci=24, line=1281 (Interpreted frame)
 - java.util.concurrent.FutureTask$Sync.innerGet() @bci=2, line=218 (Interpreted frame)
 - java.util.concurrent.FutureTask.get() @bci=4, line=83 (Interpreted frame)
 - org.apache.hadoop.ipc.Client$Connection.sendParam(org.apache.hadoop.ipc.Client$Call) @bci=79, line=913 (Interpreted frame)
 - org.apache.hadoop.ipc.Client.call(org.apache.hadoop.ipc.RPC$RpcKind, org.apache.hadoop.io.Writable, org.apache.hadoop.ipc.Client$ConnectionId) @bci=25, line=1198 (Interpreted frame)
 - org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) @bci=134, line=202 (Interpreted frame)
 - $Proxy9.getFileInfo(com.google.protobuf.RpcController, org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$GetFileInfoRequestProto) @bci=20 (Interpreted frame)
 - sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) @bci=0 (Interpreted frame)
 - sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=87, line=39 (Interpreted frame)
 - sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=25 (Interpreted frame)
 - java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=161, line=597 (Interpreted frame)
 - org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(java.lang.reflect.Method, java.lang.Object[]) @bci=18, line=164 (Interpreted frame)
 - org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) @bci=66, line=83 (Interpreted frame)
 - $Proxy9.getFileInfo(com.google.protobuf.RpcController, org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$GetFileInfoRequestProto) @bci=20 (Interpreted frame)
 - org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(java.lang.String) @bci=17, line=629 (Interpreted frame)
 - org.apache.hadoop.hdfs.DFSClient.getFileInfo(java.lang.String) @bci=9, line=1545 (Interpreted frame)
 - org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(org.apache.hadoop.fs.Path) @bci=17, line=820 (Interpreted frame)
 - org.apache.hadoop.fs.FileSystem.exists(org.apache.hadoop.fs.Path) @bci=2, line=1378 (Interpreted frame)
 - com.embracesource.edh.log4j.append.HdfsDailyRollingFileAppender.setFile(java.lang.String, boolean, boolean, int) @bci=63, line=407 (Interpreted frame)
 - org.apache.log4j.FileAppender.activateOptions() @bci=24, line=165 (Interpreted frame)
 - com.embracesource.edh.log4j.append.HdfsDailyRollingFileAppender.activateOptions() @bci=1, line=235 (Interpreted frame)
 - org.apache.log4j.config.PropertySetter.activate() @bci=17, line=307 (Interpreted frame)
 - org.apache.log4j.config.PropertySetter.setProperties(java.util.Properties, java.lang.String) @bci=438, line=172 (Interpreted frame)
 - org.apache.log4j.config.PropertySetter.setProperties(java.lang.Object, java.util.Properties, java.lang.String) @bci=10, line=104 (Interpreted frame)
 - org.apache.log4j.PropertyConfigurator.parseAppender(java.util.Properties, java.lang.String) @bci=694, line=809 (Interpreted frame)
 - org.apache.log4j.PropertyConfigurator.parseCategory(java.util.Properties, org.apache.log4j.Logger, java.lang.String, java.lang.String, java.lang.String) @bci=280, line=735 (Interpreted frame)
 - org.apache.log4j.PropertyConfigurator.configureRootCategory(java.util.Properties, org.apache.log4j.spi.LoggerRepository) @bci=63, line=615 (Interpreted frame)
 - org.apache.log4j.PropertyConfigurator.doConfigure(java.util.Properties, org.apache.log4j.spi.LoggerRepository) @bci=134, line=502 (Interpreted frame)
 - org.apache.log4j.PropertyConfigurator.doConfigure(java.net.URL, org.apache.log4j.spi.LoggerRepository) @bci=246, line=547 (Interpreted frame)
 - org.apache.log4j.helpers.OptionConverter.selectAndConfigure(java.net.URL, java.lang.String, org.apache.log4j.spi.LoggerRepository) @bci=129, line=483 (Interpreted frame)
 - org.apache.log4j.LogManager.() @bci=156, line=127 (Interpreted frame)
 - org.slf4j.impl.Log4jLoggerFactory.getLogger(java.lang.String) @bci=42, line=73 (Interpreted frame)
 - org.slf4j.LoggerFactory.getLogger(java.lang.String) @bci=6, line=253 (Interpreted frame)
 - org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(java.lang.String) @bci=28, line=156 (Interpreted frame)
 - org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(java.lang.Class) @bci=5, line=132 (Interpreted frame)
 - org.apache.commons.logging.LogFactory.getLog(java.lang.Class) @bci=4, line=272 (Interpreted frame)
 - com.embracesource.edh.log4j.append.TestLOG.() @bci=7, line=8 (Interpreted frame)
 - com.embracesource.edh.log4j.append.TestLOG.main(java.lang.String[]) @bci=4, line=11 (Interpreted frame)