Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

sebastiankirsch/classloading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ℹ️ Since log4j:log4j isn't maintained any longer, this repository is archived to shut up Dependabot.

classloading

A small test setup to demonstrate the issues described here: http://stackoverflow.com/questions/15543521/mixed-usage-of-log4j-and-commons-logging-causes-a-class-loading-deadlock

The three tests TestMixedLoggerInstantiation, TestLoadingByClassForName & TestLoadingMixed try to reconstruct said scenario. The first close to real life, the other two by reducing it to the essence.
A deadlock isn't produced often, and depending on the used hardware, may never occur.

Therefore, the test TestClassLoadingDeadlock is an even more simplified scenario reduced to the problem of a classloading deadlock. This proved to be very likely in producing a deadlock (at least on my hardware).

Log4j 2

Note that Log4j 2 no longer sports the problematic class hierarchy, and thus shouldn't produce the discussed behavior.