#470: run-program issues with OpenJDK 11 -------------------------------+-------------------- Reporter: Mark Evenson | Type: defect Status: new | Priority: major Milestone: 1.7.2 | Component: other Version: 1.7.1-dev | Keywords: Parent Tickets: | -------------------------------+-------------------- <https://mailman.common-lisp.net/pipermail/armedbear- devel/2020-July/004080.html>
{{{
+ The prebuilt jar is unable to use sys:run-program at all.
+ When built from source, sys:run-program works, but sys:process-pid does not.
lisp-implementation-version:
"1.7.1" "OpenJDK_64-Bit_Server_VM-Debian-11.0.7+10-post-Debian-3deb10u1" "amd64-Linux-4.19.0.9-amd64" }}}
#470: run-program issues with OpenJDK 11 -------------------------------+----------------------- Reporter: Mark Evenson | Owner: (none) Type: defect | Status: new Priority: major | Milestone: 1.7.2 Component: other | Version: 1.7.1-dev Resolution: | Keywords: Parent Tickets: | -------------------------------+-----------------------
Comment (by Mark Evenson):
Confirmed as failing from ABCL invoked as shell script, but *not* running under SLIME.
#470: run-program issues with OpenJDK 11 -------------------------------+----------------------- Reporter: Mark Evenson | Owner: (none) Type: defect | Status: new Priority: major | Milestone: 1.7.2 Component: other | Version: 1.7.1-dev Resolution: | Keywords: Parent Tickets: | -------------------------------+-----------------------
Comment (by Mark Evenson):
Replying to [comment:1 Mark Evenson]:
Confirmed as failing from ABCL invoked as shell script, but *not*
running under SLIME.
The cause of this error is the load of {{{run_program.abcl}}} fails to find {{{java.lang.UNIXProcess}}}. This can be replicated even from a source build if ABCL is invoked as {{{ java -jar abcl.jar }}}
The {{{java.lang.UNIXProcess}}} only comes into existence after the initialization of {{{java.lang.Process}}} occurs. And since {{{java.lang.UNIXProcess}}} is not going to exist under Windows, we need to figure out a better strategy.
Interestingly, the constant is being compiled into a SHARPSIGN_DOT reader macro.
{{{ #61 = Utf8 #.(JAVA:JCLASS "java.lang.UNIXProcess") #62 = String #61 // #.(JAVA:JCLASS "java.lang.UNIXProcess") }}}
#470: run-program issues with OpenJDK 11 -------------------------------+----------------------- Reporter: Mark Evenson | Owner: (none) Type: defect | Status: new Priority: major | Milestone: 1.7.2 Component: other | Version: 1.7.1-dev Resolution: | Keywords: Parent Tickets: | -------------------------------+-----------------------
Comment (by Mark Evenson):
This error occurs for all tested openjdk11 on freebsd, Linux, and macOS.
#470: run-program issues with OpenJDK 11 -------------------------------+----------------------- Reporter: Mark Evenson | Owner: (none) Type: defect | Status: new Priority: major | Milestone: 1.7.2 Component: other | Version: 1.7.1-dev Resolution: | Keywords: Parent Tickets: | -------------------------------+-----------------------
Comment (by Mark Evenson):
Apparently, the Lisp compiler in ABCL is behaving differently depending on whether it is running on openjdk8 versus openjdk11. When run-program.lisp is compiled with openjdk8 the SHARPSIGN-DOT reader macro is stuffed into the string, when compiled with openjdk11, the unadorned string is utilized. Since the ABCL compiler is written entirely in Lisp, there should be no such platform differences present, and yet this problem is reproducible.
Well, I needed to understand the current compiler better anyways, so this is good practice at examining its innards…
#470: run-program issues with OpenJDK 11 -------------------------------+----------------------- Reporter: Mark Evenson | Owner: (none) Type: defect | Status: new Priority: major | Milestone: 1.7.2 Component: other | Version: 1.7.1-dev Resolution: | Keywords: Parent Tickets: | -------------------------------+-----------------------
Comment (by Mark Evenson):
This bug occurs when the system compiled with openjdk8 is run under the openjdk11 runtime. Inconsistently, the abcl-1.7.0 binaries were compiled with openjdk11 while the abcl-1.7.1 binaries were compiled with openjdk8.
In openjdk11, the {{{java.lang.UNIXProcess}}} class has been replaced with {{{java.lang.ProcessImpl}}}, so our code needs to conditionally find the pid of a given process based on the platform that the ABCL finds itself running upon.
As a workaround until we fix and release the next version of ABCL, one may get {{{sys:run-program}}} running as long as one doesn't try to get the pid via running the following code
{{{ (ignore-errors (sys:run-program "true" nil)) }}}
#470: run-program issues with OpenJDK 11 -------------------------------+----------------------- Reporter: Mark Evenson | Owner: (none) Type: defect | Status: closed Priority: major | Milestone: 1.7.2 Component: other | Version: 1.7.1-dev Resolution: fixed | Keywords: Parent Tickets: | -------------------------------+----------------------- Changes (by Mark Evenson):
* status: new => closed * resolution: => fixed
Comment:
Fixed with https://abcl.org/trac/changeset/15358.
https://github.com/armedbear/abcl/commit/7021a905222c2b743422b607409233771e4ed623
armedbear-ticket@common-lisp.net