Hang: Log4JEngine: failed to stop thread. Conflict in same thread

Description

Lucee hung

found this in requesttimeout.log

"ERROR","Thread-589122","09/03/2020","11:24:02","thread","failed to stop thread.
;java.lang.Throwable;java.lang.Throwable
at org.apache.log4j.Category.removeAllAppenders(Category.java:886)
at lucee.commons.io.log.log4j.Log4jEngine._getLogger(Log4jEngine.java:406)
at lucee.commons.io.log.log4j.Log4jEngine.getResourceLog(Log4jEngine.java:75)
at lucee.runtime.tag.Log.getFileLog(Log.java:263)
at lucee.runtime.tag.Log.doStartTag(Log.java:237)
at writelog_cfm$cf.udfCall(/writeLog.cfm:17)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.functions.system.CFFunction.call(CFFunction.java:106)

https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/commons/io/log/log4j/Log4jEngine.java#L406

found a heap of the following errors in the log

plus quite a few of these

"ERROR","ajp-nio-8009-exec-2198","09/03/2020","11:24:19","file","Conflict in same thread: on [d:\lucee\web-contexts\app\logs\app.log]"

Lucee std-error.log filed up with

also encountered this error https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/runtime/CFMLFactoryImpl.java#L299

Environment

Apache Tomcat/8.5.33
Java 1.8.0_181 (Oracle Corporation) 64bit
OS Windows Server 2016 (10.0) 64bit

Activity

Show:
Zac Spitzer
September 3, 2020, 10:50 AM

this little script will reliably reproduce the conflict in same thread

Michael Offner
September 14, 2020, 4:52 PM

Zac Spitzer
September 14, 2020, 6:19 PM

with 5.3.8.71

  • seeing scope logs in my out.log (instead of scope.log)

  • not seeing logs from within cfthreads

Zac Spitzer
September 24, 2020, 9:06 AM
Edited

filed

Pothys - MitrahSoft
October 1, 2020, 12:36 PM

I've checked this ticket with lucee fixed version 5.3.8.71-SNAPSHOT and the latest version 5.3.8.76-SNAPSHOT.
It works fine, seems it doesn't throw an error.

Fixed

Assignee

Michael Offner

Reporter

Zac Spitzer

Priority

Critical

Labels

Fix versions

Sprint

5.3.8 Sprint 3

Affects versions

Configure