Bug 454014 - Crash in KWin::DrmConnectorMode::~DrmConnectorMode() when connecting and disconnecting a left-extended screen
Summary: Crash in KWin::DrmConnectorMode::~DrmConnectorMode() when connecting and disc...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-18 20:40 UTC by Nate Graham
Modified: 2022-05-19 06:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2022-05-18 20:40:23 UTC
Wayland, git master everything KDE.

STEPS TO REPRODUCE
1. Connect a screen
2. In the KScreen OSD, select "Extend Left"
*crash*
3. Use KRunner to restart plasmashell due to Bug 448475
4. Unplug the screen
*crash*


Same backtrace for both crashes:

#0  KWin::DrmGpu::fd() const (this=0xf0000000000)
    at /home/nate/kde/src/kwin/src/backends/drm/drm_gpu.cpp:680
#1  0x00007f8661591fb9 in KWin::DrmConnectorMode::~DrmConnectorMode()
    (this=<optimized out>, __in_chrg=<optimized out>)
    at /home/nate/kde/src/kwin/src/backends/drm/drm_object_connector.cpp:75
#2  QtSharedPointer::ExternalRefCountWithContiguousData<KWin::DrmConnectorMode>::deleter(QtSharedPointer::ExternalRefCountData*) (self=<optimized out>)
    at /usr/include/qt5/QtCore/qsharedpointer_impl.h:248
#3  0x00007f86768674bc in QtSharedPointer::ExternalRefCountData::destroy() (this=0x3f8d360)
    at /usr/include/qt5/QtCore/qsharedpointer_impl.h:149
#4  QSharedPointer<KWin::OutputMode>::deref(QtSharedPointer::ExternalRefCountData*) (dd=0x3f8d360)
    at /usr/include/qt5/QtCore/qsharedpointer_impl.h:458
#5  QSharedPointer<KWin::OutputMode>::deref(QtSharedPointer::ExternalRefCountData*) (dd=0x3f8d360)
    at /usr/include/qt5/QtCore/qsharedpointer_impl.h:454
#6  QSharedPointer<KWin::OutputMode>::deref() (this=0x25508b8)
    at /usr/include/qt5/QtCore/qsharedpointer_impl.h:453
#7  QSharedPointer<KWin::OutputMode>::~QSharedPointer() (this=0x25508b8, __in_chrg=<optimized out>)
    at /usr/include/qt5/QtCore/qsharedpointer_impl.h:310
#8  KWaylandServer::OutputInterfacePrivate::~OutputInterfacePrivate()
    (this=0x2550820, __in_chrg=<optimized out>)
    at /home/nate/kde/src/kwin/src/wayland/output_interface.cpp:21
#9  KWaylandServer::OutputInterfacePrivate::~OutputInterfacePrivate()
    (this=0x2550820, __in_chrg=<optimized out>)
    at /home/nate/kde/src/kwin/src/wayland/output_interface.cpp:21
#10 0x00007f8676866536 in QScopedPointerDeleter<KWaylandServer::OutputInterfacePrivate>::cleanup(KWaylandServer::OutputInterfacePrivate*) (pointer=<optimized out>)
    at /usr/include/qt5/QtCore/qscopedpointer.h:52
#11 QScopedPointer<KWaylandServer::OutputInterfacePrivate, QScopedPointerDeleter<KWaylandServer::OutputInterfacePrivate> >::~QScopedPointer() (this=0x311e2c0, __in_chrg=<optimized out>)
    at /usr/include/qt5/QtCore/qscopedpointer.h:107
#12 KWaylandServer::OutputInterface::~OutputInterface() (this=0x311e2b0, __in_chrg=<optimized out>)
    at /home/nate/kde/src/kwin/src/wayland/output_interface.cpp:181
#13 0x00007f8676866585 in KWaylandServer::OutputInterface::~OutputInterface()
    (this=0x311e2b0, __in_chrg=<optimized out>)
    at /home/nate/kde/src/kwin/src/wayland/output_interface.cpp:178
#14 KWaylandServer::OutputInterfacePrivate::output_destroy_global() (this=<optimized out>)
    at /home/nate/kde/src/kwin/src/wayland/output_interface.cpp:148
#15 0x00007f86768bcb05 in QtWaylandServer::wl_output::deferred_destroy_global_func(void*)
    (data=0x2550820) at /home/nate/kde/build/kwin/src/wayland/qwayland-server-wayland.cpp:5224
#16 0x00007f8674939572 in wl_timer_heap_dispatch (timers=0x1cbfa28) at ../src/event-loop.c:526
#17 wl_event_loop_dispatch (loop=0x1cbf9e0, timeout=<optimized out>) at ../src/event-loop.c:1020
#18 0x00007f8676854447 in KWaylandServer::Display::dispatchEvents() (this=<optimized out>)
    at /home/nate/kde/src/kwin/src/wayland/display.cpp:114
#19 0x00007f8674cfb726 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
    (a=0x7ffde8f3f4c0, r=<optimized out>, this=0x2a50820)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#20 doActivate<false>(QObject*, int, void**)
    (sender=0x1ca7d10, signal_index=3, argv=0x7ffde8f3f4c0) at kernel/qobject.cpp:3886
#21 0x00007f8674cf6747 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=sender@entry=0x1ca7d10, m=m@entry=0x7f8674fa0460 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffde8f3f4c0)
    at kernel/qobject.cpp:3946
#22 0x00007f8674cfdfa3 in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (this=this@entry=0x1ca7d10, _t1=..., _t2=<optimized out>, _t3=...)
    at .moc/moc_qsocketnotifier.cpp:178
#23 0x00007f8674cfe7c5 in QSocketNotifier::event(QEvent*) (this=0x1ca7d10, e=<optimized out>)
    at kernel/qsocketnotifier.cpp:302
#24 0x00007f8673b4cc22 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    (this=<optimized out>, receiver=0x1ca7d10, e=0x7ffde8f3f5c0) at kernel/qapplication.cpp:3637
#25 0x00007f8674cc8118 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    (receiver=0x1ca7d10, event=0x7ffde8f3f5c0) at kernel/qcoreapplication.cpp:1064
#26 0x00007f8674d1612e in QEventDispatcherUNIXPrivate::activateSocketNotifiers() (this=0x1c60be0)
    at kernel/qeventdispatcher_unix.cpp:304
#27 0x00007f8674d1656a in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:511
#28 0x000000000051ede1 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
#29 0x00007f8674cc6b7a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
    (this=this@entry=0x7ffde8f3f730, flags=..., flags@entry=...)
    at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#30 0x00007f8674ccec22 in QCoreApplication::exec() ()
    at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#31 0x00007f867510ce50 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1860
#32 0x00007f8673b4cb99 in QApplication::exec() () at kernel/qapplication.cpp:2829
#33 0x0000000000443987 in main(int, char**) (argc=<optimized out>, argv=<optimized out>)
    at /home/nate/kde/src/kwin/src/main_wayland.cpp:642
Comment 1 Bug Janitor Service 2022-05-18 23:04:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2431
Comment 2 Bug Janitor Service 2022-05-18 23:50:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2432
Comment 3 Zamundaaa 2022-05-19 06:12:51 UTC
Git commit a262f2b28afecd153aba8850d3d68e84a6f03d41 by Xaver Hugl.
Committed on 18/05/2022 at 22:59.
Pushed by vladz into branch 'master'.

Revert "wayland/outputdevice: use OutputMode directly"

This reverts commits 67181d5db723d96923191feeeaefaeae8922554a and
d03e352dbfde48c4ee1602a737ecb0f97e6ba99b.

M  +2    -2    src/wayland/autotests/client/test_wayland_output.cpp
M  +1    -1    src/wayland/autotests/client/test_xdg_output.cpp
M  +2    -2    src/wayland/autotests/client/test_xdg_shell.cpp
M  +14   -9    src/wayland/output_interface.cpp
M  +9    -2    src/wayland/output_interface.h
M  +1    -1    src/wayland/tests/renderingservertest.cpp
M  +1    -1    src/wayland/tests/waylandservertest.cpp
M  +2    -2    src/waylandoutput.cpp

https://invent.kde.org/plasma/kwin/commit/a262f2b28afecd153aba8850d3d68e84a6f03d41