Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-74879

Multiple socket notifiers for same socket 9 and type Read

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.12.2
    • QPA: Wayland
    • None

    Description

      wayland 1.15, Qt-5.12.2, arm-linux (imx61)

      When using multiple compositors, this warnings show up:

      virtual void QEventDispatcherUNIX::registerSocketNotifier(QSocketNotifier*): Multiple socket notifiers for same socket 9 and type Read
      virtual void QEventDispatcherUNIX::unregisterSocketNotifier(QSocketNotifier*): Multiple socket notifiers for same socket 9 and type Read
      

      And eventually the app crashes when deleting one compositor.

      The reason is that in QWaylandCompositorPrivate::init(), wl_event_loop_get_fd(loop); return the same event loop fd for both compositors, 2 socket notifiers are instanciated, and the events are processed twice, yielding crashes in libwayland, when one compositor cleans up or (to be confirmed) when a client disconnect from a compositor.

      1   wl_list_remove                                                                                  wayland-util.c                    56   0xabba367c 
      2   wl_priv_signal_emit                                                                             wayland-server.c                  2021 0xabb9fcd4 
      3   wl_display_destroy                                                                              wayland-server.c                  1092 0xabba02d4 
      4   QWaylandCompositorPrivate::~QWaylandCompositorPrivate                                           qwaylandcompositor.cpp            246  0x8a80d9b0 
      5   QWaylandQuickCompositorPrivate::~QWaylandQuickCompositorPrivate                                 qwaylandquickcompositor.cpp       60   0x8a820e00 
      6   QWaylandQuickCompositorPrivate::~QWaylandQuickCompositorPrivate                                 qwaylandquickcompositor.cpp       60   0x8a820e00 
      7   QScopedPointerDeleter<QObjectData>::cleanup                                                     qscopedpointer.h                  60   0xad936c04 
      8   QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData>>::~QScopedPointer                qscopedpointer.h                  107  0xad936c04 
      9   QObject::~QObject                                                                               qobject.cpp                       891  0xad936c04 
      10  QWaylandObject::~QWaylandObject                                                                 qwaylandcompositorextension.cpp   147  0x8a80349c 
      11  QWaylandCompositor::~QWaylandCompositor                                                         qwaylandcompositor.cpp            505  0x8a80c7cc 
      12  QWaylandQuickCompositor::~QWaylandQuickCompositor                                               qwaylandquickcompositor.h         52   0x8c8cc1d0 
      13  QWaylandQuickCompositorQuickExtensionContainer::~QWaylandQuickCompositorQuickExtensionContainer qwaylandquickcompositorplugin.cpp 76   0x8c8cc1d0 
      14  QQmlPrivate::QQmlElement<QWaylandQuickCompositorQuickExtensionContainer>::~QQmlElement          qqmlprivate.h                     103  0x8c8cc1d0 
      15  QQmlPrivate::QQmlElement<QWaylandQuickCompositorQuickExtensionContainer>::~QQmlElement          qqmlprivate.h                     103  0x8c8cc1d0 
      16  qDeleteAll<QList<QObject *>::const_iterator>                                                    qalgorithms.h                     320  0xafa6990c 
      17  qDeleteAll<QList<QObject *>>                                                                    qalgorithms.h                     328  0xafa6990c 
      18  QQmlApplicationEnginePrivate::cleanUp                                                           qqmlapplicationengine.cpp         64   0xafa6990c 
      19  QQmlApplicationEngine::~QQmlApplicationEngine                                                   qqmlapplicationengine.cpp         247  0xafa69990 
      20  QQmlApplicationEngine::~QQmlApplicationEngine                                                   qqmlapplicationengine.cpp         248  0xafa699b4 
      ... <More>                                                                                                                                            
      

      As can be seen in the 2 attached snapshot, the 2 QWaylandCompositorPrivate use the same display (0x431cce0), and so the same event loop.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            johanhelsing Johan Helsing
            christian_gagneraud_navico Christian Gagneraud
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes