Skip to content

Concurrent loading of generated classes can result in a deadlock #638

@edalquist

Description

@edalquist

Data classes have proguard protection which results in a static initializer call to Data.nullOf.
Data.nullOf synchronizes on the static NULL_CACHE field.

When a class is loaded it triggers the call to Data.nullOf which then may trigger additional static initializers of field types. If one of the field types in the dependency tree is loaded concurrently it may already be waiting on Data.nullOf.

The result is a deadlock in class loading.

Related to #24

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions