Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8300704

Ubuntu 22.04 X.org server crashes after running certain AWT tests

XMLWordPrintable

    • generic
    • linux_ubuntu

      The execution of the following tests in the same test run
          java/awt/datatransfer/UnicodeTransferTest/UnicodeTransferTest.java
          java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java
      causes massive failures of consequent tests executed in the current environment because of
         java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.

      The issue was observed on Ubuntu 22.04 + Xorg. It cannot be reproduced on Ubuntu 18.04, 20.04

      The matter is that UnicodeTransferTest places some Unicode string into the system clipboard. After completing the test does not clean the clipboard.
      If CtrlASCII-test starts after that then it will fail by time out. CtrlASCII-test exercises pressing Ctrl with some keys including the Ctrl+C combination.
      Pressing this combination, CtrlASCII-test places the current contents of the clipboard remained from UnicodeTransferTest to CtrlASCII-frame. That causes its failure.
      It looks like copying that Unicode string from the clipboard leads Xorg to be unresponsive and all the consequent AWT-tests executed in the current test run to fail due to the above AWTError.
      BTW Xorg responsivity can be restored by
         $ sudo systemctl restart display-manager

      The issue was observed on
        OpenJDK Runtime Environment (build 20-ea+25-1926)
        OpenJDK 64-Bit Server VM (build 20-ea+25-1926, mixed mode, sharing)
      It also can be reproduced on 17.

      Reproducibility: 100%
      Steps to reproduce:
       $ jtreg -v -testjdk:${__test_jdk} test/jdk/java/awt/datatransfer/UnicodeTransferTest/UnicodeTransferTest.java test/jdk/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java test/jdk/java/awt/event/KeyEvent/KeyTyped/CtrlSpace.java

      jtr-files are in the attachement.

        1. CtrlASCII.jtr
          24 kB
        2. CtrlSpace.jtr
          7 kB
        3. UnicodeTransferTest.jtr
          9 kB

            azvegint Alexander Zvegintsev
            vprovodin Vitaly Provodin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: