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

[XWayland] crash when mapping a lot of windows

    XMLWordPrintable

    Details

      Description

      GUI are crashing if you are trying to map a lot( > ~260) of windows at once.

      // gcc windowSpawnDoS.c -o windowSpawnDoS -lX11 && ./windowSpawnDoS
      #include <X11/Xlib.h>
      #include <unistd.h>

      int main(void) {
          XInitThreads();
          Display* dpy = XOpenDisplay(NULL);

          Window root = DefaultRootWindow(dpy);
          for (int i = 0; i < 500; ++i) {
              Window ww = XCreateSimpleWindow(dpy, root, 50, 50, 50, 50, 0, 0, 0);
              XMapWindow(dpy, ww);
          }

          for(;;) {
              XEvent e;
              XNextEvent(dpy, &e);
          }
      }

      It may be faced when running some tests which are trying to map a lot of windows, e.g. one for every GraphicsConfiguration.


      If you have 210 GraphicsConfigurations per display on Xwayland, then running such test in 2 display configuration will lead to crash.

      https://gitlab.freedesktop.org/xorg/xserver/-/issues/1222

        Attachments

          Activity

            People

            Assignee:
            azvegint Alexander Zvegintsev
            Reporter:
            azvegint Alexander Zvegintsev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: