Hi Shay,
Thanks for your quick answer. I did a test with debug run as you
suggested, I don't know what you mean by "exception breakpoint", but
when the exception fires the debugger shows the class:
ThreadPoolExecutor$Worker
public void run() {
try {
Runnable task = firstTask;
firstTask = null;
while (task != null || (task = getTask()) != null) {
runTask(task);
task = null;
}
} finally {
workerDone(this);
}
}
line 911
Not very helpful, and all the values in the trace are null or empty,
except backtrace (again I don't know what is that):
StackOverflowError
backtrace = [139779368723408, 139779481643694, 139779446576800,
139779481643666, 139779471734800, 139779478653446, 139779368723408,
139779481643698, 139779446576800, 139779481643666, 139779471734800,
139779478653446, 139779368723408, 139779481643698, 139779446576800,
139779481643666, 139779471734800, 139779478653446, 139779368723408,
139779481643698, 139779446576800, 139779481643666, 139779471734800,
139779478653446, 139779368723408, 139779481643698, 139779446576800,
139779481643666, 139779471734800, 139779478653446, 139779368723408,
139779481643698, 139779446576800, 139779481643666, 139779471734800,
139779478653446, 139779368723408, 139779481643698, 139779446576800,
139779481643666, 139779471734800, 139779478653446, 139779368723408,
139779481643698, 139779446576800, 139779481643666, 139779471734800,
139779478653446, 139779368723408, 139779481643698, 139779446576800,
139779481643666, 139779471734800, 139779478653446, 139779368723408,
139779481643698, 139779446576800, 139779481643666, 139779471734800,
139779478653446, 139779368723408, 139779481643698, 139779446576800,
139779481643666]
The logs again are:
Exception in thread "elasticsearch[Portal][tp]-pool-1-thread-1"
java.lang.StackOverflowError
Exception in thread "elasticsearch[Portal][tp]-pool-1-thread-2"
java.lang.StackOverflowError
Exception in thread "elasticsearch[Portal][tp]-pool-1-thread-3"
java.lang.StackOverflowError
Exception in thread "elasticsearch[Portal][tp]-pool-1-thread-4"
java.lang.StackOverflowError
Exception in thread "elasticsearch[Portal][tp]-pool-1-thread-5"
java.lang.StackOverflowError
Exception in thread "elasticsearch[Portal]clusterService#updateTask-
pool-5-thread-1" java.lang.StackOverflowError
I am seeing 5 threads again, but in my configuration I have 6 for
scheduled size, and 2-10 for min-max, any idea of where 5 comes from?
what's "tp" pool?
I had to run it like 10 times, but it eventually happened. I am
running Linux Ubuntu Maverick, standard JRockit configuration (no
stack memory messing around), in an AMD X2, (2 cores).
I will try changing JRockit to Sun's, any other idea is more than
welcomed. Nevertheless I am not inclined to think it's the cause, it's
more likely some classloading, constructors, or something like that
race condition.
Regarding Guice, I can't get rid of it that easily, maybe I could just
use your embedded Guice in elasticsearch (removing google's import in
favor of yours), for a quick test if you think it's useful.
Thanks,
Sebastian.
On Nov 6, 4:19 pm, Shay Banon shay.ba...@elasticsearch.com wrote:
Hi,
Strange... . Usually a stack overflow exception also includes the stack
trace up to where it happens. I can guess of several reason why this might
happen:
- Using jrockit? Can you try and run it with openjdk / sun jdk?
- elasticsearch jarjar guice, maybe the fact that Guice is also used messes
it up?
If you can get to the stack trace of why this happens, it would be much
simpler to analyze it. Maybe you can debug run it, and have an exception
breakpoint on StackOverflowException?
-shay.banon
On Sat, Nov 6, 2010 at 8:32 PM, Sebastian sgavar...@gmail.com wrote:
Hi all,
I am using ES 0.12.1, java api, local gw, JRockit 1.6, and I am seeing
from time to time in my logs:
Exception in thread "elasticsearch[Summers, Alexander][tp]-pool-1-
thread-1" java.lang.StackOverflowError
Exception in thread "elasticsearch[Summers, Alexander][tp]-pool-1-
thread-2" java.lang.StackOverflowError
Exception in thread "elasticsearch[Summers, Alexander][tp]-pool-1-
thread-3" java.lang.StackOverflowError
Exception in thread "elasticsearch[Summers, Alexander][tp]-pool-1-
thread-4" java.lang.StackOverflowError
Exception in thread "elasticsearch[Summers, Alexander][tp]-pool-1-
thread-5" java.lang.StackOverflowError
Exception in thread "elasticsearch[Summers,
Alexander]clusterService#updateTask-pool-5-thread-1"
java.lang.StackOverflowError
This happens approximately one time every 20 runs of my client code.
It is happening before any of my actual work is started, just after
the cluster join is finished.
The code that joins the cluster in my client side is:
private Node buildNode() {
return
NodeBuilder.nodeBuilder().client(true).loadConfigSettings(true).node();
}
It's a singleton Guice injected object.
I am using a runtime parameter -Des.network.host=10.0.0.1 for the IP,
and the rest of the configuration is on the file elasticsearch.yml:
cluster:
name: test
transport:
tcp:
port: 5000-5099
connect_timeout: 5s
http:
port: 5200-5299
discovery:
zen:
ping:
multicast:
group: 224.2.2.4
fd:
ping_interval: 5s
ping_timeout: 20s
ping_retries: 3
threadpool:
scaling:
min: 2
max: 10
scheduled_size: 6
gateway:
type: none
Does anybody sees an error that could be causing that behavior?
Thanks,
Sebastian.