CFMLFactory getInfo() method not thread safe under load

Description

If a request completes while the CFMLFactory's getInfo() method is looping over the iterator, a null pointer exception will be thrown. The exceptions tend to happen in one of the following places:

  • When using the thread obtained by pc.getThread()

  • When using pc.getApplicationContext()

This is easy to reproduce, just take a page with the code:

and hit it in a load tool with 50 threads and you'll get errors all over. This also affects the following tag:

which is where I originally saw the issue.

Lucee needs to put better checking in place to ensure the current thread being looped over hasn't ended and if it has, omit it from the results. I created my own simplified implementation of this that does extra null checking and uses try/catches to detect a dead thread.

Environment

None

Activity

Show:
Pothys - MitrahSoft
July 20, 2020, 10:14 AM

I've checked this ticket with lucee and confirmed the issue happened on lucee latest version of 5.3.8.16-SNAPSHOT also. But, I can able to see the same issue only once at under load. More than Null pointer exception thrown as recursively.

Assignee

Michael Offner

Reporter

Brad Wood

Priority

New

Labels

Fix versions

None
Configure