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

Pothys - MitrahSoft 20 July 2020 at 10:14

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.

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Created 17 July 2020 at 17:53
Updated 20 July 2020 at 10:14