Closed btwilk closed 2 months ago
Hi @btwilk !
It seems log4j2 had this kind of problem before and the problem should have been fixed for your version. https://issues.apache.org/jira/browse/LOG4J2-2266
This happens because lincheck uses a custom classloader for byte-code transformation and log4j has a class that can not be loaded in this way. In general, we can not fix this. If a class can not be loaded with a custom classloader, then its byte-code can not be transformed.
ignore
guarantee makes lincheck ignore what happens in the class, but does not remove method calls from byte-code. We can potentially make it not transform a class, but this will introduce new problems. For example, when a superclass A
is transformed but the class B extends A
itself is not, this will lead to a JVM failure when trying to do val a: A = B()
We will eliminate custom class loaders in Lincheck, which should solve the issue.
Hi, @btwilk! It has taken a while to address the issue, but the recent 2.30 release should've fixed it. Could you please check?
@btwilk I'm closing this issue, as it should be fixed now. Please reopen it if you are still facing the bug.
lincheck version: 2.15 log4j version: 2.17.2
In my system under test I have
When I run a lincheck test I get
Ignoring log4j classes with
.addGuarantee(forClasses(LogManager::class, Logger::class).allMethods().ignore())
doesn't help.Non-lincheck unit tests for the system under test work fine.