jruby-jars jruby-core should not include java/util/concurrent/ConcurrentHashMap.class #3555

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

Comments

Projects
None yet
3 participants
@donv
Member

donv commented Dec 20, 2015

Starting with the inclusion of High Scale in JRuby 1.7.23, the jruby-jars gem includes java/util/concurrent/ConcurrentHashMap.class in the jruby-core jar.

This causes a security exception when an application tries to load the class outside the bootloader.

jruby-jars should not contain any packages in the java packages.

@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

the problem here is that it is not clear whether High Scale needs a patched ConcurrentHashMap.class to for its library - which I would assume or guessing from fact that they do pack into their jar. so first we need to find out whether this class is there on purpose or not. and maybe find out whether JRuby uses this feature which uses this ConcurrentHashMap

but in the long run I agree that jruby should not pack such classes, other places then ruboto will run into the problem sooner or later.

Member

mkristian commented Dec 21, 2015

the problem here is that it is not clear whether High Scale needs a patched ConcurrentHashMap.class to for its library - which I would assume or guessing from fact that they do pack into their jar. so first we need to find out whether this class is there on purpose or not. and maybe find out whether JRuby uses this feature which uses this ConcurrentHashMap

but in the long run I agree that jruby should not pack such classes, other places then ruboto will run into the problem sooner or later.

@kares

This comment has been minimized.

Show comment
Hide comment
@kares

kares Dec 21, 2015

Member

wow - quite an intrusive surprise. for the record the high scale library was introduced only to use a concurrent IntHashMap alternative: NonBlockingHashMapLong ... which does not depend on ConcurrentHashMap directly.

from the README it seems the patched classes are optional (and thus not really needed to be packaged by JRuby): https://github.com/boundary/high-scale-lib#original-readme
p.s. they also have a patched java.util.Hashtable class

Member

kares commented Dec 21, 2015

wow - quite an intrusive surprise. for the record the high scale library was introduced only to use a concurrent IntHashMap alternative: NonBlockingHashMapLong ... which does not depend on ConcurrentHashMap directly.

from the README it seems the patched classes are optional (and thus not really needed to be packaged by JRuby): https://github.com/boundary/high-scale-lib#original-readme
p.s. they also have a patched java.util.Hashtable class

@kares

This comment has been minimized.

Show comment
Hide comment
@kares

kares Jan 2, 2016

Member

this is now also resolved with #3560 (will be merged over to master)

Member

kares commented Jan 2, 2016

this is now also resolved with #3560 (will be merged over to master)

@kares kares closed this Jan 2, 2016

@donv

This comment has been minimized.

Show comment
Hide comment
@donv

donv Jan 2, 2016

Member

Thanks!

Member

donv commented Jan 2, 2016

Thanks!

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