Your message dated Thu, 8 Feb 2024 13:34:45 +0000
with message-id
<ca+crswmxv8izhwtkw4ugn2wfdgcyfo8f2sj_ep0wclomdac...@mail.gmail.com>
and subject line Re: Bug#1062654: openjdk-17-jre-headless: Segfault in
jspawnhelper
has caused the Debian Bug report #1062654,
regarding openjdk-17-jre-headless: Segfault in jspawnhelper
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1062654: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1062654
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: openjdk-17-jre-headless
Version: 17.0.10+7-1~deb12u1
Severity: important
In 17.0.10+7-1~deb12u1 from bookworm-security, jspawnhelper segfaults
on startup.
$ /usr/lib/jvm/java-17-openjdk-amd64/lib/jspawnhelper
Segmentation fault
In real applications, this manifests as a failure to spawn subprocesses.
With 17.0.9+9-1~deb12u1 from bookworm, jspawnhelper shows an
informational message when run directly.
$ /usr/lib/jvm/java-17-openjdk-amd64/lib/jspawnhelper
This command is not for general use and should only be run as the
result of a call to
ProcessBuilder.start() or Runtime.exec() in a java application
-- System Information:
Debian Release: 12.4
APT prefers stable-security
APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-17-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages openjdk-17-jdk-headless depends on:
ii libc6 2.36-9+deb12u4
ii openjdk-17-jre-headless 17.0.10+7-1~deb12u1
ii zlib1g 1:1.2.13.dfsg-1
openjdk-17-jdk-headless recommends no packages.
Versions of packages openjdk-17-jdk-headless suggests:
pn openjdk-17-demo <none>
pn openjdk-17-source <none>
--- End Message ---
--- Begin Message ---
On Wed, 7 Feb 2024 at 17:12, Sebastian Andrzej Siewior <
[email protected]> wrote:
> You can install the upgrade and then you need to restart everything java
> related that is still running and using the old java version.
>
Thanks for the tip. The relevant change is
https://github.com/openjdk/jdk17u/commit/cd6cb730c934d8e16d4bd8e3342e59e806f158f9,
which causes jspawnhelper to read its argument from argv[1] rather than
whatever the last argument happens to be. There is a corresponding change
in the JVM to pass the FD numbers in argv[1] rather than argv[0]. This
explains why I wasn't able to reproduce the crash in a standalone Java
program.
The segfault when invoking jspawnhelper directly is because argv[1] is used
without first checking that argc >= 2, so when invoked with no arguments
the program reads 1 past the end of argv and then passes the result to
sscanf. Not great, but not a problem in normal usage.
– Will
--- End Message ---