Play apps with a bundled start script split JAVA_OPTS unquoted, breaking multi-word values
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- cloud, devops, infrastructure
調査の方向性
This is the start-script launch path for Play apps (bin/<name> from sbt-native-packager), not the buildpack javaexec path used when no start script exists. Trace how JAVA_OPTS is passed into that script versus the no-start-script branch (play.core.server.NettyServer). Done means multi-word JAVA_OPTS (e.g. a quoted cron -D) survive as tokens, likely via -J<flag> as the issue suggests, without relying on unquoted ${java_opts[@]}. Related context is cloudfoundry/java-buildpack#1435.
索引モデルが issue の本文から書いたものです。
説明
Play apps packaged with a start script (bin/<name>, generated by sbt-native-packager, used whenever the app ships one — staged and dist Play 2.x builds) are launched directly via that script, not via the buildpack's shell-free javaexec launcher. javaexec is only used when no start script is present.
sbt-native-packager's own script template does:
if [[ "$JAVA_OPTS" != "" ]]; then
java_opts="${JAVA_OPTS}"
fi
execRunner "$java_cmd" ${java_opts[@]} ...
${java_opts[@]} is unquoted, so $JAVA_OPTS is word-split on whitespace (and glob-expanded). A value containing embedded spaces, e.g. a quoted cron expression (-DcronExpr="0 */7 * * * *"), splits into separate bare words; a bare word like */7 with no leading - can be misread as the main class by java, causing Could not find or load main class *.7 and a crash loop.
Command substitution in the value cannot occur here (it's plain variable expansion, not re-parsed source) — this is a launch-correctness issue, pre-existing and independent of #1432/#1435's javaexec fix, which only covers the no-start-script branch (play.core.server.NettyServer invocation).
Possible fix: route the start-script branch through a safe tokenizer too, passing JAVA_OPTS tokens as -J<flag> arguments (the convention sbt-native-packager scripts already support for exactly this purpose) instead of relying on the script reading $JAVA_OPTS directly.
Found while investigating cloudfoundry/java-buildpack#1435.
- 主要言語
- Go
- スター
- 452
- フォーク
- 2.5k
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 23
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudfoundry/java-buildpack のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
cloudfoundry/java-buildpack#1423 ·
メンテナーはふだん 1 日以内に返信
-
Support configurable initial/minimum heap size relative to (/as a percentage of) calculated Xmxオープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
cloudfoundry/java-buildpack#1377 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
cloudfoundry/java-buildpack#1364 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
cloudfoundry/java-buildpack#1342 · コメント 1 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
cloudfoundry/java-buildpack#1151 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
cloudfoundry/java-buildpack の issue をすべて見る
似ている issue
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 4 日以内に返信
-
bug needs-acceptance
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
vllm-project/semantic-router#4744 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jaegertracing/jaeger#9794 ·
メンテナーはふだん 1 日以内に返信
-
ScalingModifiers formula fails with "formula returned non-float result" when expression evaluates to an integer対応中かも @Sarthak-Pandey が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
kedacore/keda#8270 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信