| Anonymous | Login | Signup for a new account | 11-10-2026 23:31 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0005861 | [Resin] | major | always | 03-03-15 19:04 | 03-30-15 10:39 | ||||
| Reporter | cyflhn | View Status | public | ||||||
| Assigned To | ferg | ||||||||
| Priority | normal | Resolution | no change required | ||||||
| Status | closed | Product Version | 3.1.13 | ||||||
| Summary | 0005861: thread pool dead loop | ||||||||
| Description |
Thread pool dead loop often occurs especially when writing access log and the value of thread-max is not configured very high. I have checked the code. In ThreadPool.java, in method of schedule (line 481), if "poolItem"!=null and freeThreads >= freeCount, the "poolItem" will not be removed from link list headed by "_idleHead".But in line 547, method "start" of "poolItem" is invoked.So "poolItem" will become active. When "poolItem" becomes idle and returns to link list(line 702), if currently "_idleHead" points to "poolItem" itself, then _idleHead._next will point to itself. When the method "schedule" is invoked again, maybe the "poolItem" which is the current "_idleHead" is removed from link list and the poolItem._next is null(line 490). so "_idleHead" will be null forever if no other poolItems is returned to link list. Writing access log is invoked by startPriority(line 414). One thread which can not get a poolItem will block all other threads when writing access log. There is similar case in 0003509, but the problem still exists in 3.1.13. |
||||||||
| Additional Information |
Enviroment: Linux/Sun JDK 1.7.55/Resin 3.1.13 Open source Max Thread count: 256 about 10M visit one day 2cpu 4G memory |
||||||||
| Attached Files |
|
||||||||
|
|
|||||||||
| Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
32 total queries executed. 27 unique queries executed. |