intel-cloud / cosbench

a benchmark tool for cloud object storage service
Other
573 stars 242 forks source link

ArrayIndexOutOfBoundsException with counter stats #264

Open zoran-rajic opened 9 years ago

zoran-rajic commented 9 years ago

Even when using the NTP-synchronized Controller/Driver servers, the margin of error for NTP may be in tenths of milliseconds.

When recording a fast operation that will have (operation-duration < ntp-time-difference), a negative value may be passed into the Counter.doAdd(), which completely breaks the Controller/Driver communication with the following exception:

2015-03-18 04:05:57,240 [ERROR] [AbstractAgent] - unexpected exception java.lang.ArrayIndexOutOfBoundsException: -136 at com.intel.cosbench.bench.Counter.doAdd(Counter.java:65) at com.intel.cosbench.driver.model.OperatorContext.doAddSample(OperatorContext.java:76) at com.intel.cosbench.driver.model.OperatorContext.addSample(OperatorContext.java:70) at com.intel.cosbench.driver.agent.WorkAgent.onSampleCreated(WorkAgent.java:211) at com.intel.cosbench.driver.operator.Reader.operate(Reader.java:70) at com.intel.cosbench.driver.operator.AbstractOperator.operate(AbstractOperator.java:76) at com.intel.cosbench.driver.agent.WorkAgent.performOperation(WorkAgent.java:197) at com.intel.cosbench.driver.agent.WorkAgent.doWork(WorkAgent.java:177) at com.intel.cosbench.driver.agent.WorkAgent.execute(WorkAgent.java:134) at com.intel.cosbench.driver.agent.AbstractAgent.call(AbstractAgent.java:44) at com.intel.cosbench.driver.agent.AbstractAgent.call(AbstractAgent.java:1) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)

I think I created a pull-request @ https://github.com/intel-cloud/cosbench/commit/a2c9328c0504f6c7f4923719b37c1de485c47c0e with the fix for this issue, but I can't find it in the list of pull-requests for this GitHub project. (original fix over at https://github.com/zoran-rajic/cosbench/commit/a2c9328c0504f6c7f4923719b37c1de485c47c0e)

Cheers, Zoran

zoran-rajic commented 9 years ago

Possible duplicate of https://github.com/intel-cloud/cosbench/issues/206