Mihai Nita created LOG4J2-600:
---------------------------------
Summary: Logger crashes / frozen / slow in folders containing
exclamation mark
Key: LOG4J2-600
URL: https://issues.apache.org/jira/browse/LOG4J2-600
Project: Log4j 2
Issue Type: Bug
Components: Core
Affects Versions: 2.0-rc1
Environment: Windows 7 x64, Mac OS X Maverick, Ubuntu 12
Reporter: Mihai Nita
Simple program (code at the end), compiled with
javac -cp .:lib/* Log4j2Test.java
run with
java -cp .:lib/* Log4j2Test
The lib folder contains log4j-api-2.0-rc1.jar and log4j-core-2.0-rc1.jar
With or without config file, same behavior (tried with a log4j2.xml, Console
appender & PatternLayout)
It fails when running in folders containing !
===== Results =====
Windows, runs OK:
"D:\Deep\!A\this\is\bad\" : OK
"D:\Deep\!!!AAA\this\is\bad\": OK
Windows CRASH (stack at the end):
D:\Deep\!!!\this\is\bad\
D:\Deep\AAA!!!\this\is\bad\
Windows SLOW (about 9 seconds), then seems to run OK:
"D:\!!!AAA\this\is\bad\": SLOW (5 seconds and more)
"D:\!AAA\this\is\bad\": SLOW (5 seconds and more)
Mac OS X : STUCK (waited 1 minute)
/Users/mnita/!A:
/!Bug
Ubuntu 12: STUCK (waited 1 minute)
/usr/local/google/home/mnita/!tests
===== Code =====
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
public class Log4j2Test {
static Logger logger = LogManager.getLogger("log-log4j2");
public static void main(String [] argv) {
logger.fatal("fatal");
logger.error("error");
logger.warn("warn");
logger.info("info");
logger.debug("debug");
logger.trace("trace");
}
}
===== Windows crash =====
java.lang.ExceptionInInitializerError
at
org.apache.logging.log4j.util.PropertiesUtil.<init>(PropertiesUtil.java:71)
at
org.apache.logging.log4j.util.PropertiesUtil.<clinit>(PropertiesUtil.java:31)
at
org.apache.logging.log4j.status.StatusLogger.<clinit>(StatusLogger.java:50)
at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:44)
at Log4j2Test.<clinit>(Log4j2Test.java:5)
Caused by: java.lang.NullPointerException
at
org.apache.logging.log4j.util.ProviderUtil.<clinit>(ProviderUtil.java:70)
... 5 more
Exception in thread "main"
===== Windows delay (log4j2.xml with Configuration TRACE =====
2014-04-09 20:57:12,079 DEBUG Generated plugins in 0.000016770 seconds
2014-04-09 20:57:12,079 DEBUG Found Plugin Map at
jar:file:/D:/!AAA/lib/log4j-core-2.0-rc1.jar!/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat
2014-04-09 20:57:16,634 DEBUG Generated plugins in 4.542370583 seconds
2014-04-09 20:57:20,939 DEBUG Generated plugins in 4.310002555 seconds
2014-04-09 20:57:20,939 DEBUG Calling createLayout on class
org.apache.logging.log4j.core.layout.PatternLayout for element PatternLayout
with params(pattern="[%t] %-5p: %c - %m%n%throwable",
Configuration(D:\!AAA\log4j2.xml), null, charset="null",
alwaysWriteExceptions="null", noConsoleNoAnsi="null")
2014-04-09 20:57:25,339 DEBUG Generated plugins in 4.385381102 seconds
2014-04-09 20:57:25,339 DEBUG Calling createAppender on class
org.apache.logging.log4j.core.appender.ConsoleAppender for element Console with
params(PatternLayout([%t] %-5p: %c - %m%n%throwable), null,
target="SYSTEM_OUT", name="A1", follow="null", ignoreExceptions="null")
2014-04-09 20:57:25,339 DEBUG Jansi is not installed, cannot find
org.fusesource.jansi.WindowsAnsiOutputStream
2014-04-09 20:57:25,339 DEBUG Calling createAppenders on class
org.apache.logging.log4j.core.config.plugins.AppendersPlugin for element
Appenders with params(Appenders={A1})
2014-04-09 20:57:25,339 DEBUG Calling createAppenderRef on class
org.apache.logging.log4j.core.config.AppenderRef for element AppenderRef with
params(ref="A1", level="null", null)
2014-04-09 20:57:25,339 DEBUG Calling createLogger on class
org.apache.logging.log4j.core.config.LoggerConfig$RootLogger for element Root
with params(additivity="null", level="trace", includeLocation="null",
AppenderRef={A1}, Properties={}, Configuration(D:\!AAA\log4j2.xml), null)
2014-04-09 20:57:25,339 DEBUG Calling createLoggers on class
org.apache.logging.log4j.core.config.plugins.LoggersPlugin for element Loggers
with params(Loggers={root})
2014-04-09 20:57:25,370 DEBUG Registering MBean
org.apache.logging.log4j2:type=sun.misc.Launcher$AppClassLoader@47858e
2014-04-09 20:57:25,370 DEBUG Registering MBean
org.apache.logging.log4j2:type=sun.misc.Launcher$AppClassLoader@47858e,component=StatusLogger
2014-04-09 20:57:25,385 DEBUG Registering MBean
org.apache.logging.log4j2:type=sun.misc.Launcher$AppClassLoader@47858e,component=ContextSelector
2014-04-09 20:57:25,385 DEBUG Registering MBean
org.apache.logging.log4j2:type=sun.misc.Launcher$AppClassLoader@47858e,component=Loggers,name=
2014-04-09 20:57:25,385 DEBUG Registering MBean
org.apache.logging.log4j2:type=sun.misc.Launcher$AppClassLoader@47858e,component=Appenders,name=A1
2014-04-09 20:57:25,385 DEBUG Reconfiguration completed
...
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]