![]() |
|
|
|
|
Issue Type:
|
Bug
|
|
Assignee:
|
Unassigned |
|
Components:
|
support-core |
|
Created:
|
04/Dec/13 2:26 AM
|
|
Description:
|
This issue is essentially identical to JENKINS-9120, where an integer gets incremented but never decremented. After a large number of calls, the integer overflows.
SEVERE: Error within request handler thread
java.lang.ArrayIndexOutOfBoundsException: -255
at com.cloudbees.jenkins.support.SupportLogHandler.publish(SupportLogHandler.java:106)
at java.util.logging.Logger.log(Logger.java:570)
at java.util.logging.Logger.doLog(Logger.java:592)
at java.util.logging.Logger.log(Logger.java:681)
at winstone.Logger.logInternal(Logger.java:157)
at winstone.Logger.log(Logger.java:183)
at winstone.HttpListener.allocateRequestResponse(HttpListener.java:182)
at winstone.RequestHandlerThread.run(RequestHandlerThread.java:69)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
The problem is here in SupportLogHandler's publish method:
int maxCount = records.length;
records[(position + count) % maxCount] = record;
if (count == maxCount) {
position++;
} else {
count++;
}
Once count is equal to maxCount, count will never be incremented. However, position will be incremented indefinitely from then on. Position should instead be set to something like this:
position = (position + 1) % maxCount;
|
|
Project:
|
Jenkins
|
|
Priority:
|
Major
|
|
Reporter:
|
Josh Gibbs
|
|
|
|
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
|
--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[email protected].
For more options, visit
https://groups.google.com/groups/opt_out.