tracker issue : CF-3928688

select a category, or use search below
(searches all categories and all time range)
Title:

Error with reReplace when text being replaced is over a certain size.

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/UserError

Reporter/Name(from Bugbase): Stephen Paulson / Stephen Paulson (Stephen Paulson)

Created: 01/27/2015

Components: Language

Versions: 10.0

Failure Type: Crash

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

We upgraded our java to 1.7.0_75 and while testing came across an error. We narrowed it down to a specific reReplace() call. Error is caused by amount of text being replaced. This call worked fine before the Java version change.

Run the following to reproduce. If you take away 1 character from the variable it will work.

<cfsavecontent variable="output">/* 
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789012345678
*/</cfsavecontent>

<cfset output = reReplace( output, "/\*(.|[\r\n])*?\*/", "", "all" )>

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3928688

External Customer Info:
External Company:  
External Customer Name: Stephen
External Customer Email:  
External Test Config: My Hardware and Environment details:



System Information

Server Details

Server Product	ColdFusion

Version	10,0,15,292620

Tomcat Version	7.0.54.0

Edition	Standard  

Serial Number	XXXXXXXXXXXXXXXX

Operating System	Windows Server 2008 R2  

OS Version	6.1  

Update Level	/C:/ColdFusion10/cfusion/lib/updates/chf10000015.jar  

Adobe Driver Version	4.1 (Build 0001)  

JVM Details

Java Version	1.7.0_75  

Java Vendor	Oracle Corporation  

Java Vendor URL	http://java.oracle.com/

Java Home	C:\Program Files\Java\jdk1.7.0_75\jre  

Java File Encoding	Cp1252  

Java Default Locale	en_US  

File Separator	\  

Path Separator	;  

Line Separator	Chr(13)

User Name	nova  

User Home	C:\Users\nova  

User Dir	C:\ColdFusion10\cfusion\bin  

Java VM Specification Version	1.7  

Java VM Specification Vendor	Oracle Corporation  

Java VM Specification Name	Java Virtual Machine Specification  

Java VM Version	24.75-b04  

Java VM Vendor	Oracle Corporation  

Java VM Name	Java HotSpot(TM) 64-Bit Server VM  

Java Specification Version	1.7  

Java Specification Vendor	Oracle Corporation  

Java Specification Name	Java Platform API Specification  

Java Class Version	51.0  



JVM Arguments

-server -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -Xss256k -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:MaxPermSize=300m -XX:PermSize=300m -Xbatch -Dcoldfusion.home={application.home} -Dcoldfusion.rootDir={application.home} -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random

Attachments:

Comments:

Error from Error Log SEVERE: Servlet.service() for servlet [CfmServlet] in context with path [/] threw exception [Servlet execution threw an exception] with root cause java.lang.StackOverflowError at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__tryExpression(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.__interpret(Unknown Source) at org.apache.oro.text.regex.Perl5Matcher.contains(Unknown Source) at org.apache.oro.text.regex.Util.substitute(Unknown Source) at org.apache.oro.text.regex.Util.substitute(Unknown Source) at coldfusion.runtime.StringFunc.REReplace(StringFunc.java:727) at coldfusion.runtime.CFPage.REReplace(CFPage.java:3224) at cftest2ecfm380065076.runPage(D:\inetdev\stv-nova-runtime\test.cfm:11) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:446) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.IpFilter.invoke(IpFilter.java:64) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:451) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:219) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
Comment by External U.
8724 | January 27, 2015 02:18:19 PM GMT
Stephen, You seem to have a lot of custom parameters set in your jvm config file. Can you try bumping up the number for -Xss parameter to, say, -Xss512k. If that doesn't help can you pls. verify if the issue exists with the default ColdFusion jvm.config file?
Comment by Piyush K.
8725 | January 28, 2015 02:25:34 AM GMT
Stephen, Keen to hear back on the result from the steps I suggested. I'm closing this, since I haven't been able to reproduce the behavior with the default ColdFusion JVM settings. But we can reopen this if the suggested steps do not resolve the issue.
Comment by Piyush K.
8726 | June 16, 2015 03:17:04 AM GMT