Shared state in ByteBuddy basic proxies leads to intermittently broken persistence

Description

When the ByteBuddy BasicProxyFactoryImpl is used to generate proxies, the proxies it generates share a common ProxyConfiguration.Interceptor - which is used to hold the bean state. This then breaks during concurrent use as parallel threads compete for the state.

Proposed solution is to instantiate a new interceptor per innovation of BasicProxyFactoryImpl. getProxy()

A PR has been raised as per this proposal.

Activity

Show:

Henry Clout March 31, 2020 at 9:10 PM

Ignore the above comment. I added a test to ByteBuddyBasicProxyFactoryTest to demonstrate the issue and fix.

Henry Clout March 30, 2020 at 10:55 PM

I’ve created a PR with a fix, but an as yet to be completed test. Inlined from the PR:

I’ll keep plugging away at the test, but any pointers would be received with gratitude!

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created March 30, 2020 at 10:35 PM
Updated February 13, 2025 at 10:17 AM
Resolved January 10, 2025 at 2:58 PM