Skip to content

[Spike] Revisit IllegalAccessError #2272

@kanderson250

Description

@kanderson250

This is a spike to revisit the IllegalAccessError that sometimes occurs when the agent is run with scala frameworks on Scala 2.12.x.

The source of this error is a bug in scala itself, present with JDK 9+, related to assignment of final fields by trait setters. The bug was resolved with the release of Scala 2.13.5.

Initially, we mitigated the bug by incorporating Scala's own bug fix into the agent weaver. This proved to be a brittle solution- the IAE would pop up, even with the fix (likely related to Scala's own discoveries of edge cases that were unaddressed in their original fix). It was unreliable enough that we removed the agent fix in agent 8.10+.

We agreed that it was unfeasible to continue fighting the issue agent side and advised customers to either run their apps with Scala 2.12 + Java 8, or 2.13.4+ with Java 11+.

However, due to the difficulty in changing Scala and JDK versions, this remains an issue for some customers on Scala 2.12 and JDK 11+, so we're reopening the spike to see if there are any possible paths forward we haven't yet considered.

Metadata

Metadata

Assignees

Labels

2Story Point Estimate

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions