adoptium / adoptium/adoptium-support

Multithreaded Java program using LinkedBlockingQueue terminates unexpectedly on 32bit arm

Open
#609 10 comments 0 reactions 0 assignees View on GitHub
bug jbs:reported keep
Dominant language
No language data
Stars
59
Forks
13
PR merge metrics
No merged PRs in 30d

Description

### Please provide a brief summary of the bug

On 32-bit ARM architectures (armhf and arm7l), OpenJDK Runtime Environment Temurin-17.0.4.1+1 can terminate unexpectedly. This is likely the same issue as #544 .

### Please provide steps to reproduce where possible

1. Save the attached file `ReceivingService.java.txt`.
1. Rename the attachment to `ReceivingService.java`
1. Run: `javac ReceivingService.java`
1. Copy all `*.class` files to a 32-bit ARM machine.
1. Connect to that machine.
1. Run: `nohup java ReceivingService > pi.log 2>&1 &`
1. Log out of the machine.
1. Log back into the machine.
1. Run: `tail -f pi.log`.
1. Wait 24 hours.

[ReceivingService.java.txt](https://github.com/adoptium/adoptium-support/files/9873255/ReceivingService.java.txt)

### Expected Results

The program runs indefinitely.

### Actual Results

The Java Virtual Machine terminated in less than 24 hours. The last value of pi in the log file was:

3.1415808563240995673428105860538292970725403157835590268022700455132887564

### What Java Version are you using?

```
openjdk version "17.0.4.1" 2022-08-12
OpenJDK Runtime Environment Temurin-17.0.4.1+1 (build 17.0.4.1+1)
OpenJDK Server VM Temurin-17.0.4.1+1 (build 17.0.4.1+1, mixed mode, sharing)
```

### What is your operating system and platform?

```
$ uname -a
Linux HOSTNAME 4.14.170-2.0.1+ #1 SMP PREEMPT Tue Sep 27 18:33:20 UTC 2022 armv7l GNU/Linux
```

### How did you install Java?

Downloaded the .tar.gz file and extracted it into `/opt`:

``` bash
$ ls -la /opt/
total 16
drwxr-xr-x 4 root root 4096 Oct 21 22:59 .
drwxr-xr-x 22 root root 4096 Oct 21 22:59 ..
drwxr-xr-x 6 root root 4096 Oct 21 22:58 jdk-17.0.4.1+1-jre
lrwxrwxrwx 1 root root 18 Oct 21 22:59 jre -> jdk-17.0.4.1+1-jre
$ which java
/opt/jre/bin/java
```

### Additional information

We're re-running the test on two different machines (32-bit ARM and AMD64) to see if the problem happens again.

### Did it work before?

We may have seen what may be a related issue in JDK 11, as well, when using a [D-Bus Java library](https://github.com/hypfvieh/dbus-java/).

### Did you test with other Java versions?

See issue #544 for details about our attempts at testing with JDK 11. We could not reliably reproduce the issue with the code in that ticket. The code attached to this ticket, however, terminated unexpectedly on 32-bit ARM using JDK 17.

### Relevant log output

No logs. No core dump. No heap dump. Java simply terminates.

Contributor guide

Open the contributing guide

Research direction

Start with the attached ReceivingService.java.txt and reproduce the issue using javac and the nohup java command on 32-bit ARM. Compare behavior with the AMD64 rerun and review issue #544 and its JDK 11 testing history. Done means identifying why Temurin 17.0.4.1 terminates without logs, a core dump, or a heap dump, and documenting or resolving the failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.