[
https://issues.redhat.com/browse/WFCORE-5146?page=com.atlassian.jira.plug...
]
Katarína Hermanová updated WFCORE-5146:
---------------------------------------
Description:
WFLYPRT0057 message may or may not be output.
This message is output if an AsyncTaskRunner runable thread is not
null(_ManagementRequestContextImpl.java:139_).
{code:java|title=org/jboss.as/protocol/mgmt/ManagementRequestContextImpl.java}
126 private abstract static class AsyncTaskRunner implements Runnable, Cancellable {
--- snip ---
135 @Override
136 public Cancellable cancel() {
137 if (cancellable && cancelled.compareAndSet(false, true)) {
138 final Thread thread = this.thread;
139 if(thread != null) {
140 thread.interrupt();
141
ProtocolLogger.ROOT_LOGGER.cancelledAsyncTask(getClass().getSimpleName(), thread);
142 }
143 }
144 return this;
145 }
--- snip ---
152 @Override
153 public void run() {
154 if (cancellable && cancelled.get()) {
155 Thread.currentThread().interrupt();
156
ProtocolLogger.ROOT_LOGGER.cancelledAsyncTaskBeforeRun(getClass().getSimpleName());
157 }
158 this.thread = Thread.currentThread();
159 try {
160 doExecute();
161 } finally {
162 this.thread = null;
163 }
164 }
{code}
The process is working on multi thread, so the WFLYPRT0057 message is output by race
condition of null thread handling(_ManagementRequestContextImpl.java:162_).
This is just a timing, we cannot determine the need for this message.
{noformat}
- Thread dump
"management task-2" #139 prio=5 os_prio=0 tid=0x0000562c38351800 nid=0x3626 at
breakpoint[0x00007facf3098000]
java.lang.Thread.State: RUNNABLE
at
org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.cancel(ManagementRequestContextImpl.java:141)
at
org.jboss.as.protocol.mgmt.ActiveOperationImpl.asyncCancel(ActiveOperationImpl.java:150)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler.cancelAllActiveOperations(AbstractMessageHandler.java:441)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler.shutdownNow(AbstractMessageHandler.java:150)
at
org.jboss.as.remoting.AbstractChannelOpenListenerService$2.handleClose(AbstractChannelOpenListenerService.java:181)
at
org.jboss.as.remoting.AbstractChannelOpenListenerService$2.handleClose(AbstractChannelOpenListenerService.java:178)
at org.jboss.remoting3.spi.SpiUtils.safeHandleClose(SpiUtils.java:50)
at
org.jboss.remoting3.spi.AbstractHandleableCloseable$CloseHandlerTask.run(AbstractHandleableCloseable.java:520)
at
org.jboss.remoting3.spi.AbstractHandleableCloseable.runCloseTask(AbstractHandleableCloseable.java:425)
at
org.jboss.remoting3.spi.AbstractHandleableCloseable.closeComplete(AbstractHandleableCloseable.java:286)
at
org.jboss.remoting3.remote.RemoteConnectionChannel.closeAction(RemoteConnectionChannel.java:508)
at
org.jboss.remoting3.spi.AbstractHandleableCloseable.close(AbstractHandleableCloseable.java:150)
at
org.jboss.as.protocol.mgmt.ManagementChannelReceiver.handleEnd(ManagementChannelReceiver.java:129)
at
org.jboss.remoting3.remote.RemoteConnectionChannel.lambda$notifyEnd$0(RemoteConnectionChannel.java:273)
at org.jboss.remoting3.remote.RemoteConnectionChannel$$Lambda$737/243506564.run(Unknown
Source)
at
org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:991)
at org.jboss.remoting3.EndpointImpl$TrackingExecutor$$Lambda$720/801134859.run(Unknown
Source)
at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
"management-handler-thread - 3" #145 prio=5 os_prio=0 tid=0x0000562c38d5b000
nid=0x3b80 at breakpoint[0x00007facf416f000]
java.lang.Thread.State: RUNNABLE
at
org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:162)
at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
- log
09:45:24,686 INFO [org.jboss.as.protocol] (management task-2) WFLYPRT0057: cancelled
task by interrupting thread Thread[management-handler-thread -
3,5,management-handler-thread]{noformat}
was:
WFLYPRT0057 message may or may not be output.
This message is output if an AsyncTaskRunner runable thread is not
null(_ManagementRequestContextImpl.java:139_).
{code:java|title=org/jboss.as/protocol/mgmt/ManagementRequestContextImpl.java}
126 private abstract static class AsyncTaskRunner implements Runnable, Cancellable {
--- snip ---
135 @Override
136 public Cancellable cancel() {
137 if (cancellable && cancelled.compareAndSet(false, true)) {
138 final Thread thread = this.thread;
139 if(thread != null) {
140 thread.interrupt();
141
ProtocolLogger.ROOT_LOGGER.cancelledAsyncTask(getClass().getSimpleName(), thread);
142 }
143 }
144 return this;
145 }
--- snip ---
152 @Override
153 public void run() {
154 if (cancellable && cancelled.get()) {
155 Thread.currentThread().interrupt();
156
ProtocolLogger.ROOT_LOGGER.cancelledAsyncTaskBeforeRun(getClass().getSimpleName());
157 }
158 this.thread = Thread.currentThread();
159 try {
160 doExecute();
161 } finally {
162 this.thread = null;
163 }
164 }
{code}
The process is working on multi thread, so the WFLYPRT0057 message is output by race
condition of null thread handling(_ManagementRequestContextImpl.java:162_).
This is just a timing, we cannot determine the need for this message.
WFLYPRT0057 message handling improvement
----------------------------------------
Key: WFCORE-5146
URL:
https://issues.redhat.com/browse/WFCORE-5146
Project: WildFly Core
Issue Type: Enhancement
Components: CLI, Management, Remoting
Reporter: Katarína Hermanová
Assignee: Katarína Hermanová
Priority: Major
WFLYPRT0057 message may or may not be output.
This message is output if an AsyncTaskRunner runable thread is not
null(_ManagementRequestContextImpl.java:139_).
{code:java|title=org/jboss.as/protocol/mgmt/ManagementRequestContextImpl.java}
126 private abstract static class AsyncTaskRunner implements Runnable, Cancellable {
--- snip ---
135 @Override
136 public Cancellable cancel() {
137 if (cancellable && cancelled.compareAndSet(false, true)) {
138 final Thread thread = this.thread;
139 if(thread != null) {
140 thread.interrupt();
141
ProtocolLogger.ROOT_LOGGER.cancelledAsyncTask(getClass().getSimpleName(), thread);
142 }
143 }
144 return this;
145 }
--- snip ---
152 @Override
153 public void run() {
154 if (cancellable && cancelled.get()) {
155 Thread.currentThread().interrupt();
156
ProtocolLogger.ROOT_LOGGER.cancelledAsyncTaskBeforeRun(getClass().getSimpleName());
157 }
158 this.thread = Thread.currentThread();
159 try {
160 doExecute();
161 } finally {
162 this.thread = null;
163 }
164 }
{code}
The process is working on multi thread, so the WFLYPRT0057 message is output by race
condition of null thread handling(_ManagementRequestContextImpl.java:162_).
This is just a timing, we cannot determine the need for this message.
{noformat}
- Thread dump
"management task-2" #139 prio=5 os_prio=0 tid=0x0000562c38351800 nid=0x3626 at
breakpoint[0x00007facf3098000]
java.lang.Thread.State: RUNNABLE
at
org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.cancel(ManagementRequestContextImpl.java:141)
at
org.jboss.as.protocol.mgmt.ActiveOperationImpl.asyncCancel(ActiveOperationImpl.java:150)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler.cancelAllActiveOperations(AbstractMessageHandler.java:441)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler.shutdownNow(AbstractMessageHandler.java:150)
at
org.jboss.as.remoting.AbstractChannelOpenListenerService$2.handleClose(AbstractChannelOpenListenerService.java:181)
at
org.jboss.as.remoting.AbstractChannelOpenListenerService$2.handleClose(AbstractChannelOpenListenerService.java:178)
at org.jboss.remoting3.spi.SpiUtils.safeHandleClose(SpiUtils.java:50)
at
org.jboss.remoting3.spi.AbstractHandleableCloseable$CloseHandlerTask.run(AbstractHandleableCloseable.java:520)
at
org.jboss.remoting3.spi.AbstractHandleableCloseable.runCloseTask(AbstractHandleableCloseable.java:425)
at
org.jboss.remoting3.spi.AbstractHandleableCloseable.closeComplete(AbstractHandleableCloseable.java:286)
at
org.jboss.remoting3.remote.RemoteConnectionChannel.closeAction(RemoteConnectionChannel.java:508)
at
org.jboss.remoting3.spi.AbstractHandleableCloseable.close(AbstractHandleableCloseable.java:150)
at
org.jboss.as.protocol.mgmt.ManagementChannelReceiver.handleEnd(ManagementChannelReceiver.java:129)
at
org.jboss.remoting3.remote.RemoteConnectionChannel.lambda$notifyEnd$0(RemoteConnectionChannel.java:273)
at org.jboss.remoting3.remote.RemoteConnectionChannel$$Lambda$737/243506564.run(Unknown
Source)
at
org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:991)
at org.jboss.remoting3.EndpointImpl$TrackingExecutor$$Lambda$720/801134859.run(Unknown
Source)
at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
"management-handler-thread - 3" #145 prio=5 os_prio=0 tid=0x0000562c38d5b000
nid=0x3b80 at breakpoint[0x00007facf416f000]
java.lang.Thread.State: RUNNABLE
at
org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:162)
at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
- log
09:45:24,686 INFO [org.jboss.as.protocol] (management task-2) WFLYPRT0057: cancelled
task by interrupting thread Thread[management-handler-thread -
3,5,management-handler-thread]{noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)