JDK17-24: zLinux: Segmentation fault seen while changing focus between awt elements
- Dominant language
- HTML
- Stars
- 155
- Forks
- 346
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 36
Description
**Summary**
A Segmentation fault can be seen on zLinux machines when the user switches focus between multiple awt elements over 20 times.
**Details**
Here are some useful facts:
1) This issue is seen across several zLinux machines, and I've yet to find a machine that this issue doesn't occur on.
2) On JDK17, this issue is first seen on jdk-17.0.13+1, and is not present in jdk-17.0.12+7.
- Note: There are 881 file changes during this period. [List here.](https://github.com/adoptium/jdk17u/compare/jdk-17.0.12+7_adopt...jdk-17.0.13+1_adopt)
3) While this issue is seen clearly in builds that far back, I see no sign of this issue in the March release of JDK24, so it's possible that this is some form of machine configuration issue.
4) I don't think it's a memory problem, as adding the following code to the testcase's iterative loop shows no lack of free memory within the jvm.
```
Runtime.getRuntime().freeMemory();
```
5) The test runs to completion 100% of the time if the JIT is disabled.
6) The test passes on JDK11, but fails on JDK 17, 21, and 24.
**Minimal testcase**
Prep: Make sure you have a display set up, and that the DISPLAY environment variable is set to the appropriate value.
Command: java FocusTest.java
[FocusTest.java.txt](https://github.com/user-attachments/files/19909346/FocusTest.java.txt)
Success: Test passed at 100 iterations.
Failure: Test fails with Segmentation fault.
Contributor guide
Research direction
Start with the attached FocusTest.java, configure DISPLAY as described, and run java FocusTest.java on the affected zLinux JDK versions. Compare behavior with and without the JIT and across the listed JDK releases; done means the test completes 100 iterations without a segmentation fault and the cause and required fix are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, linux
- Domain
- operating-systems, testing
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100