Skip to content

[Bug]: 32-bit ARM build of openjdk-25 has Illegal instruction (also, unpatched TMP_BUFFER_LEN discovered) #27045

@robertkirkman

Description

@robertkirkman

Problem description

Unfortunately, for some reason only beginning with openjdk-25 and only with the 32-bit ARM build, an Illegal instruction error is occurring whenever the java command is run.

~ $ $PREFIX/lib/jvm/java-25-openjdk/bin/java
Illegal instruction        $PREFIX/lib/jvm/java-25-openjdk/bin/java
~ $ 

Creating and using a temporary debugging build causes the Illegal instruction error to turn into this more detailed Assertion Failed error:

[error occurred during error reporting (), id 0xe0000000, Internal Error (/home/builder/.termux-build/openjdk-25/src/src/hotspot/share/runtime/thread.hpp:660)]
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/builder/.termux-build/openjdk-25/src/src/hotspot/os/posix/perfMemory_posix.cpp:141), pid=911, tid=912
#  assert(strlen(tmpdir) == 4) failed: No longer using /tmp - update buffer size
#
# JRE version:  (25.0.1) (slowdebug build )
# Java VM: OpenJDK Server VM (slowdebug 25.0.1, mixed mode, sharing, g1 gc, linux-arm)
# Problematic frame:
# V  [libjvm.so+0xaef4fc]
#
# Core dump will be written. Default location: /data/data/com.termux/files/home/core.911
#

What steps will reproduce the bug?

# 32-bit ARM
pkg upgrade
pkg install openjdk-25
$PREFIX/lib/jvm/java-25-openjdk/bin/java

What is the expected behavior?

Usage: java [java options...] <application> [application arguments...]

Where <application> is one of:
  <mainclass>                to execute the main method of a compiled main class
  -jar <jarfile>.jar         to execute the main class of a JAR archive
  -m <module>[/<mainclass>]  to execute the main class of a module
  <sourcefile>.java          to compile and execute a source-file program

Where key java options include:
  --class-path <class path>
    where <class path> is a list of directories and JAR archives to search for class files, separated by ":"
  --module-path <module path>
    where <module path> is a list of directories and JAR archives to search for modules, separated by ":"
  -version
    to print product version to the error stream and exit

For additional help on usage:           java --help
For an interactive Java environment:    jshell

System information

Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__APK_FILE=/data/app/com.termux-1/base.apk
TERMUX_APP__APK_RELEASE=F_DROID
TERMUX_APP__APP_VERSION_CODE=1022
TERMUX_APP__APP_VERSION_NAME=0.119.0-beta.3
TERMUX_APP__DATA_DIR=/data/user/0/com.termux
TERMUX_APP__IS_DEBUGGABLE_BUILD=false
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__LEGACY_DATA_DIR=/data/data/com.termux
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PID=2043
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c512,c768
TERMUX_APP__SE_INFO=default
TERMUX_APP__TARGET_SDK=28
TERMUX_VERSION=0.119.0-beta.3
TERMUX__APPS_DIR=/data/user/0/com.termux/termux/apps
TERMUX__HOME=/data/data/com.termux/files/home
TERMUX__PREFIX=/data/data/com.termux/files/usr
TERMUX__ROOTFS_DIR=/data/data/com.termux/files
TERMUX__SE_PROCESS_CONTEXT=u:r:untrusted_app:s0:c512,c768
TERMUX__UID=10145
TERMUX__USER_ID=0
Packages CPU architecture:
arm
Subscribed repositories:
# sources.list
deb https://packages.termux.dev/apt/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://packages.termux.dev/apt/termux-x11 x11 main
# root-repo (sources.list.d/root.list)
deb https://packages.termux.dev/apt/termux-root root stable
Updatable packages:
libunbound/stable 1.24.1-1 arm [upgradable from: 1.24.1]
termux-tools version:
1.45.0
Android version:
7.1.2
Kernel build information:
Linux localhost 3.4.112-Lineage-g716f00ee2e8 #1 SMP PREEMPT Sun Oct 13 11:16:54 CDT 2019 armv7l Android
Device manufacturer:
samsung
Device model:
SPH-L710
Supported ABIs:
SUPPORTED_ABIS: armeabi-v7a,armeabi
SUPPORTED_32_BIT_ABIS: armeabi-v7a,armeabi
SUPPORTED_64_BIT_ABIS: 
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec-ld-preload.so

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions