Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamicProxySupport is not thread safe #1927

Closed
stuartwdouglas opened this issue Dec 4, 2019 · 9 comments
Closed

DynamicProxySupport is not thread safe #1927

stuartwdouglas opened this issue Dec 4, 2019 · 9 comments
Assignees
Milestone

Comments

@stuartwdouglas
Copy link

I have seen a random failure in the Quarkus test suite where a JDK proxy was not created. It appears that DynamicProxySupport.addProxyClass is called from multiple threads, but is not thread safe. I think com.oracle.svm.reflect.proxy.DynamicProxySupport#proxyCache needs to be changed to a ConcurrentHashMap.

@cstancu
Copy link
Member

cstancu commented Dec 4, 2019

Thank you for reporting, I will merge the fix soon. You are right DynamicProxySupport.proxyCache can be modified concurrently via SubstrateGraphBuilderPlugins.interceptProxyInterfaces().

@cstancu
Copy link
Member

cstancu commented Dec 5, 2019

Fixed by a5aa34b.

@jaikiran
Copy link
Contributor

jaikiran commented Dec 8, 2019

@cstancu, a general question about GraalVM releases - does this fix (that has landed in master branch) end up in 19.3.x releases or should one specifically request them to be backported to 19.3.x, given that master branch appears to be 20.x?

@gsmet
Copy link

gsmet commented Dec 8, 2019

Yes, looks like we will need this one in 19.3.1 if we want to be able to support JDK 11 with GraalVM in Quarkus.

Thanks for considering it.

@geoand
Copy link

geoand commented Dec 8, 2019

Hopefully we'll be able to catch things like this sooner in the near future when we introduce Quarkus master / GraalVM master tests (although this issue showed up even without master).

@cstancu
Copy link
Member

cstancu commented Dec 9, 2019

Yes, this fix will be included in 19.3.1. In general, we automatically backport critical fixes like this one, but you can request a backport if you need it.

stuartwdouglas added a commit to stuartwdouglas/quarkus that referenced this issue Dec 9, 2019
Workaround for oracle/graal#1927

Should be possible to remove this in 19.3.1

This is a different problem to the previous one that this
fix worked around, however because we were using this setting
we only ran into the thread safety problem after it was removed.
gsmet pushed a commit to quarkusio/quarkus that referenced this issue Dec 9, 2019
Workaround for oracle/graal#1927

Should be possible to remove this in 19.3.1

This is a different problem to the previous one that this
fix worked around, however because we were using this setting
we only ran into the thread safety problem after it was removed.
@emmanuelbernard
Copy link

emmanuelbernard commented Dec 10, 2019

Hey @cstancu do you do backports at the last minute or as the upstream fix happen?
It would be great for quarkus to get it as the upstream fix happen so we could test early.
In our case, your jan release will be just a couple of days before the Quarkus 1.2 if things go as planned so not a lot of time to test before the release.

Georgios (Quarkus) is working on a CI job for Quarkus master on GraalVM master for info.

@cstancu
Copy link
Member

cstancu commented Dec 10, 2019

We usually try to do the backports as the fixes happen. @gilles-duboscq when is the 19.3.1 release branch planned?

@emmanuelbernard
Copy link

Gilles told me, trying to make it happen in a week or two.

@cstancu cstancu modified the milestones: 20.0, 19.3.1 Dec 11, 2019
mmusgrov pushed a commit to mmusgrov/quarkus that referenced this issue Dec 13, 2019
Workaround for oracle/graal#1927

Should be possible to remove this in 19.3.1

This is a different problem to the previous one that this
fix worked around, however because we were using this setting
we only ran into the thread safety problem after it was removed.
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 4, 2022
    Workaround for oracle/graal#1927

    Should be possible to remove this in 19.3.1

    This is a different problem to the previous one that this
    fix worked around, however because we were using this setting
    we only ran into the thread safety problem after it was removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants