NPE at lucee.runtime.spooler.SpoolerEngineImpl.getFile()

Description

After upgrading to Lucee 5.2.4.37, we started receiving hundreds of these errors in lucee-stderr.XXXX-XX-XX.log:

Exception in thread "Thread-NNNNN" java.lang.NullPointerException
at lucee.runtime.spooler.SpoolerEngineImpl.getFile(SpoolerEngineImpl.java:254)
at lucee.runtime.spooler.SpoolerEngineImpl.store(SpoolerEngineImpl.java:223)
at lucee.runtime.spooler.SpoolerEngineImpl.execute(SpoolerEngineImpl.java:625)
at lucee.runtime.spooler.SpoolerEngineImpl$TaskThread.run(SpoolerEngineImpl.java:536)

The servers this is happening on eahc send out ~50k emails/day (CFMAIL), and while most emails are still being delivered, a great many are falling through the cracks.

Environment

Windows Server 2016 64-bit
Tomcat/8.5.23
Java 1.8.0_152

Activity

Show:
Pothys - MitrahSoft
November 6, 2017, 8:20 AM

Hi ,

I've analyzed this ticket & I couldn't able to reproduce the issue. Mails were working fine for me. Please add detailed description to reproduce the issue it helps me to find out the issue

Michael Offner
November 6, 2017, 9:58 AM

most likely a concurrency issue that is hard to reproduce, could only happen in a certain JVM implementation.
ATM there are 2 objects that could cause the issue, with 5.2.6.16-SNAPSHOT we will change the code, so the stacktrace will show us which object exatly causes this.
Will inform here asap version is avialble for testing.

Casey Yancey
April 11, 2018, 9:19 PM
Edited

fyi, to replicate (5.2.6.35-SNAPSHOT):

i ran one of your tests to create a "bad email" that shows up in the scheduler https://github.com/lucee/Lucee/blob/9d9aff960e6f3eb68ac8d817291c00bc1015b51d/test/tickets/LDEV1537/test2.cfm

then attempted to execute the "failed" mail task, to which I get this exact same NPE exception
pseudo code:

Pothys - MitrahSoft
May 4, 2018, 2:35 PM

Hi ,

I run the above code I'm getting NPE as well.

Michael Offner
May 4, 2018, 8:50 PM
Fixed

Assignee

Michael Offner

Reporter

David Grabbe

Priority

Blocker

Labels

Fix versions

Sprint

None

Affects versions