[JBoss JIRA] Created: (JGRP-457) Optimization: make threads return immediately if NAKACK has another active thread for the same sender
by Bela Ban (JIRA)
Optimization: make threads return immediately if NAKACK has another active thread for the same sender
-----------------------------------------------------------------------------------------------------
Key: JGRP-457
URL: http://jira.jboss.com/jira/browse/JGRP-457
Project: JGroups
Issue Type: Feature Request
Reporter: Bela Ban
Assigned To: Bela Ban
Priority: Minor
Fix For: 2.5
In NAKACK, when a thread places a message for sender S into the NakReceiverWindow NRW, it subsequently acquires a lock on NRW (lock by sender) and removes as many messages as possible and passes them up.
If many threads do this at the same time, all threads but one are blocked, and - when finally unblocked - usually return. This causes context switches and possibly cache flushing, so a better way would be to have the threads check whether another thread is already removing messages using a CAS operation *before* acquiring the lock.
The effect should be that no threads will wait on the lock unnecessarily, and thus fewer context switches, and more threads available to the pool.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
2 days, 11 hours
[JBoss JIRA] (AS7-5746) Webapp's ENC destroyed before ServletContextListener invoked
by Philippe Marschall (JIRA)
Philippe Marschall created AS7-5746:
---------------------------------------
Summary: Webapp's ENC destroyed before ServletContextListener invoked
Key: AS7-5746
URL: https://issues.jboss.org/browse/AS7-5746
Project: Application Server 7
Issue Type: Bug
Components: Naming, Web
Affects Versions: 7.1.1.Final
Reporter: Philippe Marschall
Assignee: Eduardo Martins
It looks as if when {{javax.servlet.ServletContextListener#contextDestroyed(ServletContextEvent)}} is invoked the naming service / context has already been shut down.
Consider the following class
{code}
public class BindingListener implements ServletContextListener {
private static final Logger LOG = Logger.getLogger("binding-listener");
private static final String NAME = "java:global/env/foo";
private static final String VALUE = "FOO";
@Override
public void contextInitialized(ServletContextEvent sce) {
LOG.info("contextInitialized");
try {
Context context = new InitialContext();
context.rebind(NAME, VALUE);
} catch (NamingException e) {
LOG.log(Level.SEVERE, "could not bind value", e);
}
}
@Override
public void contextDestroyed(ServletContextEvent sce) {
LOG.info("contextDestroyed");
try {
Context context = new InitialContext();
context.unbind(NAME);
} catch (NamingException e) {
LOG.log(Level.SEVERE, "could not unbind value", e);
}
}
}
{code}
This results in the following exception when shutting down the container.
{code}
00:50:51,171 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/context-listener-0.1.0-SNAPSHOT]] (MSC service thread 1-3) JBWEB000306: Exception sending context destroyed event to listener instance of class com.github.marschall.BindingListener: java.lang.IllegalArgumentException: JBAS011857: NamingStore is null
at org.jboss.as.naming.NamingContext.<init>(NamingContext.java:151)
at org.jboss.as.naming.NamingContext.<init>(NamingContext.java:124)
at org.jboss.as.naming.InitialContext.<init>(InitialContext.java:86)
at org.jboss.as.naming.InitialContextFactory.getInitialContext(InitialContextFactory.java:44)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684) [rt.jar:1.8.0-ea]
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:311) [rt.jar:1.8.0-ea]
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:339) [rt.jar:1.8.0-ea]
at javax.naming.InitialContext.unbind(InitialContext.java:439) [rt.jar:1.8.0-ea]
at com.github.marschall.BindingListener.contextDestroyed(BindingListener.java:41) [classes:]
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3419) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3912) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at org.jboss.as.web.deployment.WebDeploymentService.stop(WebDeploymentService.java:118) [jboss-as-web-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911)
at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.8.0-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.8.0-ea]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.8.0-ea]
{code}
This seems to be a reappearance of JBAS-672.
See also this Stackoverflow thread
http://stackoverflow.com/questions/12497538/jndi-lookup-in-servletcontext...
I would provide a patch/pull request if somebody can point me in the right direction.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (AS7-5967) RemoteNamingTestCase intermittently fails on IBM JDK due to org.jboss.remoting3.NotOpenException: Endpoint is not open
by Ivo Studensky (JIRA)
Ivo Studensky created AS7-5967:
----------------------------------
Summary: RemoteNamingTestCase intermittently fails on IBM JDK due to org.jboss.remoting3.NotOpenException: Endpoint is not open
Key: AS7-5967
URL: https://issues.jboss.org/browse/AS7-5967
Project: Application Server 7
Issue Type: Feature Request
Components: Test Suite
Affects Versions: 7.1.3.Final (EAP)
Environment: IBM JDK 6
IBM JDK 7
Reporter: Ivo Studensky
Assignee: Ivo Studensky
RemoteNamingTestCase intermittently fails when running on IBM JDK. According to logs the remoting channel had been closed before the endpoint tried to connect to it. Unfortunately, when I was trying to debug this issue the tests always nicely passed.
test.log snippet:
{noformat}
13:16:31,115 DEBUG [org.xnio.nio] (Remoting "config-based-naming-client-endpoint" read-1) Started channel thread 'Remoting "config-based-naming-client-endpoint" read-1', selector sun.nio.ch.EPollSelectorImpl@345642e1
13:16:31,115 DEBUG [org.xnio.nio] (Remoting "config-based-naming-client-endpoint" write-1) Started channel thread 'Remoting "config-based-naming-client-endpoint" write-1', selector sun.nio.ch.EPollSelectorImpl@1dc68cf2
13:16:31,121 DEBUG [org.jboss.naming.remote.client.InitialContextFactory] (main) jboss.naming.client.connect.options. has the following options {org.xnio.Options.SASL_POLICY_NOPLAINTEXT=>false}
13:16:31,191 ERROR [org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1] (Remoting "config-based-naming-client-endpoint" task-1) Channel end notification received, closing channel Channel ID d1f17196 (outbound) of Remoting connection fd3dcedc to /127.0.0.1:4447
13:16:31,204 DEBUG [org.jboss.naming.remote.client.HaRemoteNamingStore] (main) Failed to connect to server remote://127.0.0.1:4447: org.jboss.remoting3.NotOpenException: Endpoint is not open
at org.jboss.remoting3.EndpointImpl.resourceUntick(EndpointImpl.java:182)
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:261)
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:251)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:349)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:333)
at org.jboss.naming.remote.client.EndpointCache$EndpointWrapper.connect(EndpointCache.java:105)
at org.jboss.naming.remote.client.HaRemoteNamingStore.failOverSequence(HaRemoteNamingStore.java:179)
at org.jboss.naming.remote.client.HaRemoteNamingStore.namingOperation(HaRemoteNamingStore.java:117)
at org.jboss.naming.remote.client.HaRemoteNamingStore.lookup(HaRemoteNamingStore.java:223)
at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:79)
at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:83)
at javax.naming.InitialContext.lookup(InitialContext.java:422)
at org.jboss.as.test.integration.naming.remote.simple.RemoteNamingTestCase.testRemoteLookup(RemoteNamingTestCase.java:74)
{noformat}
server.log snippet:
{noformat}
13:16:31,025 INFO [org.jboss.as.server] (management-handler-thread - 3) JBAS018559: Deployed "test.jar"
13:16:31,163 DEBUG [org.jboss.naming.remote.server.RemoteNamingService] (Remoting "thinkpax" task-3) Channel Opened - Channel ID 51f17196 (inbound) of Remoting connection b9da2788 to /127.0.0.1:46866
13:16:31,176 DEBUG [org.jboss.naming.remote.server.RemoteNamingService] (Remoting "thinkpax" task-4) Chosen version 0x01
13:16:31,189 DEBUG [org.jboss.naming.remote.server.RemoteNamingService] (Remoting "thinkpax" read-1) Channel Channel ID 51f17196 (inbound) of Remoting connection b9da2788 to /127.0.0.1:46866 closed.
13:16:31,193 INFO [org.jboss.as.naming] (Remoting "thinkpax" task-1) JBAS011806: Channel end notification received, closing channel Channel ID 51f17196 (inbound) of Remoting connection b9da2788 to null
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (AS7-6035) Improper use of OperationContext.restartRequired()
by Brian Stansberry (JIRA)
Brian Stansberry created AS7-6035:
-------------------------------------
Summary: Improper use of OperationContext.restartRequired()
Key: AS7-6035
URL: https://issues.jboss.org/browse/AS7-6035
Project: Application Server 7
Issue Type: Bug
Components: Domain Management
Affects Versions: 7.1.3.Final (EAP)
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: 7.2.0.Alpha1
Look or an fix uses of OperationContext.restartRequired() that should be using reloadRequired(). There are very few reasons why a full process restart should be needed for a configuration model change to take effect. Typically a full process restart would only be needed for a domain mode server whose JVM configuration settings have been changed in the host model.
Running "git grep restartRequired()" shows the following suspicious uses:
logging/src/main/java/org/jboss/as/logging/HandlerOperations.java: context.restartRequired();
logging/src/main/java/org/jboss/as/logging/HandlerOperations.java: context.restartRequired();
server/src/main/java/org/jboss/as/server/operations/ServerRestartRequiredHandler.java: context.restartRequired();
webservices/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java: context.restartRequired();
webservices/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigRemove.java: context.restartRequired();
webservices/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java: context.restartRequired();
webservices/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigRemove.java: context.restartRequired();
webservices/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerAdd.java: context.restartRequired();
webservices/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerChainAdd.java: context.restartRequired();
webservices/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerChainRemove.java: context.restartRequired();
webservices/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerRemove.java: context.restartRequired();
webservices/server-integration/src/main/java/org/jboss/as/webservices/dmr/PropertyAdd.java: context.restartRequired();
webservices/server-integration/src/main/java/org/jboss/as/webservices/dmr/PropertyRemove.java: context.restartRequired();
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (AS7-6036) WorkManager HintsContext.LONGRUNNING_HINT Treatment Not Spec Compliant
by jim_b_o (JIRA)
jim_b_o created AS7-6036:
----------------------------
Summary: WorkManager HintsContext.LONGRUNNING_HINT Treatment Not Spec Compliant
Key: AS7-6036
URL: https://issues.jboss.org/browse/AS7-6036
Project: Application Server 7
Issue Type: Bug
Components: JCA
Affects Versions: 7.1.3.Final (EAP)
Reporter: jim_b_o
Assignee: Jesper Pedersen
Spec says the value must be true or false...
11.6.1.2 Long-running Work instance Hint
The resource adapter may use the String javax.resource.LongRunning, defined as a constant in HintsContext.LONGRUNNING_HINT, as the hintName to indicate that a Work instance might run for a long period of time (typically lasting throughout the lifecycle of the resource adapter instance) compared to regular tasks that have a shorter execution lifecycle. The value of the hint must be a valid boolean value (true or false).
However the code simply checks for existence...
67 HintsContext hc = (HintsContext) wc;
68 if (hc.getHints().containsKey(HintsContext.LONGRUNNING_HINT))
69 {
70 isLongRunning = true;
71 found = true;
72 }
Hence if 'false' is provided, the wrong outcome will result.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months