Title:
Accessing a running thread via cfthread object with server memory monitoring on can generate ConcurrentModificationException
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): John Bartlett / John Bartlett (wyntermoonwolf)
Created: 06/18/2013
Components: Server Monitoring
Versions: 10.0
Failure Type: Crash
Found In Build/Fixed In Build: Final / CF10_Update14
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Platforms All
Vote Count: 0
Problem Description: Accessing a running thread via its cfthread object while server memory monitoring enabled can generate ConcurrentModificationException
Steps to Reproduce: Run attached ThreadTest.cfm script. It creates 500 threads which basically does nothing. Then it loops over those thread objects to get the current running state of the thread.
Actual Result:
16:27:10 Starting threads
16:27:10 Threads invoked
Thread Test_11 failed for memory exception
Thread Test_36 failed for memory exception
Thread Test_104 failed for memory exception
Thread Test_397 failed for memory exception
Thread Test_446 failed for memory exception
Thread Test_494 failed for memory exception
16:27:10 END OF LINE
Fails with the following stack trace:
java.util.ConcurrentModificationException at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:762) at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:801) at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:799) at java.util.HashMap.putAll(HashMap.java:523) at coldfusion.monitor.memory.MemoryTracker.getAllPrimitiveMap(MemoryTracker.java:92) at coldfusion.monitor.memory.MemoryTracker.getEstimatedMemory(MemoryTracker.java:117) at coldfusion.monitor.memory.MemoryCalculator.calculateMemory(MemoryCalculator.java:100) at coldfusion.monitor.memory.MemoryCalculator.calculateMemory(MemoryCalculator.java:30) at coldfusion.monitor.memory.MemoryTrackerProxy.onAddObject(MemoryTrackerProxy.java:277) at coldfusion.runtime.NeoPageContext.setVariableScope(NeoPageContext.java:1559) at coldfusion.runtime.NeoPageContext.SymTab_initializeForPage(NeoPageContext.java:979) at coldfusion.runtime.NeoPageContext.initializeWith(NeoPageContext.java:301) at coldfusion.thread.Task.run(Task.java:131) at coldfusion.scheduling.ThreadPool.run(ThreadPool.java:211) at coldfusion.scheduling.WorkerThread.run(WorkerThread.java:71)
Expected Result:
16:27:10 Starting threads
16:27:10 Threads invoked
16:27:10 END OF LINE
Any Workarounds:
Disable server memory monitoring via the ColdFusion Administrator in Server Monitoring > Monitoring Settings
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3580771
External Customer Info:
External Company:
External Customer Name: wyntermoonwolf
External Customer Email:
External Test Config: My Hardware and Environment details: WinXP
Attachments:
- June 19, 2013 00:00:00: 1_ThreadTest.cfm
Comments: