umakanta75 / caliper

Automatically exported from code.google.com/p/caliper
Apache License 2.0
0 stars 0 forks source link

InteleavedReader error: java.io.IOException: Mark invalid #305

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using vogar, we were often seeing this exception:

    java.io.IOException: Mark invalid
        at java.io.BufferedReader.reset(BufferedReader.java:505)
        at com.google.caliper.util.InterleavedReader.read(InterleavedReader.java:93)
        at vogar.monitor.HostMonitor.followProcess(HostMonitor.java:115)
        at vogar.monitor.HostMonitor.followStream(HostMonitor.java:97)
        at vogar.tasks.RunActionTask.execute(RunActionTask.java:91)
        at vogar.tasks.Task.run(Task.java:91)
        at vogar.tasks.TaskQueue.runOneTask(TaskQueue.java:143)
        at vogar.tasks.TaskQueue.access$000(TaskQueue.java:33)
        at vogar.tasks.TaskQueue$1.run(TaskQueue.java:71)
        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:745)
  org.apache.harmony.tests.java.lang FAIL (ERROR)

After some debugging, it looks like the BufferedReader code is not properly 
working when the lookahead size is the same as the buffer size. Most probably 
due to skipping line feed character. A fix was submitted for vogar:

https://android-review.googlesource.com/#/c/122555/

Original issue reported on code.google.com by ngeoffray@google.com on 12 Jan 2015 at 4:28

GoogleCodeExporter commented 9 years ago
Looks like vogar was using InterleavedReader but it's unused in caliper itself. 
Since it's already been copied and fixed in vogar, I've just deleted it 
entirely.

Original comment by cgdecker@google.com on 12 Jan 2015 at 7:59