[jboss-remoting-issues] [JBoss JIRA] (JBREM-762) Deadlock bug in socket invoker
Ron Sigal (Closed) (JIRA)
jira-events at lists.jboss.org
Mon Nov 21 19:32:40 EST 2011
[ https://issues.jboss.org/browse/JBREM-762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ron Sigal closed JBREM-762.
---------------------------
Resolution: Out of Date
> Deadlock bug in socket invoker
> ------------------------------
>
> Key: JBREM-762
> URL: https://issues.jboss.org/browse/JBREM-762
> Project: JBoss Remoting
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: transport
> Affects Versions: 1.4.6.GA
> Environment: JBoss 4.0.4 EJB 3.0-rc9-patch1 JDK 1.6.0
> Reporter: Tim McCune
>
> There is a potential thread leak in ServerThread.java that causes ServerThreads to stick around, but to disappear from the thread pool as the accept() thread(s) see it. Eventually, when the # of leaked threads reaches the MaxPoolSize, the system ends up deadlocked and will not accept any more incoming socket connections. I have described the problem in great detail in a forum post and in support case 00016786. I have patched the code, and so far it seems to be working fine and to have fixed the problem. This is what I patched:
> In ServerThread.java, I wrapped the contents of wakeup() inside of a try/catch, block, with the following code in the catch block:
> } catch (Exception e) {
> synchronized (clientpool) {
> synchronized (threadpool) {
> clientpool.remove(this);
> threadpool.add(this);
> Thread.interrupted();
> }
> }
> throw e;
> }
> This makes sure that the thread is put back into the threadpool when an exception occurs in the createServerSocket() method (this method is doing socket I/O in 1.4.6, and in our case, this socket connection was timing out.).
--
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