File and directory access via virtual mapping to S3 randomly fails inside of cfthread

Description

The following snippet of code will generate errors. The type of error is random, but it's one of the following: java.util.ConcurrentModificationException, java.lang.NegativeArraySizeException, or java.lang.NullPointerException. I've battled with these errors in my application for a while now, but I've only recently been able to narrow down the problem to using a virtual mapping to an S3 bucket inside of a cfthread block. Knowing that, I was able to write a test that reproduces the problem. I have also includes some example stacktraces, though, sometimes cfcatch does not provide one. In that case, I provided a screenshot of <cfdump var="#cfcatch#">.

Test Code

Stack traces from test code

Example stack trace from production application

Environment

I have tested this in the following environments:
Lucee 5.3.2.77 on Windows 10
Lucee 5.2.8.50 in Docker on Amazon Linux EC2

Assignee

Michael Offner

Reporter

Ricky

Priority

Critical

Labels

None

Fix versions

None

Sprint

None

Affects versions

Configure