Bug 488362 - Quitting the server from its tray icon sometimes makes it crash
Summary: Quitting the server from its tray icon sometimes makes it crash
Status: RESOLVED FIXED
Alias: None
Product: KRdp
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-11 15:24 UTC by Nate Graham
Modified: 2024-06-13 15:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 6.1.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2024-06-11 15:24:47 UTC
Unfortunately I was not able to reproduce this issue, but once among the many times I quit the server from its System Tray icon, it crashed instead of quitting cleanly.

Backtrace:

#0  0x00007f20016a5919 in __futex_abstimed_wait_common64
    (private=0, futex_word=0x7f1fb8008750, expected=0, op=393, abstime=0x0, cancel=true)
    at futex-internal.c:57
#1  __futex_abstimed_wait_common
    (futex_word=futex_word@entry=0x7f1fb8008750, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2  0x00007f20016a599f in __GI___futex_abstimed_wait_cancelable64
    (futex_word=futex_word@entry=0x7f1fb8008750, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3  0x00007f20016a82e9 in __pthread_cond_wait_common
    (cond=0x7f1fb8008728, mutex=<optimized out>, clockid=0, abstime=0x0) at pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f1fb8008728, mutex=<optimized out>) at pthread_cond_wait.c:618
#5  0x00007f2001f5c38b in QWaitConditionPrivate::wait (this=0x7f1fb8008700, deadline=...)
    at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/thread/qwaitcondition_unix.cpp:102
#6  QWaitCondition::wait
    (this=this@entry=0x7f1fdc017b98, mutex=mutex@entry=0x7f1fdc017b78, deadline=...)
    at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/thread/qwaitcondition_unix.cpp:180
#7  0x00007f2001f4f8e1 in QThread::wait (this=<optimized out>, deadline=...)
    at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/thread/qthread_unix.cpp:775
#8  0x00007f20037db6d8 in PipeWireBaseEncodedStream::refresh (this=this@entry=0x16d5950)
    at /usr/include/qt6/QtCore/qdeadlinetimer.h:31
#9  0x00007f20037db94e in PipeWireBaseEncodedStream::setActive
    (this=0x16d5950, active=active@entry=false)
    at /home/nate/kde/src/kpipewire/src/pipewirebaseencodedstream.cpp:148
#10 0x00007f2003f2713d in KRdp::AbstractSession::~AbstractSession
    (this=0x180c360, __in_chrg=<optimized out>) at /usr/include/c++/14/bits/unique_ptr.h:454
#11 0x00007f2003f30479 in KRdp::PortalSession::~PortalSession
    (this=0x180c360, __in_chrg=<optimized out>) at /home/nate/kde/src/krdp/src/PortalSession.cpp:122
#12 0x0000000000408d09 in std::default_delete<KRdp::AbstractSession>::operator()
    (this=<optimized out>, __ptr=<optimized out>) at /usr/include/c++/14/bits/unique_ptr.h:87
#13 std::unique_ptr<KRdp::AbstractSession, std::default_delete<KRdp::AbstractSession> >::~unique_ptr
    (this=0x181ec40, __in_chrg=<optimized out>) at /usr/include/c++/14/bits/unique_ptr.h:398
#14 SessionWrapper::~SessionWrapper (this=0x181ec30, __in_chrg=<optimized out>)
    at /home/nate/kde/src/krdp/server/SessionController.cpp:19
#15 SessionWrapper::~SessionWrapper (this=0x181ec30, __in_chrg=<optimized out>)
    at /home/nate/kde/src/krdp/server/SessionController.cpp:19
#16 0x00000000004084de in std::default_delete<SessionWrapper>::operator()
    (this=<optimized out>, __ptr=<optimized out>) at /usr/include/c++/14/bits/unique_ptr.h:87
#17 std::unique_ptr<SessionWrapper, std::default_delete<SessionWrapper> >::~unique_ptr
    (this=0x180bfe8, __in_chrg=<optimized out>) at /usr/include/c++/14/bits/unique_ptr.h:398
#18 std::destroy_at<std::unique_ptr<SessionWrapper, std::default_delete<SessionWrapper> > >
    (__location=0x180bfe8) at /usr/include/c++/14/bits/stl_construct.h:88
#19 std::_Destroy<std::unique_ptr<SessionWrapper, std::default_delete<SessionWrapper> > >
    (__pointer=0x180bfe8) at /usr/include/c++/14/bits/stl_construct.h:149
#20 std::_Destroy_aux<false>::__destroy<std::unique_ptr<SessionWrapper, std::default_delete<SessionWrapper> >*> (__first=0x180bfe8, __last=0x180bff0) at /usr/include/c++/14/bits/stl_construct.h:163
#21 std::_Destroy<std::unique_ptr<SessionWrapper, std::default_delete<SessionWrapper> >*>
    (__first=<optimized out>, __last=0x180bff0) at /usr/include/c++/14/bits/stl_construct.h:196
#22 std::_Destroy<std::unique_ptr<SessionWrapper, std::default_delete<SessionWrapper> >*, std::unique_ptr<SessionWrapper, std::default_delete<SessionWrapper> > >
    (__first=<optimized out>, __last=0x180bff0) at /usr/include/c++/14/bits/alloc_traits.h:944
#23 std::vector<std::unique_ptr<SessionWrapper, std::default_delete<SessionWrapper> >, std::allocator<std::unique_ptr<SessionWrapper, std::default_delete<SessionWrapper> > > >::~vector
    (this=0x7ffd886eaf90, __in_chrg=<optimized out>) at /usr/include/c++/14/bits/stl_vector.h:735
#24 SessionController::~SessionController (this=this@entry=0x7ffd886eaf60, __in_chrg=<optimized out>)
    at /home/nate/kde/src/krdp/server/SessionController.cpp:119
#25 0x0000000000407056 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/nate/kde/src/krdp/server/main.cpp:114
Comment 1 Akseli Lahtinen 2024-06-13 15:06:39 UTC
Git commit c6c58fb9059610d67456ca9b52fd8ee80326c4b4 by Akseli Lahtinen.
Committed on 13/06/2024 at 15:06.
Pushed by akselmo into branch 'master'.

SessionController: instead of using default quit action, implement our own

This will skip the confirmation dialog popup and also
handle the shutdown more gracefully since it will
talk to dbus first before exiting.

Earlier we were using the default action which was not correct way
to do this.
Related: bug 488359

M  +9    -2    server/SessionController.cpp

https://invent.kde.org/plasma/krdp/-/commit/c6c58fb9059610d67456ca9b52fd8ee80326c4b4
Comment 2 Akseli Lahtinen 2024-06-13 15:07:46 UTC
Git commit dd956081c8a3158366cc99410b70e6af2344276b by Akseli Lahtinen.
Committed on 13/06/2024 at 15:06.
Pushed by akselmo into branch 'Plasma/6.1'.

SessionController: instead of using default quit action, implement our own

This will skip the confirmation dialog popup and also
handle the shutdown more gracefully since it will
talk to dbus first before exiting.

Earlier we were using the default action which was not correct way
to do this.
Related: bug 488359


(cherry picked from commit c6c58fb9059610d67456ca9b52fd8ee80326c4b4)

159645e5 SessionController: instead of using default quit action, implement our own
a56b0b95 Use qcoreapplication quit
bb76e487 Use local variable for menu

Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>

M  +9    -2    server/SessionController.cpp

https://invent.kde.org/plasma/krdp/-/commit/dd956081c8a3158366cc99410b70e6af2344276b