Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Server Administration / June 2007



Tip: Looking for answers? Try searching our database.

CFCHART & JVM CRASH / CFMX 7.02

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
brookd - 16 May 2007 20:03 GMT
After upgrading to cfmx 7.02, cfchart is causing JVM to crash and the cfserver
to restart multiple times a day. I have tried at least 5 different versions of
the SUN JVM.  The thread dump, and my CFML code is below. I opened a support
ticket with adobe 9 days ago and while it says someone will respond within 24
hours, it has been 9 days with no response.

Has ANYONE else had this problem?

# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_FLT_DIVIDE_BY_ZERO (0xc000008e) at pc=0x0079b833, pid=380, tid=532
#
# Java VM: Java HotSpot(TM) Server VM (1.4.2_09-b05 mixed mode)
# Problematic frame:
# j  
java.text.DecimalFormat.format(DLjava/lang/StringBuffer;Ljava/text/Format$FieldD
elegate;)Ljava/lang/StringBuffer;+1
#

---------------  T H R E A D  ---------------

Current thread (0x044a0d68):  JavaThread "jrpp-4" [_thread_in_Java, id=532]

siginfo: ExceptionCode=0xc000008e, ExceptionInformation=0x00000000

Registers:
EAX=0x00000000, EBX=0x0000006f, ECX=0x20100002, EDX=0x00000000
ESP=0x0a18e430, EBP=0x0a18e454, ESI=0x3f4dd83e, EDI=0x0a18e478
EIP=0x0079b833, EFLAGS=0x00010246

Top of Stack: (sp=0x0a18e430)
0x0a18e430:   00000000 3ff00000 0a18e438 3f4dd801
0x0a18e440:   0a18e478 3f4de800 00000000 3f4dd7a8
0x0a18e450:   0a18e468 0a18e498 00792e0a 00000000
0x0a18e460:   00000000 00000000 15a1bf98 1012ec50
0x0a18e470:   00000000 00000000 10123768 0a18e47c
0x0a18e480:   3f4dd6f4 0a18e4b0 3f4de800 00000000
0x0a18e490:   3f4dd688 0a18e4a0 0a18e4d0 00792e0a
0x0a18e4a0:   159d5fb0 1012ec50 00000000 00000000

Instructions: (pc=0x0079b833)
0x0079b823:   49 27 08 dc 0c 24 de f1 db 2d a0 49 27 08 de c9
0x0079b833:   dd 1c 24 dd 04 24 58 5a 0f b6 5e 01 46 ff 24 9d

Stack: [0x0a090000,0x0a190000),  sp=0x0a18e430,  free space=1017k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
j  
java.text.DecimalFormat.format(DLjava/lang/StringBuffer;Ljava/text/Format$FieldD
elegate;)Ljava/lang/StringBuffer;+1
j  
java.text.DecimalFormat.format(DLjava/lang/StringBuffer;Ljava/text/FieldPosition
;)Ljava/lang/StringBuffer;+20
j  java.text.NumberFormat.format(D)Ljava/lang/String;+12
j  com.gp.client.chart.axis.axis.MxScaleDimension.getLabel(I)[C+15
j  
com.gp.client.chart.axis.axis.MxFormatDimension.getLabelArray(Lcom/gp/client/tex
t/MxAxisRenderer;)[[C+22
j  
com.gp.client.chart.axis.axis.MxNormalScaleDimension.getLabelArray(Lcom/gp/clien
t/text/MxAxisRenderer;)[[C+22
j  
com.gp.client.chart.axis.axis.MxChartAxis.layout(Lcom/gp/client/graphics/MxGraph
ics;)V+39
j  
com.gp.client.chart.axis.axis.MxChartAxis.layoutY(Lcom/gp/client/graphics/MxGrap
hics;ILjava/awt/Insets;)V+47
j  
com.gp.client.chart.axis.MxAxisView.layoutY(Lcom/gp/client/graphics/MxGraphics;I
Lcom/gp/client/awt/MxInsets;)V+42
j  
com.gp.client.chart.axis.MxAxisView.layoutTopViewY(Lcom/gp/client/graphics/MxGra
phics;ILcom/gp/client/awt/MxInsets;)V+4
j  
com.gp.client.chart.axis.MxSingleViewAxisFrame.layoutChart(Lcom/gp/client/graphi
cs/MxGraphics;)V+194
j  
com.gp.client.chart.axis.MxAxisFrame._layout(Lcom/gp/client/graphics/MxGraphics;
)V+7
j  
com.gp.client.chart.axis.MxAxisFrame.layout(Lcom/gp/client/graphics/MxGraphics;)
V+2
j  com.gp.client.chart.MxChart.paint(Lcom/gp/client/graphics/MxGraphics;)V+319
j  com.gp.client.MxWidget.draw(Lcom/gp/client/graphics/MxGraphics;)V+120
j  com.gp.image.plugins.ImChartBuilder.build(Lcom/gp/client/MxWidget;)V+42
j  com.gp.image.plugins.ImSWFBuilder.getBytes(Lcom/gp/client/MxWidget;)[B+22
j  
com.gp.image.server.cache.IcDramImage.buildImage(Lcom/gp/image/plugins/ImChartBu
ilder;Lcom/gp/image/server/IcImageServer;Lcom/gp/client/MxWidget;)V+3
j  
com.gp.image.server.cache.IcImage.<init>(Lcom/gp/image/server/IcImageServer;Lcom
/gp/api/jsp/MxChartDescription;)V+143
j  
com.gp.image.server.cache.IcDramImage.<init>(Lcom/gp/image/server/IcImageServer;
Lcom/gp/api/jsp/MxChartDescription;)V+3
j  
com.gp.image.server.IcImageServer.__newImage(Lcom/gp/api/jsp/MxChartDescription;
)Lcom/gp/image/server/cache/IcImage;+31
j  
com.gp.image.server.IcImageServer._newImage(Lcom/gp/api/jsp/MxChartDescription;)
Lcom/gp/image/server/cache/IcImage;+12
j  
com.gp.image.server.IcImageServer.newImage(Lcom/gp/api/jsp/MxChartDescription;)L
com/gp/image/server/cache/IcImage;+41
j  
com.gp.image.server.IcImageCache.getImage(Lcom/gp/image/server/IcImageServer;Lco
m/gp/api/jsp/MxChartDescription;)Lcom/gp/image/server/cache/IcImage;+112
j  
com.gp.image.server.IcImageServer.getImage(Lcom/gp/api/jsp/MxChartDescription;)L
com/gp/image/server/cache/IcImage;+9
j  
com.gp.api.jsp.MxServerComponent.getImageTag(Lcom/gp/api/jsp/MxChartDescription;
Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;+5
j  
com.gp.api.jsp.MxServerComponent.getImageTag(Lcom/gp/api/jsp/MxChartDescription;
Ljava/lang/String;)Ljava/lang/String;+4
j  coldfusion.graph.GraphingServiceImpl$4.run()Ljava/lang/Object;+15
v  ~StubRoutines::call_stub
V  [jvm.dll+0xdc29c]

=============== CFML CODE ===================

<!--- set the date range for the last 7 days --->
<cfset dayArray=arraynew(2)>
<cfset dayArray[1][7]=dateadd("d",-6,now())>
<cfset dayArray[1][6]=dateadd("d",-5,now())>
<cfset dayArray[1][5]=dateadd("d",-4,now())>
<cfset dayArray[1][4]=dateadd("d",-3,now())>
<cfset dayArray[1][3]=dateadd("d",-2,now())>
<cfset dayArray[1][2]=dateadd("d",-1,now())>
<cfset dayArray[1][1]=now()>
   

<!--- get a count for daily submissions/stats over the last seven days --->
<cfquery datasource="#request.datasource#" name="last7days">
SELECT         Day(datesubmitted) as DD,
            Count(1) AS dailytotal
FROM        tblSubmissionData_client550
WHERE          datesubmitted BETWEEN  #dayArray[1][7]# AND #dayArray[1][1]#
GROUP BY    Day(datesubmitted)
ORDER BY    DD
</cfquery>

<!--- populate the 7 day array with the total submission for that day or
'0' if there is no data available for that day --->
<cfloop from="1" to="7" index="z">
    <cfoutput>
        <cfset
rowposition=listfindnocase(valuelist(last7days.dd),datepart("d",dayArray[1][z]))

        <cfif rowposition>
            <cfset dayArray[2][z]=last7days["dailytotal"][rowposition]>
                <cfelse>
            <cfset dayArray[2][z]=0>   
        </cfif>
    </cfoutput>
</cfloop>   
       

<!--- create cfchart caching solution for clustered server usage --->
<cfsavecontent variable="graphoutput">
    <cfchart show3d="yes"  
        chartwidth="340"
        chartheight="140"
        rotated="yes"   
        showborder="no" fontbold="no" fontsize="10"
        font="Arial"
        gridlines=6
        showXGridlines="yes"
        showYGridlines="no"
        foregroundcolor="575757">
       
        <cfchartseries type="bar"  seriescolor="#request.graphColor#"
serieslabel="Total Submissions for">
            <cfloop from="7" to="1"  step="-1" index="z">
                <cfchartdata  item="#dateformat(dayArray[1][z],"DDD")#"
value="#dayArray[2][z]#">
            </cfloop>
        </cfchartseries>
    </cfchart>
</cfsavecontent>

<!--- replace http with https for secure site --->
<cfoutput>
#replacenocase(graphoutput,'http:','https:','all')#
</cfoutput>
Abinidi - 17 May 2007 06:53 GMT
Have you tried updating the JVM on the server and pointing CF to it?
brookd - 25 May 2007 15:48 GMT
Have you tried updating to the Sun JVM on the server and pointing CF to it? non
Hotspot version..

Sorry for the delayed response, I guess my spam filter was catching the update
emails. Well, I am still having these crashes, too a lesser extent, exept for
this morning where it has crashed my server about 10 times in a row in a 5 hour
timespan. I had thought I had resolved the problem by moving some of the
dateformatting code outside of the <cfchart> tag but I guess that did not help.

I have tried with out the hotspot using -Xnit - and it does fix the problem,
but there is a significant performance hit for us so we can't stick with that
option.

I tried the latest JVM and that has not helped...
BKBK - 17 May 2007 07:58 GMT
If you are in the US, update Coldfusion's JVM to 1.4.2_11, according to the http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=d2ab4470. You would at least resolve the DST issue.
brookd - 25 May 2007 15:49 GMT
You said : "If you are in the US, update Coldfusion's JVM to 1.4.2_11,
according to the fix for Daylight Saving Time. You would at least resolve the
DST issue."

Is this specific to  the thead dump, do you see a DST problem  in the thread
dump?
BKBK - 17 May 2007 08:04 GMT
have you installed the http://www.adobe.com/support/coldfusion/downloads_updates.html#mx7? Some resolve cfchart issues.
brookd - 25 May 2007 16:11 GMT
I just checked and I already have installed the latest updaters and hotfixes:

C:/CFusionMX7/lib/updates/chf7020002.jar  

I am going to try 1.4.2_11 again...
BKBK - 25 May 2007 18:33 GMT
[i]> do you see a DST problem in the thread dump? [/i]
No. The dates in the code and the JVM crash reminded me of the DST fix.

What you've most likely encountered is a bug in the HotSpot Virtual Machine's
processing of cfchart. Apparently, some methods in a JVM process attempt
division by zero. I wonder what would happen if you construct your chart "by
hand", as I did in this
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&t
hreadid=1236971.
brookd - 14 Jun 2007 23:08 GMT
I am still having these crashes, now they are sporatic, somtimes 10 times a
day, every hour sometimes more, sometimes less. Sometimes I can go 1-2 days
without this crash. I can't find anyone with a similar problem. I am going
crazy. This is happening on two servers, so its not server specific, but my
cfchart code is basic. WTF!
BKBK - 16 Jun 2007 04:47 GMT
What is the value of [i]request.graphColor[/i]? What happens when you omit the [i]seriescolor[/i] attribute?
BKBK - 16 Jun 2007 04:56 GMT
[i]foregroundcolor="575757"[/i]

Use instead: foregroundcolor="##575757"
(not that it caused the problem)
BKBK - 16 Jun 2007 11:49 GMT
Does the following code run. If it does, then there is likely a problem with
the query or loop.

<!--- set the date range for the last 7 days --->
<cfset dayArray=arraynew(2)>
<cfset dayArray[1][7]=dateadd("d",-6,now())>
<cfset dayArray[1][6]=dateadd("d",-5,now())>
<cfset dayArray[1][5]=dateadd("d",-4,now())>
<cfset dayArray[1][4]=dateadd("d",-3,now())>
<cfset dayArray[1][3]=dateadd("d",-2,now())>
<cfset dayArray[1][2]=dateadd("d",-1,now())>
<cfset dayArray[1][1]=now()>
   
<cfset dayArray[2][1]=15>   
<cfset dayArray[2][2]=3>
<cfset dayArray[2][3]=12>
<cfset dayArray[2][4]=7>
<cfset dayArray[2][5]=12>
<cfset dayArray[2][6]=0>
<cfset dayArray[2][7]=9>

<!--- create cfchart caching solution for clustered server usage --->
<cfsavecontent variable="graphoutput">
    <cfchart show3d="yes"  
        chartwidth="340"
        chartheight="140"
        rotated="yes"   
        showborder="no" fontbold="no" fontsize="10"
        font="Arial"
        gridlines=6
        showXGridlines="yes"
        showYGridlines="no"
        foregroundcolor="##575757">
       
        <cfchartseries type="bar"  serieslabel="Total Submissions for">
            <cfloop from="7" to="1"  step="-1" index="z">
                <cfchartdata  item="#dateformat(dayArray[1][z],"DDD")#"
value="#dayArray[2][z]#">
            </cfloop>
        </cfchartseries>
    </cfchart>
</cfsavecontent>

<!--- replace http with https for secure site --->
<cfoutput>
#replacenocase(graphoutput,'http:','https:','all')#
</cfoutput>
brookd - 19 Jun 2007 20:37 GMT
This is my original code right? I haven't tried ommitting the series color. At
this point, I am now testing the bea Jrockit 1.5 JVM, which so far is running
well and everything is working (other CF code).

Also, on another server I am still running Suns JVM 1.4.2 (I have tried many
others versions aswell), but updated the JDBC drivers from 3.3 to 3.4. So far
no crashes their either.

So, I am waiting to see what happens. Its gone 3-4 days with no crashes before
and then all of a sudden it will crash 10 times in a row the same day.

I added some logging to dump the result set on the graph page so I could see
if it was some specific data generating the error, but its never the same and
there did not appear to be any similarities.

I am starting to think that the error is bull, and it is related to something
else, even memory usage. Guess, we'll see if either Jrockit or the new JDBC
drivers have any effect...
brookd - 25 Jun 2007 21:07 GMT
Okay, so Jrockit 1.5 works awesome, no more crashes, a bit of a speed increase and no problems with webservices (like sn jvm 1.5). I've been using this new JVM for 1 week with no problems.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.