ASF Bugzilla – Attachment 25225 Details for
Bug 48843
Tomcat Acceptor Thread goes into wait() and it will never come back
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
2010-04-02_tc6_bug48843.patch
2010-04-02_tc6_bug48843.patch (text/plain), 3.26 KB, created by
Konstantin Kolinko
on 2010-04-02 15:41:21 UTC
(
hide
)
Description:
2010-04-02_tc6_bug48843.patch
Filename:
MIME Type:
Creator:
Konstantin Kolinko
Created:
2010-04-02 15:41:21 UTC
Size:
3.26 KB
patch
obsolete
>Index: java/org/apache/tomcat/util/net/AprEndpoint.java >=================================================================== >--- java/org/apache/tomcat/util/net/AprEndpoint.java (revision 929912) >+++ java/org/apache/tomcat/util/net/AprEndpoint.java (working copy) >@@ -1017,18 +1017,17 @@ > */ > protected Worker getWorkerThread() { > // Allocate a new worker thread >- Worker workerThread = createWorkerThread(); >- while (workerThread == null) { >- try { >- synchronized (workers) { >+ synchronized (workers) { >+ Worker workerThread; >+ while ((workerThread = createWorkerThread()) == null) { >+ try { > workers.wait(); >+ } catch (InterruptedException e) { >+ // Ignore > } >- } catch (InterruptedException e) { >- // Ignore > } >- workerThread = createWorkerThread(); >+ return workerThread; > } >- return workerThread; > } > > >Index: java/org/apache/tomcat/util/net/JIoEndpoint.java >=================================================================== >--- java/org/apache/tomcat/util/net/JIoEndpoint.java (revision 929912) >+++ java/org/apache/tomcat/util/net/JIoEndpoint.java (working copy) >@@ -752,18 +752,17 @@ > */ > protected Worker getWorkerThread() { > // Allocate a new worker thread >- Worker workerThread = createWorkerThread(); >- while (workerThread == null) { >- try { >- synchronized (workers) { >+ synchronized (workers) { >+ Worker workerThread; >+ while ((workerThread = createWorkerThread()) == null) { >+ try { > workers.wait(); >+ } catch (InterruptedException e) { >+ // Ignore > } >- } catch (InterruptedException e) { >- // Ignore > } >- workerThread = createWorkerThread(); >+ return workerThread; > } >- return workerThread; > } > > >Index: java/org/apache/tomcat/util/net/NioEndpoint.java >=================================================================== >--- java/org/apache/tomcat/util/net/NioEndpoint.java (revision 929912) >+++ java/org/apache/tomcat/util/net/NioEndpoint.java (working copy) >@@ -1218,19 +1218,17 @@ > */ > protected Worker getWorkerThread() { > // Allocate a new worker thread >- Worker workerThread = createWorkerThread(); >- while (workerThread == null) { >- try { >- synchronized (workers) { >- workerThread = createWorkerThread(); >- if ( workerThread == null ) workers.wait(); >+ synchronized (workers) { >+ Worker workerThread; >+ while ((workerThread = createWorkerThread()) == null) { >+ try { >+ workers.wait(); >+ } catch (InterruptedException e) { >+ // Ignore > } >- } catch (InterruptedException e) { >- // Ignore > } >- if ( workerThread == null ) workerThread = createWorkerThread(); >+ return workerThread; > } >- return workerThread; > } > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 48843
: 25225 |
25226
|
25529