[jboss-remoting-issues] [JBoss JIRA] (JBREM-1305) Maximum number of client sockets in MicroSocketClientInvoker increases after timeout waiting for a free socket
Ron Sigal (JIRA)
jira-events at lists.jboss.org
Tue Jul 24 22:00:07 EDT 2012
[ https://issues.jboss.org/browse/JBREM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ron Sigal resolved JBREM-1305.
------------------------------
Resolution: Done
Test is passing in jenkins, at least the runs that haven't crashed for external reasons.
> Maximum number of client sockets in MicroSocketClientInvoker increases after timeout waiting for a free socket
> --------------------------------------------------------------------------------------------------------------
>
> Key: JBREM-1305
> URL: https://issues.jboss.org/browse/JBREM-1305
> Project: JBoss Remoting
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: transport
> Affects Versions: 2.2.4, 2.5.4.SP3
> Environment: all
> Reporter: Torsten Neise
> Assignee: Ron Sigal
> Fix For: 2.2.4.SP1, 2.5.4.SP4
>
>
> Maximum number of client sockets in MicroSocketClientInvoker increases after timeout waiting for a free socket. This happens because of an illegal call of semaphore.release() in MicroSocketClientInvoker.transport(...) after semaphore.attempt(timeToWait) returned with false (no lock aquired) in MicroSocketClientInvoker.getConnection(...).
> public class MicroSocketClientInvoker extends RemoteClientInvoker
> {
> ...
> protected Object transport(String sessionID, Object invocation, Map metadata,
> Marshaller marshaller, UnMarshaller unmarshaller)
> throws IOException, ConnectionFailedException, ClassNotFoundException
> {
> ...
> try
> {
> socketWrapper = getConnection(marshaller, unmarshaller, timeLeft);
> }
> ...
> catch (Exception e)
> {
> // if (bailOut)
> // return null;
> semaphore.release();
> ...
> }
> ...
> }
> protected SocketWrapper getConnection(Marshaller marshaller,
> UnMarshaller unmarshaller,
> int timeAllowed)
> throws Exception
> {
> long start = System.currentTimeMillis();
> long timeToWait = (timeAllowed > 0) ? timeAllowed : 30000;
> boolean timedout = !semaphore.attempt(timeToWait);
> if (trace) log.trace(this + " obtained semaphore: " + semaphore.permits());
>
> if (timedout)
> {
> throw new IllegalStateException("Timeout waiting for a free socket");
> }
> ...
> }
> ...
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-remoting-issues
mailing list