Bug 459870

Summary: kded5 crashed after suspend/resume cycle
Product: [I don't know] kde Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED WORKSFORME    
Severity: crash CC: qydwhotmail
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=458817
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Patrick Silva 2022-09-30 18:45:58 UTC
SUMMARY
I suspended my machine to RAM, resumed it after ~1 hour and drkonqi icon appeared in the system tray indicating kded5 crash.

Operating System: Arch Linux
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Graphics Platform: Wayland


Thread 4 (Thread 0x7f8efffff6c0 (LWP 45792)):
#0  0x00007f8f10f13e5f in __GI___poll (fds=0x55b63ae89af0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f8f1036fe2f in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x55b63ae89af0, timeout=<optimized out>, context=0x55b63ae89a00) at ../glib/glib/gmain.c:4543
#2  g_main_context_iterate.constprop.0 (context=0x55b63ae89a00, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4233
#3  0x00007f8f103180d2 in g_main_context_iteration (context=0x55b63ae89a00, may_block=1) at ../glib/glib/gmain.c:4303
#4  0x00007f8f05c24ebe in  () at /usr/lib/gio/modules/libdconfsettings.so
#5  0x00007f8f10346c55 in g_thread_proxy (data=0x55b63ae78ea0) at ../glib/glib/gthread.c:831
#6  0x00007f8f10e9f74d in start_thread (arg=<optimized out>) at pthread_create.c:442
#7  0x00007f8f10f21700 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7f8f04c446c0 (LWP 45791)):
#0  0x00007f8f10f13e5f in __GI___poll (fds=0x55b63ae87460, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f8f1036fe2f in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x55b63ae87460, timeout=<optimized out>, context=0x55b63ae873a0) at ../glib/glib/gmain.c:4543
#2  g_main_context_iterate.constprop.0 (context=0x55b63ae873a0, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4233
#3  0x00007f8f103180d2 in g_main_context_iteration (context=0x55b63ae873a0, may_block=may_block@entry=1) at ../glib/glib/gmain.c:4303
#4  0x00007f8f10318122 in glib_worker_main (data=<optimized out>) at ../glib/glib/gmain.c:6414
#5  0x00007f8f10346c55 in g_thread_proxy (data=0x55b63ae78d80) at ../glib/glib/gthread.c:831
#6  0x00007f8f10e9f74d in start_thread (arg=<optimized out>) at pthread_create.c:442
#7  0x00007f8f10f21700 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7f8eff7fe6c0 (LWP 45793)):
#0  0x00007f8f10f13e5f in __GI___poll (fds=0x7f8ef40168f0, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f8f1036fe2f in g_main_context_poll (priority=<optimized out>, n_fds=2, fds=0x7f8ef40168f0, timeout=<optimized out>, context=0x7f8ef4014c00) at ../glib/glib/gmain.c:4543
#2  g_main_context_iterate.constprop.0 (context=0x7f8ef4014c00, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4233
#3  0x00007f8f10318d7f in g_main_loop_run (loop=0x7f8ef4014cf0) at ../glib/glib/gmain.c:4438
#4  0x00007f8f04e5023c in gdbus_shared_thread_func (user_data=0x7f8ef4014bd0) at ../glib/gio/gdbusprivate.c:284
#5  0x00007f8f10346c55 in g_thread_proxy (data=0x7f8ef4002e40) at ../glib/glib/gthread.c:831
#6  0x00007f8f10e9f74d in start_thread (arg=<optimized out>) at pthread_create.c:442
#7  0x00007f8f10f21700 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7f8f0ff20840 (LWP 45780)):
#0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/strlen-sse2.S:142
#1  0x00007f8f10e74588 in __vfprintf_internal (s=s@entry=0x7ffebde637c0, format=0x7f8f1292a182 "%s ", ap=0x7ffebde65900, mode_flags=2) at /usr/src/debug/glibc/stdio-common/vfprintf-process-arg.c:397
#2  0x00007f8f10e74c35 in buffered_vfprintf (s=0x7f8f10ff25c0 <_IO_2_1_stderr_>, format=format@entry=0x7f8f1292a182 "%s ", args=args@entry=0x7ffebde65900, mode_flags=mode_flags@entry=2) at vfprintf-internal.c:1748
#3  0x00007f8f10e73c83 in __vfprintf_internal (s=<optimized out>, format=0x7f8f1292a182 "%s ", ap=ap@entry=0x7ffebde65900, mode_flags=2) at vfprintf-internal.c:740
#4  0x00007f8f10f2ed93 in ___fprintf_chk (fp=<optimized out>, flag=<optimized out>, format=<optimized out>) at fprintf_chk.c:33
#5  0x00007f8f12929342 in fprintf (__fmt=0x7f8f1292a182 "%s ", __stream=<optimized out>) at /usr/include/bits/stdio2.h:79
#6  KCrash::defaultCrashHandler(int) (sig=11) at /usr/src/debug/kcrash-5.98.0/src/kcrash.cpp:582
#7  0x00007f8f10e51a00 in <signal handler called> () at /usr/lib/libc.so.6
#8  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/strlen-sse2.S:142
#9  0x00007f8f10e74588 in __vfprintf_internal (s=s@entry=0x7ffebde669c0, format=0x7f8f1292a328 "KCrash: Attempting to start %s\n", ap=0x7ffebde68b00, mode_flags=2) at /usr/src/debug/glibc/stdio-common/vfprintf-process-arg.c:397
#10 0x00007f8f10e74c35 in buffered_vfprintf (s=0x7f8f10ff25c0 <_IO_2_1_stderr_>, format=format@entry=0x7f8f1292a328 "KCrash: Attempting to start %s\n", args=args@entry=0x7ffebde68b00, mode_flags=mode_flags@entry=2) at vfprintf-internal.c:1748
#11 0x00007f8f10e73c83 in __vfprintf_internal (s=<optimized out>, format=0x7f8f1292a328 "KCrash: Attempting to start %s\n", ap=ap@entry=0x7ffebde68b00, mode_flags=2) at vfprintf-internal.c:740
#12 0x00007f8f10f2ed93 in ___fprintf_chk (fp=<optimized out>, flag=<optimized out>, format=<optimized out>) at fprintf_chk.c:33
#13 0x00007f8f1292896a in fprintf (__fmt=0x7f8f1292a328 "KCrash: Attempting to start %s\n", __stream=<optimized out>) at /usr/include/bits/stdio2.h:79
#14 KCrash::startProcess(int, char const**, bool) (argv=0x55b63ac627f0, waitAndExit=waitAndExit@entry=false, argc=<optimized out>) at /usr/src/debug/kcrash-5.98.0/src/kcrash.cpp:700
#15 0x00007f8f1292977a in KCrash::defaultCrashHandler(int) (sig=6) at /usr/src/debug/kcrash-5.98.0/src/kcrash.cpp:463
#16 0x00007f8f10e51a00 in <signal handler called> () at /usr/lib/libc.so.6
#17 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#18 0x00007f8f10ea1503 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#19 0x00007f8f10e51958 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#20 0x00007f8f10e3b53d in __GI_abort () at abort.c:79
#21 0x00007f8f10e9563e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7f8f10fb4432 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#22 0x00007f8f10eab22c in malloc_printerr (str=str@entry=0x7f8f10fb6ec0 "malloc_consolidate(): unaligned fastbin chunk detected") at malloc.c:5660
#23 0x00007f8f10eabea4 in malloc_consolidate (av=av@entry=0x7f8f10ff1ba0 <main_arena>) at malloc.c:4746
#24 0x00007f8f10ead390 in _int_free (av=0x7f8f10ff1ba0 <main_arena>, p=0x55b63b092f00, have_lock=<optimized out>, have_lock@entry=0) at malloc.c:4670
#25 0x00007f8f10eaf9f3 in __GI___libc_free (mem=<optimized out>) at malloc.c:3385
#26 0x00007f8f116885de in QLibraryPrivate::~QLibraryPrivate() (this=0x7f8f0804a8d0, this=<optimized out>) at plugin/qlibrary.cpp:514
#27 QLibraryStore::cleanup() () at plugin/qlibrary.cpp:421
#28 qlibraryCleanup () at plugin/qlibrary.cpp:440
#29 (anonymous namespace)::qlibraryCleanup_dtor_class_::~qlibraryCleanup_dtor_class_() (this=<optimized out>, this=<optimized out>) at plugin/qlibrary.cpp:442
#30 0x00007f8f10e538d7 in __cxa_finalize (d=0x7f8f1191c000) at cxa_finalize.c:83
#31 0x00007f8f114ca958 in __do_global_dtors_aux () at /usr/lib/libQt5Core.so.5
#32 0x00007ffebde6a2f0 in  ()
#33 0x00007f8f12a16aae in _dl_fini () at dl-fini.c:142
Comment 1 Fushan Wen 2022-10-01 01:05:41 UTC
Can you also report the bug to Qt and glibc? No KDE code is in the backtrace.
Comment 2 Fushan Wen 2022-10-01 02:21:19 UTC
Are you using accent color from wallpaper?
Comment 3 Patrick Silva 2022-10-01 02:31:01 UTC
(In reply to Fushan Wen from comment #2)
> Are you using accent color from wallpaper?

No.
Comment 4 Bug Janitor Service 2022-10-01 06:03:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kde-gtk-config/-/merge_requests/47
Comment 5 Fushan Wen 2022-10-02 11:51:02 UTC
See also: https://codereview.qt-project.org/c/qt/qtbase/+/436160
Comment 6 Fushan Wen 2022-10-04 16:24:56 UTC
Git commit 3c2437815920856608a27361fe1da03e763742a5 by Fushan Wen.
Committed on 04/10/2022 at 15:41.
Pushed by fusionfuture into branch 'master'.

kded: properly delete factory to fix file descriptor leak

Not unloading the plugin loader will cause file descriptor leaks in
kded, and when fd limit is reached, accent color can't be updated
anymore because updating accent color requires writing to kdeglobals.
This fixes the leak and also fixes the accent color bug.
Related: bug 458430, bug 458817
FIXED-IN: 5.26

M  +5    -5    kded/kwin_bridge/dummydecorationbridge.cpp
M  +2    -1    kded/kwin_bridge/dummydecorationbridge.h

https://invent.kde.org/plasma/kde-gtk-config/commit/3c2437815920856608a27361fe1da03e763742a5
Comment 7 Fushan Wen 2022-10-04 16:33:15 UTC
Git commit d5c646f151d1ac7e3fc7c5ff9178b000321a9ab6 by Fushan Wen.
Committed on 04/10/2022 at 16:33.
Pushed by fusionfuture into branch 'Plasma/5.26'.

kded: properly delete factory to fix file descriptor leak

Not unloading the plugin loader will cause file descriptor leaks in
kded, and when fd limit is reached, accent color can't be updated
anymore because updating accent color requires writing to kdeglobals.
This fixes the leak and also fixes the accent color bug.
Related: bug 458430, bug 458817
FIXED-IN: 5.26


(cherry picked from commit 3c2437815920856608a27361fe1da03e763742a5)

M  +5    -5    kded/kwin_bridge/dummydecorationbridge.cpp
M  +2    -1    kded/kwin_bridge/dummydecorationbridge.h

https://invent.kde.org/plasma/kde-gtk-config/commit/d5c646f151d1ac7e3fc7c5ff9178b000321a9ab6
Comment 8 Fushan Wen 2022-10-05 00:49:08 UTC
Should be fixed in 5.26.0 but to make sure it's really fixed please test again then.
Comment 9 Bug Janitor Service 2022-10-20 04:59:43 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Bug Janitor Service 2022-11-04 05:08:11 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!