Bug 1402819
Summary: | Coredump calling java.awt.Robot#createScreenCapture in wayland mode | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Frank Büttner <bugzilla> | ||||||||
Component: | java-1.8.0-openjdk | Assignee: | Zhengyu <zgu> | ||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | unspecified | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 27 | CC: | ahughes, dbhole, fedora, iweiss, jerboaa, jvanek, mark.harfouche, Mauri.Sahlberg, mikko.tiihonen, msrb, omajid, peljasz, sgehwolf, troels, william.ferguson | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | java-1.8.0-openjdk-1.8.0.172-5.b11.fc29 | Doc Type: | If docs needed, set a value | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2018-06-25 13:57:46 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Frank Büttner
2016-12-08 12:21:26 UTC
An core dump is available for debug, but abrt fails to generate an backtrace with: --- Running report_uReport --- ('report_uReport' completed successfully) --- Running analyze_CCpp --- Ok to upload core dump? (It may contain sensitive data). If your answer is 'No', a stack trace will be generated locally. (It may download a huge amount of data). 'NO' Analyzing coredump 'coredump' Missing build id: /tmp/tmp/jna/jna8711063590888228607.tmp All debuginfo files are available Generating backtrace Backtrace is generated and saved, 198595 bytes Looking for similar problems in bugzilla Dies in my F25 VM with: Gnome Desktop detected # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fc58c2c1be9, pid=2486, tid=0x00007fc568424700 # # JRE version: OpenJDK Runtime Environment (8.0_111-b16) (build 1.8.0_111-b16) # Java VM: OpenJDK 64-Bit Server VM (25.111-b16 mixed mode linux-amd64 compressed oops) # Problematic frame: # C [libawt_xawt.so+0x40be9] # # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /home/sgehwolf/hs_err_pid2486.log # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # Aborted (core dumped) I'm attaching the hs_err file. Created attachment 1229961 [details]
hotspot error log file.
This bug is NOT JDK version specific, but general problem. It is due to incompatible nature of Wayland vs. X11. Due to security concern, Wayland does not allow application to access screen back buffer. A simple test case (to be attached) can easily reproduce the crash. However, not been able to access screen back buffer should NOT result a crash. Created attachment 1230115 [details]
Simple reproducer
Created attachment 1230116 [details]
Patch to avoid the crash
This patch avoids the crash, but results incompatible behavior. I will file an upstream bug for long term solution.
Upstream bug: https://bugs.openjdk.java.net/browse/JDK-8171000 Besides java.awt.Robot.createScreenCapture(), following Robot APIs also fail: * java.awt.Robot.getPixelColore() -> crash * java.awt.Robot.keyPress()/KeyRelease() -> no effect * java.awt.Robot.mouseMove()/mousePress()/mouseRelease()/mouseWheel() -> no effect Attached patch also avoids java.awt.Robot.getPixelColor() crash. However, the returned color value seems random. When I ran into this crash I could not take a backtrace from java running JDownloader, because of a bug in GDB: https://sourceware.org/bugzilla/show_bug.cgi?id=16577 . This probably also is the reason why abrt can't create a backtrace. *** Bug 1411651 has been marked as a duplicate of this bug. *** *** Bug 1413585 has been marked as a duplicate of this bug. *** *** Bug 1415089 has been marked as a duplicate of this bug. *** This is not Wayland specific. We are running RedHat 6.6 on Gnome and get exactly the same SIGSEV. Can I suggest that the title be changed. As shown in the Reproducer, this is about Robot#createScreenCapture not jdownloader. Sorry FVWM not Gnome. This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. I believe this issue is still present in some form in F27. Re-targetting. Fix has been pushed to OpenJDK 11: http://hg.openjdk.java.net/jdk/jdk/rev/05077701f689 Is there any chance this is going to get backported to OpenJDK 8? I'm getting a related bug ``` # # An unexpected error has occurred (11) # Stack: /opt/Xilinx/Vivado/2018.1/tps/lnx64/jre/lib/amd64/server/libjvm.so(+0x923332) [0x7f7ad1abc332] /opt/Xilinx/Vivado/2018.1/tps/lnx64/jre/lib/amd64/server/libjvm.so(JVM_handle_linux_signal+0x12b) [0x7f7ad1ac0f4b] /opt/Xilinx/Vivado/2018.1/tps/lnx64/jre/lib/amd64/server/libjvm.so(+0x91ac88) [0x7f7ad1ab3c88] /lib64/libc.so.6(+0x346e0) [0x7f7b169746e0] /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.162-6.b12.fc27.x86_64/jre/lib/amd64/libawt_xawt.so(+0x415f9) [0x7f7ab25185f9] /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.162-6.b12.fc27.x86_64/jre/lib/amd64/libawt_xawt.so(+0x41c6f) [0x7f7ab2518c6f] /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.162-6.b12.fc27.x86_64/jre/lib/amd64/libawt_xawt.so(Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl+0x1ea) [0x7f7ab251025a] [0x7f7ac1950bfb] ``` I tried backporting and rebuilding the RPM. Unfortunately I've only ever encountered this uses (free) but proprietary software. I know how to reproduce it using that software, but somebody has to be willing to dedicate 30GB of harddrive space to install Vivado.... |