It appears that java.lang.UNIXProcess was removed in OpenJDK 9 or
thereabouts, assuming I'm interpreting
https://github.com/openjdk/jdk/commit/aa6b19f38ee4dc69cac664d1211bff0e69b31…
correctly (/definitely/ not a Java developer here...).
This seems to make run-program unusable when using prebuilt jars on
recent JREs. Using the prebuilt 1.7.0 release and OpenJDK 11, I get the
errors shown in prebuilt-openjdk11.txt (attached).
If compiling using OpenJDK 11, run-program seems usable, but any attempt
to get the PID of a process gives the error in from-source-openjdk11.txt
(attached).
-Eric
VM settings:
Max. Heap Size (Estimated): 7.79G
Using VM: OpenJDK 64-Bit Server VM
Armed Bear Common Lisp 1.7.0
Java 11.0.7 Oracle Corporation
OpenJDK 64-Bit Server VM
Low-level initialization completed in 0.198 seconds.
Startup completed in 1.107 seconds.
Type ":help" for a list of available commands.
CL-USER(1): (sys:run-program "ls" nil)
Error loading jar:file:/home/abcl/work/abcl/dist/abcl.jar!/org/armedbear/lisp/run-program.abcl at line 278 (offset 19142)
#<THREAD "interpreter" {5C1AE0C4}>: Debugger invoked on condition of type ERROR
Class not found: java.lang.UNIXProcess
Restarts:
0: TOP-LEVEL Return to top level.
[1] SYS(2): 0
java.lang.ExceptionInInitializerError
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.lang.Class.newInstance(Class.java:584)
at org.armedbear.lisp.FaslClassLoader.loadFunction(FaslClassLoader.java:130)
at org.armedbear.lisp.FaslClassLoader$pf_get_fasl_function.execute(FaslClassLoader.java:165)
at org.armedbear.lisp.LispThread.execute(LispThread.java:832)
at org.armedbear.lisp.Lisp.evalCall(Lisp.java:582)
at org.armedbear.lisp.Lisp.eval(Lisp.java:540)
at org.armedbear.lisp.Lisp.evalCall(Lisp.java:577)
at org.armedbear.lisp.Lisp.eval(Lisp.java:540)
at org.armedbear.lisp.Lisp.progn(Lisp.java:709)
at org.armedbear.lisp.SpecialOperators$sf_progn.execute(SpecialOperators.java:273)
at org.armedbear.lisp.Lisp.eval(Lisp.java:530)
at org.armedbear.lisp.Load.faslLoadStream(Load.java:667)
at org.armedbear.lisp.Load$init_fasl.execute(Load.java:457)
at org.armedbear.lisp.LispThread.execute(LispThread.java:832)
at org.armedbear.lisp.Lisp.evalCall(Lisp.java:582)
at org.armedbear.lisp.Lisp.eval(Lisp.java:540)
at org.armedbear.lisp.Load.loadStream(Load.java:629)
at org.armedbear.lisp.Load.loadFileFromStream(Load.java:597)
at org.armedbear.lisp.Load.loadFileFromStream(Load.java:477)
at org.armedbear.lisp.Load.loadSystemFile(Load.java:375)
at org.armedbear.lisp.Load.loadSystemFile(Load.java:255)
at org.armedbear.lisp.Autoload.effectiveLoad(Autoload.java:110)
at org.armedbear.lisp.Autoload.load(Autoload.java:147)
at org.armedbear.lisp.Lisp.eval(Lisp.java:537)
at org.armedbear.lisp.Primitives$pf__eval.execute(Primitives.java:345)
at org.armedbear.lisp.LispThread.execute(LispThread.java:814)
at org.armedbear.lisp.Lisp.evalCall(Lisp.java:575)
at org.armedbear.lisp.Lisp.eval(Lisp.java:540)
at org.armedbear.lisp.Lisp.progn(Lisp.java:709)
at org.armedbear.lisp.Primitives$sf_block.execute(Primitives.java:3743)
at org.armedbear.lisp.Lisp.eval(Lisp.java:530)
at org.armedbear.lisp.Lisp.progn(Lisp.java:709)
at org.armedbear.lisp.Closure.execute(Closure.java:220)
at org.armedbear.lisp.Closure.execute(Closure.java:148)
at org.armedbear.lisp.LispThread.execute(LispThread.java:814)
at org.armedbear.lisp.Lisp$1.execute(Lisp.java:285)
at org.armedbear.lisp.Symbol.execute(Symbol.java:803)
at org.armedbear.lisp.LispThread.execute(LispThread.java:814)
at org.armedbear.lisp.top_level_47.execute(top-level.lisp:407)
at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:89)
at org.armedbear.lisp.Symbol.execute(Symbol.java:793)
at org.armedbear.lisp.LispThread.execute(LispThread.java:798)
at org.armedbear.lisp.top_level_48.execute(top-level.lisp:415)
at org.armedbear.lisp.LispThread.execute(LispThread.java:798)
at org.armedbear.lisp.Interpreter.run(Interpreter.java:361)
at org.armedbear.lisp.Main$1.run(Main.java:48)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.armedbear.lisp.Go
Error loading jar:file:/home/abcl/work/abcl/dist/abcl.jar!/org/armedbear/lisp/run-program.abcl at line 278 (offset 19142)
#<THREAD "interpreter" {5C1AE0C4}>: Debugger invoked on condition of type ERROR
Compiled function can't be loaded: org.armedbear.lisp.run_program_60 from org.armedbear.lisp.Pathname@49bd2fd0
Restarts:
0: TOP-LEVEL Return to top level.
[1] SYS(3): 0
CL-USER(4): (exit)
VM settings:
Max. Heap Size (Estimated): 7.79G
Using VM: OpenJDK 64-Bit Server VM
Armed Bear Common Lisp 1.7.1-dev
Java 11.0.7 Oracle Corporation
OpenJDK 64-Bit Server VM
Low-level initialization completed in 0.205 seconds.
Startup completed in 1.224 seconds.
Type ":help" for a list of available commands.
CL-USER(1): (sys:run-program "ls" nil :wait nil)
#S(SYSTEM:PROCESS :JPROCESS #<java.lang.ProcessImpl Process[pid=125, exitValue=0] {1E464845}> :%INPUT #S(SYSTEM::SYSTEM-STREAM) :%OUTPUT #S(SYSTEM::SYSTEM-STREAM) :%ERROR #S(SYSTEM::SYSTEM-STREAM))
CL-USER(2): (sys:process-pid *)
#<THREAD "interpreter" {7278E1D6}>: Debugger invoked on condition of type ERROR
Class not found: java.lang.UNIXProcess
Restarts:
0: TOP-LEVEL Return to top level.
[1] CL-USER(3): 0
CL-USER(4): (exit)
We are pleased to announce the immediate availablity of the [ABCL
1.7.0 release][].
After consuming a steady diet of java.nio.ByteBuffer objects over the
past month, the Bear has managed to incorporate the use of these
abstractions for arrays specialized on the commonly used unsigned-byte
types (or (unsigned-byte 8) (unsigned-byte 16) (unsigned-byte 32)).
This replacement of the use arrays of primitive bytes is denoted by
the presence of the :NIO keyword in CL:*FEATURES*.
With this :NIO overhaul, we have extended our implementation of ANSI
Common Lisp [CL:MAKE-ARRAY][] with two additional keywords,
viz. :NIO-BUFFER and :NIO-DIRECT.
The :NIO-BUFFER keyword argument allows one to construct a vector
directly utilizing the contents of an already allocated
java.nio.ByteBuffer object. When combined with the ability of JNA to
allocate memory on the heap via a malloc() system call, we implemented
shareable byte vectors in [CFFI-SYS:MAKE-SHAREABLE-BYTE-VECTOR][].
(let* ((length 16)
(byte-buffer (java:jstatic "allocate"
"java.nio.ByteBuffer" length)))
(make-array length :element-type ’(unsigned-byte 8)
:nio-buffer byte-buffer))
When the :NIO-DIRECT keyword argument is called with a non-NIL value,
the implementation creates a byte vector with a "directly allocated"
java.nio.ByteBuffer object. Such direct buffers typically have
somewhat higher allocation and deallocation costs than non-direct
buffers. The contents of direct buffers may reside outside of the
normal garbage-collected heap, and so their impact upon the memory
footprint of an application might not be obvious. It is therefore
recommended that direct buffers be allocated primarily for large,
long-lived buffers that are subject to the underlying system’s native
I/O operations. In general it is best to allocate direct buffers only
when they yield a measureable gain in program performance. In the near
future, we intend to exploring the performance gains available CL:LOAD
by accessing direct buffers memory mapped to our on-disk fasl
representation. Our fasls, as zipped archives, currently require a
new seek() from the beginning of the fasl for each component they
contain. With a memory mapped direct buffer we should be able to
simply read from the appropiate byte offset for each component.
A complete overview of the accumulated fixes and changes since the
previous release may be viewed in [CHANGES][].
[ABCL 1.7.0 release]: https://abcl.org/releases/1.7.0/
[java.nio.ByteBuffer]: https://www.doc.ic.ac.uk/csg-old/java/jdk6docs/api/java/nio/ByteBuffer.html
[CFFI-SYS:MAKE-SHAREABLE-BYTE-VECTOR]: https://github.com/cffi/cffi/commit/47136ad9a97c2df98dbcd13a068e14489ced5b03
[CHANGES]: https://abcl.org/svn/tags/1.7.0/CHANGES
[CL:MAKE-ARRAY]: https://github.com/armedbear/abcl/commit/6c4b7f3c11b2c8151f4599c9bddf5c0991…
--
"A screaming comes across the sky. It has happened before but there is nothing
to compare to it now."