|
Stuck threads (ChartDirector.aj.b(SourceFile:721)) |
Posted by Bas on Aug-29-2013 19:53 |
|
Hi,
In our web application we are experiencing problems with stuck threads. There seems to be
a problem with ChartDirector (version 5.0.2) since we get the following thread dump:
[STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'" RUNNABLE
??????????? ??????????? ChartDirector.aj.b(SourceFile:721)
??????????? ??????????? ChartDirector.aj.a(SourceFile:1098)
??????????? ??????????? ChartDirector.Axis.d(SourceFile:3588)
??????????? ??????????? ChartDirector.Axis.a(SourceFile:5238)
??????????? ??????????? ChartDirector.PlotArea.b(SourceFile:1133)
??????????? ??????????? ChartDirector.PlotArea.a(SourceFile:1098)
??????????? ??????????? ChartDirector.PlotArea.j(SourceFile:969)
??????????? ??????????? ChartDirector.PlotArea.k(SourceFile:981)
??????????? ??????????? ChartDirector.XYChart.e(SourceFile:829)
??????????? ??????????? ChartDirector.BaseChart.layout(SourceFile:792)
??????????? ??????????? ChartDirector.BaseChart.a(SourceFile:1030)
??????????? ??????????? ChartDirector.BaseChart.makeChart(SourceFile:844)
??????????? ??????????? ChartDirector.BaseChart.makeChart3(SourceFile:849)
??????????? ??????????? ChartDirector.BaseChart.makeImage(SourceFile:942)
Do you have any idea of what the problem could be? |
Re: Stuck threads (ChartDirector.aj.b(SourceFile:721)) |
Posted by Peter Kwan on Aug-30-2013 05:38 |
|
Hi Bas,
Is it possible to try to use the following 5.0.2 release? It can produce a more detail stack trace that can help identify the problem.
http://www.advsofteng.com/chartdir_java_502p3_alt.zip
My guess is, if the stuck thread is idle, it may be related to accessing some Java system methods, in particular, methods related to acessing fonts. The detail stack trace can confirm if this is the case.
Would you mind to inform me which Java version and operating system you are using? The font system of different OS is quite different, and how Java uses the font are also Java version dependent.
Regards
Peter Kwan |
Re: Stuck threads (ChartDirector.aj.b(SourceFile:721)) |
Posted by Bas on Sep-16-2013 19:16 |
|
Hi Peter,
It has taken us some time to reproduce this problem, since it only occurs once in a while.
This is the new log:
ChartDirector.AutoScaler.logAutoScale(Axis.java:721)
ChartDirector.AutoScaler.autoScale(Axis.java:1098)
ChartDirector.Axis.autoScale(Axis.java:3588)
ChartDirector.Axis.layout(Axis.java:5238)
ChartDirector.PlotArea.layoutAxis(PlotArea.java:1133)
ChartDirector.PlotArea.autoScaleYAxis(PlotArea.java:1098)
ChartDirector.PlotArea.layoutAxes(PlotArea.java:969)
ChartDirector.PlotArea.layoutChart(PlotArea.java:981)
ChartDirector.XYChart.onLayoutChart(XYChart.java:829)
ChartDirector.BaseChart.layout(BaseChart.java:792)
ChartDirector.BaseChart.paint(BaseChart.java:1030)
ChartDirector.BaseChart.makeChart(BaseChart.java:844)
ChartDirector.BaseChart.makeChart3(BaseChart.java:849)
ChartDirector.BaseChart.makeImage(BaseChart.java:942)
We are running our application on:
- Windows 2008 R2 64-bit
- Java 6u29
Hope you can help us out.
Kind regards,
Bas |
Re: Stuck threads (ChartDirector.aj.b(SourceFile:721)) |
Posted by Peter Kwan on Sep-17-2013 00:43 |
|
Hi Bas,
Thanks for your information. We will analyze this in more details.
When the issue occur, have you checked if the CPU utilization is abnormally high or not? (We would like to determine if it is a "busy loop", or if it just hangs there without doing anything.)
Regards
Peter Kwan |
Re: Stuck threads (ChartDirector.aj.b(SourceFile:721)) |
Posted by Bas on Sep-17-2013 15:03 |
|
Hi Peter,
We have noticed that the CPU utilization was abnormally high (100% - 4 cores).
Kind regards,
Bas |
Re: Stuck threads (ChartDirector.aj.b(SourceFile:721)) |
Posted by Bas on Sep-18-2013 20:14 |
|
Hi Peter,
We have found out how to reproduce the stuck thread problem. It occurs when we are
trying to plot zero values in a xyChart with log scaling.
In our code this results in: xyChart.yAxis().setLogScale(0.0, 0.0);
We suspect this to be the problem...
Kind regards,
Bas |
Re: Stuck threads (ChartDirector.aj.b(SourceFile:721)) |
Posted by Peter Kwan on Sep-19-2013 00:54 |
|
Hi Bas,
Thanks a lot for your information. It helps us a lot.
From our analysis of the code, we have suspected that the error is triggered by values produced by invalid mathematical operations, such as Double.NaN, Double.POSITIVE_INFINITY or Double.NEGATIVE_INFINITY. The "setLogScale(0.0, 0.0)" does cause invalid values to be produced, as the logarithm of 0 or negative numbers is undefined.
We will update ChartDirector to catch this type of input values, and possibly change it to something else (probably an arbitrary but valid log scale, such as 1 to 100).
In the mean time, I think you can modify your code to avoid the 0.0 to 0.0 log scale, and to use a valid log scale instead. (Even if we catch the 0.0 to 0.0 log scale, the best we can do is to change it to a valid but arbitrary scale, which may not be what you want anyway.)
Regards
Peter Kwan |
Re: Stuck threads (ChartDirector.aj.b(SourceFile:721)) |
Posted by Bas on Sep-19-2013 15:31 |
|
Hi Peter,
We will make sure that we won't use "setLogScale(0.0, 0.0)" anymore.
Thanks for your help!
Kind regards,
Bas |
|