Play apps with a bundled start script split JAVA_OPTS unquoted, breaking multi-word values
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 42/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Bereich
- cloud, devops, infrastructure
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Go
- Sterne
- 452
- Forks
- 2.5k
- Ø Merge
- 1 T. 2 Std.
- Gemergte PRs (30 T.)
- 23
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus cloudfoundry/java-buildpack
-
v5.1.0 GA release planOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
cloudfoundry/java-buildpack#1423 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Support configurable initial/minimum heap size relative to (/as a percentage of) calculated XmxOffen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
cloudfoundry/java-buildpack#1377 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
cloudfoundry/java-buildpack#1364 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
cloudfoundry/java-buildpack#1342 · 1 Kommentar · 2 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
cloudfoundry/java-buildpack#1151 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in cloudfoundry/java-buildpack
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 4 Tagen
-
bug needs-acceptance
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
vllm-project/semantic-router#4744 ·
Maintainer antworten meist innerhalb von 1 Tag
-
ScalingModifiers formula fails with "formula returned non-float result" when expression evaluates to an integerEvtl. vergeben @Sarthak-Pandey hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
kedacore/keda#8270 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug from-studio
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 63/100
esengine/DeepSeek-Reasonix#12355 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug]: Gemini provider replaces a client-supplied `extra_content.google.thought_signature` with `skip_thought_signature_validator`, and writes the sentinel on every replayed function call (old turns, all models)Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag