tracker issue : CF-3983192

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

CFLOCk with name does not always only allow one request at a time

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Tom Chiverton / Tom Chiverton (Tom Chiverton)

Created: 05/07/2015

Components: Core Runtime

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: ALL / Linux

Vote Count: 0

Under only moderate load, we get pairs of stuck threads due to trying to duplicate() a shared object in a CFC.
To prevent this, we use a named CFLOCK to single thread requests.
However, some times we still see pairs (or more !) of threads blocking each other.

Below is a code snippet from the effected CFLOCK, and partial stack traces from FusionReactor clearly showing two requests inside the CFLOCK at once.
Both these threads were launched within two seconds of each other, so inside the timeout value.

Thread one stack trace from Fusion Reactor:
cfWidgetManager2ecfc842561472$funcWIDGETDATA.runFunction(/wwwroot/Branded/Default/reports3.0/com/ev/service/WidgetManager.cfc:307)
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533)
coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2810)
cfWidgetManager2ecfc842561472$funcGETDATAFORUSERCAMPAIGN.runFunction(/wwwroot/Branded/Default/reports3.0/com/ev/service/WidgetManager.cfc:40)

Thread two stack trace from Fusion Reactor:
coldfusion.runtime.Struct.duplicate(Struct.java:153)
 - locked <0x18bf2bf> (a coldfusion.runtime.Struct)
coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:102)
coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
coldfusion.runtime.TemplateProxy.duplicateScope(TemplateProxy.java:2567)
coldfusion.runtime.TemplateProxy.duplicate(TemplateProxy.java:2542)
coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:125)
coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
coldfusion.runtime.TemplateProxy.duplicateScope(TemplateProxy.java:2567)
coldfusion.runtime.TemplateProxy.duplicate(TemplateProxy.java:2542)
coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:125)
coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
coldfusion.runtime.CFPage.Duplicate(CFPage.java:6254)
cfWidgetFactory2ecfc1291701710$funcCREATEINSTANCE.runFunction(/wwwroot/Branded/Default/reports3.0/com/ev/factory/WidgetFactory.cfc:29)

Code block with line numbers 
27	        <cflock name="WidgetFactory-createInstance-#cgi.server_name#" timeout="30">
28	        <cfif StructKeyExists( variables.widgetInstances, arguments.widgetClass )>
29	                <cfset var o = duplicate( variables.widgetInstances[ arguments.widgetClass ] )/>
30	                <cfset o = o.init( variables.ormHelper.getClientDSN(this),
31	                                                variables.ormHelper.getDsn('scheduler')
32	                                         ) />
33	        <cfelse>
34	                <cfset var functionIndex=0>
35	                <cfset var o = CreateObject('component', arguments.widgetClass).init(
36	                                                                        variables.ormHelper.getClientDSN(this),
37	                                                                        variables.ormHelper.getDsn('scheduler')
38	                                                                         ) />
39	                <!--- from ColdSpring's DefaultXmlBeanFactory --->
40	                <cfset var md=variables.beanFactory.flattenMetaData(GetComponentMetaData(widgetClass))>

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

Watson Bug ID:	3983192

External Customer Info:
External Company:  
External Customer Name: Tom
External Customer Email:  
External Test Config: CF11 fully updated on latest JVM 1.8, CentOS 5 32bit

Attachments:

Comments:

Ahh, ignore me. Need more coffee.
Comment by External U.
7622 | May 07, 2015 03:07:07 AM GMT
Hi Tom, Are you saying that this is not an issue? Can you please confirm?
Comment by HariKrishna K.
7623 | June 04, 2015 11:50:19 PM GMT
Yes, please close.
Comment by External U.
7624 | June 05, 2015 02:13:56 PM GMT