[JBoss JIRA] (LOGMGR-237) (7.2.z) [LOGMGR-236] java.lang.ArrayIndexOutOfBoundsException: 76 at org.jboss.logmanager.JDKSpecific.calculateCaller(JDKSpecific.java:112)
by Bartosz Spyrko-Śmietanko (Jira)
Bartosz Spyrko-Śmietanko created LOGMGR-237:
-----------------------------------------------
Summary: (7.2.z) [LOGMGR-236] java.lang.ArrayIndexOutOfBoundsException: 76 at org.jboss.logmanager.JDKSpecific.calculateCaller(JDKSpecific.java:112)
Key: LOGMGR-237
URL: https://issues.jboss.org/browse/LOGMGR-237
Project: JBoss Log Manager
Issue Type: Bug
Reporter: Bartosz Spyrko-Śmietanko
Assignee: Bartosz Spyrko-Śmietanko
We are collecting Logs in a CDI RequestScoped bean. Afterwards we have a JAX RS filter that attaches these logs in the HTTP Warnings Header. In wildfly 12 is works great in wildfly 14 & 15 the following error happens:
{code}
08:17:16,856 WARNING [de.example.logging.cdi.HttpWarningsHeaderFilter] (default task-1) Problem during formatting warning: java.lang.ArrayIndexOutOfBoundsException: 76
at org.jboss.logmanager.JDKSpecific.calculateCaller(JDKSpecific.java:112)
at org.jboss.logmanager.ExtLogRecord.calculateCaller(ExtLogRecord.java:335)
at org.jboss.logmanager.ExtLogRecord.getSourceClassName(ExtLogRecord.java:399)
at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:143)
at de.example.logging.cdi.HttpWarningsHeaderFilter.lambda$1(HttpWarningsHeaderFilter.java:34)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at de.example.logging.cdi.HttpWarningsHeaderFilter.filter(HttpWarningsHeaderFilter.java:39)
at de.example.logging.cdi.HttpWarningsHeaderFilter$Proxy$_$$_WeldClientProxy.filter(Unknown Source)
at org.jboss.resteasy.core.interception.ContainerResponseContextImpl.filter(ContainerResponseContextImpl.java:356)
at org.jboss.resteasy.core.ServerResponseWriter.executeFilters(ServerResponseWriter.java:205)
at org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:82)
at org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:56)
at org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:528)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:459)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:229)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:135)
at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:355)
{code}
{code}
package de.example.logging.cdi;
import java.io.IOException;
import java.util.List;
import java.util.logging.Formatter;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;
import java.util.stream.Collectors;
import javax.inject.Inject;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.container.ContainerResponseFilter;
import javax.ws.rs.ext.Provider;
@Provider
public class HttpWarningsHeaderFilter implements ContainerResponseFilter {
private static Logger log = Logger.getLogger(HttpWarningsHeaderFilter.class.getName());
private static final Formatter simpleFormatter = new SimpleFormatter();
@Inject
Logs logs;
@Override
public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)
throws IOException {
List<String> logStrings = logs.getLogRecords().stream()
// only output INFO or more important warnings (SERVERE, WARNING)
.filter(lr -> lr.getLevel().intValue() >= Level.INFO.intValue()).map(lr -> {
try {
return simpleFormatter.format(lr);
} catch (Exception e) {
log.log(Level.WARNING, "Problem during formatting warning", e);
return lr.getMessage();
}
}).collect(Collectors.toList());
responseContext.getHeaders().add("Warnings", logStrings);
}
}
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (WFLY-11682) Clustered SLSB membership anomalies when all cluster members removed
by Richard Achmatowicz (Jira)
[ https://issues.jboss.org/browse/WFLY-11682?page=com.atlassian.jira.plugin... ]
Richard Achmatowicz commented on WFLY-11682:
--------------------------------------------
Managed to recreate the error with Jorg's reproducer.
It looks as though nodes which are kicked out of the cluster do not get a chance to send updates to the client before being kicked out. So the last node to leave has no opportunity to advise the client of its leaving. Which is why the client believes the last node to leave is still alive.
The server side code has changed a lot due to the new EJBClient/Elytron/Remoting implementation, and some EJB client related features which did appear there (in VersionOneChannelProtocolHandler) were not ported over (to AssociationImpl); specifically EJB client related responses to suspend and resume. These should be added back in.
This is one place where it would be possible to send a notification to a client if the last node was going down (set a flag indicating we are the last node and we are being suspended; if the server is not resumed, use the flag to send a message before the EJBServerChannel connections to the clients are shut down).
> Clustered SLSB membership anomalies when all cluster members removed
> --------------------------------------------------------------------
>
> Key: WFLY-11682
> URL: https://issues.jboss.org/browse/WFLY-11682
> Project: WildFly
> Issue Type: Bug
> Components: Clustering, EJB
> Affects Versions: 15.0.1.Final
> Environment: WildFly running in an n-node cluster with an EJB client sending requests even during the time the cluster is down.
> Reporter: Jörg Bäsner
> Assignee: Richard Achmatowicz
> Priority: Major
> Attachments: playground.zip
>
>
> This description will be based on a 3 node cluster. Cluster node 1 and 2 are configured in the {{PROVIDER_URL}}, node 3 is not.
> The client has a custom ClusterNodeSelector implementation that is printing the {{connectedNodes}} and the {{availableNodes}} and doing a random balancing.
> As long as all nodes are up and running the client is calling EJBs in a balanced way.
> When node1 is shut down, the client get the notification below:
> {code}...
> DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received MODULE_UNAVAILABLE(9) message for module /playground
> DEBUG (XNIO-1 task-4) [org.jboss.ejb.client.invocation] Received MODULE_UNAVAILABLE(9) message for module /playground
> DEBUG (XNIO-1 task-4) [org.jboss.ejb.client.invocation] Received MODULE_UNAVAILABLE(9) message for module /playground
> DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received MODULE_UNAVAILABLE(9) message for module /playground
> DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY_NODE_REMOVAL(18) message for (cluster, node) = (ejb, node1)
> DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY_NODE_REMOVAL(18) message for (cluster, node) = (ejb, node1)
> ...
> {code}
> Then node2 is shut down. Again the client get the information, see:
> {code}
> ...
> DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received MODULE_UNAVAILABLE(9) message for module /playground
> DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received MODULE_UNAVAILABLE(9) message for module /playground
> DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received CLUSTER_TOPOLOGY_NODE_REMOVAL(18) message for (cluster, node) = (ejb, node2)
> ...
> {code}
> Finally node3 is being shut down. Now the client only get the following information:
> {code}
> ...
> DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received MODULE_UNAVAILABLE(9) message for module /playground
> DEBUG (XNIO-1 task-1) [org.jboss.ejb.client.invocation] Received MODULE_UNAVAILABLE(9) message for module /playground
> ...
> {code}
> This mean the _node3_ is not being informed about the fact that the last node of the cluster has been stopped.
> From this point on the client is always getting {{Caused by: java.net.ConnectException: Connection refused}}
> Now node1 is started again, resulting in the following output for {{connectedNodes}} and the {{availableNodes}}:
> {code}
> ...
> INFO (ThreadPoolTaskExecutor-1) [com.jboss.examples.ejb.CustomClusterNodeSelector] connectedNodes(1) '[node1]', availableNodes(2) '[node3, node1]'
> ...
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months
[JBoss JIRA] (WFLY-11688) Update subsystem tests and mixed domain tests to use EAP 7.2.0 rather than WF14
by Kabir Khan (Jira)
[ https://issues.jboss.org/browse/WFLY-11688?page=com.atlassian.jira.plugin... ]
Kabir Khan updated WFLY-11688:
------------------------------
Summary: Update subsystem tests and mixed domain tests to use EAP 7.2.0 rather than WF14 (was: Update subsystem tests to use EAP 7.2.0 rather than WF14)
> Update subsystem tests and mixed domain tests to use EAP 7.2.0 rather than WF14
> -------------------------------------------------------------------------------
>
> Key: WFLY-11688
> URL: https://issues.jboss.org/browse/WFLY-11688
> Project: WildFly
> Issue Type: Task
> Components: Management
> Reporter: Kabir Khan
> Assignee: Kabir Khan
> Priority: Blocker
> Labels: blocker-WF16
>
> Once EAP 7.2.0 is out, remove ModelTestControllerVersion.EAP_7_2_0_TMP and add EAP_7_2_0 proper, and go through and adjust all the tests using the tmp version. I think this is ok, as there are some more advances subsystem tests which specify additional maven artifacts. Those maven artifacts will need to be updated to use the proper EAP 7.2.0 artifacts once it is released, and having to do this replacement will serve as a reminder.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 8 months