You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2017/03/09 23:56:38 UTC

[jira] [Updated] (SOLR-10184) bin/solr fails to run on java9 due to unrecognized GC options

     [ https://issues.apache.org/jira/browse/SOLR-10184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-10184:
----------------------------
    Attachment: SOLR-10184.patch

thanks for the links Uwe, JEP 158 is interesting.

Between the GC logging options that have been removed, and how the unified logging now deals with multiple tags (gc, all, etc..) & output specifiers (stdout, stderr, for file) in a single '-Xlog' param; it doesn't look viable to have an _exact_ java9 equivilent for what the {{bin/solr}} script currently does with {{SOLR_LOGS_DIR}} & {{GC_LOG_OPTS}}

The attached patch attempts to support the same ideas as best as (i can see) possible under java9...

* if the user doesn't configure a {{GC_LOG_OPTS}}, then we (still) use a (verbose) default value for this param via '-Xlog:gc\*'
* if the user configures a blank value for {{GC_LOG_OPTS}}, we (still) leave the param blank
* if the effective value of {{GC_LOG_OPTS}} is non blank, then foreach param option specified in {{GC_LOG_OPTS}}:
** if it starts with '-Xlog:gc', and does not include an output specifier, then:
*** add a 'file' output specifier based on {{SOLR_LOGS_DIR}} (to mimic the '-Xloggc' param we use w/ java8)
*** add {{time,uptime}} decorators (to mimic the -XX params we use w/ java8)
*** add {{filecount=9,filesize=20000}} output-options (to mimic the -XX params we use w/ java8)

(for simplicity, if the user wants to specify multiple JEP158 tags in the '-Xlog' param , then the tag list has to start with "gc" in order for us to add a file option -- otherwise we ignore it.  likewise if the user wants to specify their own decorators or output-options, then they must also specify their own output (file, or stdout, or stderr) specifier as well, since it must come first in the '-Xlog' format string)

While fixing this, I also did some small cleanup in how the {{java -version}} output is parsed.

Would appreciate detailed review & manual testing from folks since this type of script work is hard to write automated tests for.

> bin/solr fails to run on java9 due to unrecognized GC options
> -------------------------------------------------------------
>
>                 Key: SOLR-10184
>                 URL: https://issues.apache.org/jira/browse/SOLR-10184
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: scripts and tools
>            Reporter: Hoss Man
>              Labels: java9
>         Attachments: SOLR-10184.patch
>
>
> {noformat}
> hossman@tray:~/lucene/dev/solr [master] $ bin/solr start -f
> Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
> Java HotSpot(TM) 64-Bit Server VM warning: Option UseParNewGC was deprecated in version 9.0 and will likely be removed in a future release.
> Unrecognized VM option 'PrintHeapAtGC'
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
> {noformat}
> (untested) workaround is to override GC_LOG_OPTS in {{solr.in.sh}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org