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

Setting hazelcast.mc.max.visible.instance.count to Integer.MAX or a huge value causes OOME #12095

Closed
gokhanoner opened this issue Jan 6, 2018 · 2 comments

Comments

@gokhanoner
Copy link
Contributor

@gokhanoner gokhanoner commented Jan 6, 2018

Reproducer

Run a ManCenter & start an HZ instance using the below code & create an empty map proxy.

        System.setProperty("hazelcast.mc.max.visible.instance.count", String.valueOf(Integer.MAX_VALUE));
        Config config = new Config();
        config.getManagementCenterConfig().setEnabled(true).setUrl("http://localhost:8080/mancenter");
        HazelcastInstance hz = Hazelcast.newHazelcastInstance(config);
        hz.getMap("test");

I believe issue is this line: https://github.com/hazelcast/hazelcast/blob/master/hazelcast/src/main/java/com/hazelcast/internal/management/TimedMemberStateFactory.java#L227

Either here or inside com.hazelcast.util.SetUtil.createHashSet, we should prevent creation of huge preallocated maps/sets.

@emre-aydin emre-aydin added this to the 3.9.3 milestone Jan 8, 2018
@emre-aydin emre-aydin self-assigned this Jan 8, 2018
emre-aydin added a commit to emre-aydin/hazelcast that referenced this issue Jan 8, 2018
hazelcast.mc.max.visible.instance.count group property is used for
limiting the number of visible instances on Management Center. Its
default value is updated to Integer.MAX_VALUE, effectively removing
the limit if it's not configured explicitly. The current value of 100
confuses user when it's hit, as the users don't configure them. Should
it be needed to limit the number of visible instances, it can still be
configured to a lower number.

Also fixes hazelcast#12095
@mmedenjak
Copy link
Contributor

@mmedenjak mmedenjak commented Jan 10, 2018

@emre-aydin I see the PR is merged. Can we close the issue?

@emre-aydin
Copy link
Member

@emre-aydin emre-aydin commented Jan 10, 2018

@mmedenjak Sure, that should've happened automatically but anyway, I'm closing the issue.

@emre-aydin emre-aydin closed this Jan 10, 2018
emre-aydin added a commit to emre-aydin/hazelcast that referenced this issue Jan 10, 2018
hazelcast.mc.max.visible.instance.count group property is used for
limiting the number of visible instances on Management Center. Its
default value is updated to Integer.MAX_VALUE, effectively removing
the limit if it's not configured explicitly. The current value of 100
confuses user when it's hit, as the users don't configure them. Should
it be needed to limit the number of visible instances, it can still be
configured to a lower number.

Also fixes hazelcast#12095

(cherry picked from commit 44e7628)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.