T
Twisted
My thread factory is groaning under the load. It keeps having to create
new threads to replace ones that keep dying. The threads are all
identical code-wise, and their run() methods consist mainly of a big
try block that calls some other stuff and sleeps and such. The try
block doesn't bother recovering from most exceptions; there's an ending
catch (Exception e) that notifies the thread factory of a thread's
untimely demise, and exits.
I figured this would give the system some robustness, as well as
providing a way to debug. But I am having difficulty with the latter.
Noticing a lot of logged exceptions without any detail info, I tried
sticking a breakpoint in that catch block, just where it calls the
factory's thread death notifier, and inspecting the exception objects
when the breakpoint is tripped.
They have no stack trace. Some are NullPointerExceptions whose "cause"
field refers recursively to the same exception, with null detail and
stack trace fields. Others are IllegalArgumentExceptions with the same
property. Still more are like these last, but the detail field says
"java.lang.IllegalArgumentException: protocol = http host = null"...
Anyone know where they're coming from?
new threads to replace ones that keep dying. The threads are all
identical code-wise, and their run() methods consist mainly of a big
try block that calls some other stuff and sleeps and such. The try
block doesn't bother recovering from most exceptions; there's an ending
catch (Exception e) that notifies the thread factory of a thread's
untimely demise, and exits.
I figured this would give the system some robustness, as well as
providing a way to debug. But I am having difficulty with the latter.
Noticing a lot of logged exceptions without any detail info, I tried
sticking a breakpoint in that catch block, just where it calls the
factory's thread death notifier, and inspecting the exception objects
when the breakpoint is tripped.
They have no stack trace. Some are NullPointerExceptions whose "cause"
field refers recursively to the same exception, with null detail and
stack trace fields. Others are IllegalArgumentExceptions with the same
property. Still more are like these last, but the detail field says
"java.lang.IllegalArgumentException: protocol = http host = null"...
Anyone know where they're coming from?