[
https://issues.apache.org/jira/browse/GEODE-4275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Juan José Ramos Cassella resolved GEODE-4275.
---------------------------------------------
Resolution: Fixed
Fix Version/s: 1.4.0
Changes have been merged into develop branch.
[CommitID|https://github.com/apache/geode/commit/33d7f4fcd925e4f32b3232aedde34ea2c0cdfe16]:
33d7f4fcd925e4f32b3232aedde34ea2c0cdfe16.
> Duplicate CMSInitiatingOccupancyFraction Startup Parameter
> ----------------------------------------------------------
>
> Key: GEODE-4275
> URL: https://issues.apache.org/jira/browse/GEODE-4275
> Project: Geode
> Issue Type: Bug
> Components: gfsh
> Reporter: Juan José Ramos Cassella
> Assignee: Juan José Ramos Cassella
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.4.0
>
>
> If you start a server/locator by specifying both {{max-heap}} and
> {{-XX:CMSInitiatingOccupancyFraction}}, logs show that a default
> {{CMSInitiatingOccupancyFraction`}} is also added in addition to the user
> specified value.
> As an example, the command {{start server --name=server1 --max-heap=1g
> --J=-XX:CMSInitiatingOccupancyFraction=50 --server-port=0}} produces the
> following output:
> {noformat}
> Command Line Parameters:
> -Dgemfire.start-dev-rest-api=false
> -Dgemfire.use-cluster-configuration=true
> -XX:CMSInitiatingOccupancyFraction=50
> -XX:OnOutOfMemoryError=kill -KILL %p
> -Xmx1g
> -XX:+UseConcMarkSweepGC
> -XX:CMSInitiatingOccupancyFraction=60
> -Dgemfire.launcher.registerSignalHandlers=true
> -Djava.awt.headless=true
> -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
> {noformat}
> There are 2 entries for {{XX:CMSInitiatingOccupancyFraction}}.
> The problem resides within the {{addMaxHeap}} method of the
> {{StartMemberUtils}} class:
> {code:title=StartMemberUtils.java|borderStyle=solid}
> static void addMaxHeap(final List<String> commandLine, final String
> maxHeap) {
> if (StringUtils.isNotBlank(maxHeap)) {
> commandLine.add("-Xmx" + maxHeap);
> commandLine.add("-XX:+UseConcMarkSweepGC");
> commandLine.add("-XX:CMSInitiatingOccupancyFraction=" +
> CMS_INITIAL_OCCUPANCY_FRACTION);
> }
> }
> {code}
> The method is called by both the {{StartLocatorCommand}} and
> {{StartServerCommand}} after the jvmArgs have been already added to the
> parsed {{commandLine}}. The solution would be to simply check the collection
> before adding the {{-XX:CMSInitiatingOccupancyFraction}} option.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)