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

Use of Unsafe in High Scale break on Android #3554

Closed
donv opened this Issue Dec 20, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@donv
Member

donv commented Dec 20, 2015

Using jruby-jars 1.7.23 with Ruboto results in this exception:

https://travis-ci.org/ruboto/ruboto/jobs/97978906#L4896 :

W/System.err(  870): Caused by: java.lang.RuntimeException: Could not obtain access to sun.misc.Unsafe
W/System.err(  870):    at org.cliffc.high_scale_lib.UtilUnsafe.getUnsafe(UtilUnsafe.java:25)
W/System.err(  870):    at org.cliffc.high_scale_lib.NonBlockingHashMapLong.<clinit>(NonBlockingHashMapLong.java:88)
W/System.err(  870):    ... 91 more
W/System.err(  870): Caused by: java.lang.NoSuchFieldException: theUnsafe
W/System.err(  870):    at java.lang.Class.getDeclaredField(Class.java:631)
W/System.err(  870):    at org.cliffc.high_scale_lib.UtilUnsafe.getUnsafe(UtilUnsafe.java:21)

JRuby uses Unsafe already, so I am not sure what the problem is with High Scale. Any help would be great.

@donv donv added this to the JRuby 1.7.24 milestone Dec 20, 2015

@mkristian

This comment has been minimized.

Show comment
Hide comment
@mkristian

mkristian Dec 21, 2015

Member

another high scale issue is #3555

Member

mkristian commented Dec 21, 2015

another high scale issue is #3555

@kares

This comment has been minimized.

Show comment
Hide comment
@kares

kares Dec 21, 2015

Member

seems to me that this pretty much nails that we're better off extracting the NonBlockingHashMapLong class into our own and managing the missing Unsafe. // cc @headius

Member

kares commented Dec 21, 2015

seems to me that this pretty much nails that we're better off extracting the NonBlockingHashMapLong class into our own and managing the missing Unsafe. // cc @headius

@kares

This comment has been minimized.

Show comment
Hide comment
@kares

kares Dec 22, 2015

Member

one solution is to port over the needed class with adjustments: #3560 ... and avoid packaging the .jar (which also resolves packaging patched JDK classes - #3555)

Member

kares commented Dec 22, 2015

one solution is to port over the needed class with adjustments: #3560 ... and avoid packaging the .jar (which also resolves packaging patched JDK classes - #3555)

@kares kares added the regression label Dec 22, 2015

@kares kares closed this Jan 2, 2016

@donv

This comment has been minimized.

Show comment
Hide comment
@donv

donv Jan 2, 2016

Member

@kares Thanks!

Member

donv commented Jan 2, 2016

@kares Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment