Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dbus-daemon causes segfault in org.kde.kcookiejar5 [solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 857

PostPosted: Wed Oct 19, 2022 1:20 am    Post subject: dbus-daemon causes segfault in org.kde.kcookiejar5 [solved] Reply with quote

Never look at your log files.

Anyway when you do, you find that your kernel [edit kded5] has been weirdly segfaulting. A few hundred times a day, every half hour
on the following pattern:

Code:


Oct 18 19:52:01 bartali dbus-daemon[3262]: [session uid=1001 pid=3260] Successfully activated service 'org.kde.kcookiejar5'
Oct 18 19:52:02 bartali kernel: kded5[6071]: segfault at 0 ip 00007f22c2e87cb0 sp 00007ffc462a6798 error 4 in libKF5ConfigCore.so.5.96.0[7f22c2e79000+44000]
Oct 18 19:52:02 bartali kernel: Code: 00 75 20 48 83 c4 18 5b 5d 41 5c 41 5d c3 0f 1f 40 00 ba 08 00 00 00 be 01 00 00 00 e8 09 1a ff ff eb d0 e8 d2 17 ff ff 66 90 <48> 8b 07 ff 60 58 66 2e 0f 1f 84 00 00 00 00 00 41 54 55 48 89 fd
Oct 18 19:52:02 bartali kernel: kded5[6078]: segfault at 0 ip 00007f7472c80cb0 sp 00007ffd3d093698 error 4 in libKF5ConfigCore.so.5.96.0[7f7472c72000+44000]
Oct 18 19:52:02 bartali kernel: Code: 00 75 20 48 83 c4 18 5b 5d 41 5c 41 5d c3 0f 1f 40 00 ba 08 00 00 00 be 01 00 00 00 e8 09 1a ff ff eb d0 e8 d2 17 ff ff 66 90 <48> 8b 07 ff 60 58 66 2e 0f 1f 84 00 00 00 00 00 41 54 55 48 89 fd
Oct 18 19:52:02 bartali dbus-daemon[3262]: [session uid=1001 pid=3260] Activating service name='org.kde.kcookiejar5' requested by ':1.100' (uid=1001 pid=6027 comm="/usr/lib64/libexec/kf5/kioslave5 /usr/lib64/qt5/pl" label="kernel")
Oct 18 19:52:02 bartali dbus-daemon[3262]: [session uid=1001 pid=3260] Successfully activated service 'org.kde.kcookiejar5'
Oct 18 19:52:03 bartali dbus-daemon[3262]: [session uid=1001 pid=3260] Activating service name='org.kde.kcookiejar5' requested by ':1.100' (uid=1001 pid=6027 comm="/usr/lib64/libexec/kf5/kioslave5 /usr/lib64/qt5/pl" label="kernel")
Oct 18 19:52:03 bartali dbus-daemon[3262]: [session uid=1001 pid=3260] Successfully activated service 'org.kde.kcookiejar5'
Oct 18 19:52:04 bartali kernel: kded5[6085]: segfault at 0 ip 00007f36e6c1dcb0 sp 00007ffc1d3c9ce8 error 4 in libKF5ConfigCore.so.5.96.0[7f36e6c0f000+44000]
Oct 18 19:52:04 bartali kernel: Code: 00 75 20 48 83 c4 18 5b 5d 41 5c 41 5d c3 0f 1f 40 00 ba 08 00 00 00 be 01 00 00 00 e8 09 1a ff ff eb d0 e8 d2 17 ff ff 66 90 <48> 8b 07 ff 60 58 66 2e 0f 1f 84 00 00 00 00 00 41 54 55 48 89 fd
Oct 18 19:52:04 bartali kernel: kded5[6092]: segfault at 0 ip 00007f648a0b3cb0 sp 00007ffe7b779298 error 4 in libKF5ConfigCore.so.5.96.0[7f648a0a5000+44000]
Oct 18 19:52:04 bartali kernel: Code: 00 75 20 48 83 c4 18 5b 5d 41 5c 41 5d c3 0f 1f 40 00 ba 08 00 00 00 be 01 00 00 00 e8 09 1a ff ff eb d0 e8 d2 17 ff ff 66 90 <48> 8b 07 ff 60 58 66 2e 0f 1f 84 00 00 00 00 00 41 54 55 48 89 fd
Oct 18 19:52:05 bartali dbus-daemon[3262]: [session uid=1001 pid=3260] Activating service name='org.kde.kcookiejar5' requested by ':1.100' (uid=1001 pid=6027 comm="/usr/lib64/libexec/kf5/kioslave5 /usr/lib64/qt5/pl" label="kernel")
Oct 18 19:52:05 bartali dbus-daemon[3262]: [session uid=1001 pid=3260] Successfully activated service 'org.kde.kcookiejar5'
Oct 18 19:52:06 bartali dbus-daemon[3262]: [session uid=1001 pid=3260] Activating service name='org.kde.kcookiejar5' requested by ':1.100' (uid=1001 pid=6027 comm="/usr/lib64/libexec/kf5/kioslave5 /usr/lib64/qt5/pl" label="kernel")
Oct 18 19:52:06 bartali dbus-daemon[3262]: [session uid=1001 pid=3260] Successfully activated service 'org.kde.kcookiejar5'
Oct 18 19:52:06 bartali kernel: kded5[6099]: segfault at 0 ip 00007ff162848cb0 sp 00007fffba9be078 error 4 in libKF5ConfigCore.so.5.96.0[7ff16283a000+44000]
Oct 18 19:52:06 bartali kernel: Code: 00 75 20 48 83 c4 18 5b 5d 41 5c 41 5d c3 0f 1f 40 00 ba 08 00 00 00 be 01 00 00 00 e8 09 1a ff ff eb d0 e8 d2 17 ff ff 66 90 <48> 8b 07 ff 60 58 66 2e 0f 1f 84 00 00 00 00 00 41 54 55 48 89 fd
Oct 18 19:52:07 bartali kernel: kded5[6106]: segfault at 0 ip 00007fe4f1b88cb0 sp 00007fff3475feb8 error 4 in libKF5ConfigCore.so.5.96.0[7fe4f1b7a000+44000]
Oct 18 19:52:07 bartali kernel: Code: 00 75 20 48 83 c4 18 5b 5d 41 5c 41 5d c3 0f 1f 40 00 ba 08 00 00 00 be 01 00 00 00 e8 09 1a ff ff eb d0 e8 d2 17 ff ff 66 90 <48> 8b 07 ff 60 58 66 2e 0f 1f 84 00 00 00 00 00 41 54 55 48 89 fd


Code:

# grep -ac segfault /var/log/messages
44378

So that kind of sucks. [/bug]

Can anybody figure out what id going on here? It looks like a very userland part of KDe is segafulting the kernel? But How? And why am I the first person to ever have this problem?

Why? This has been going on for months. 44K times to be precise!

Cheers,
Jon.

ps: "Me want *COOKIES*!!!


Last edited by jesnow on Thu Oct 20, 2022 5:35 pm; edited 2 times in total
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21764

PostPosted: Wed Oct 19, 2022 12:35 pm    Post subject: Reply with quote

Never look at your log files without reading the format specification first. ;) In this case, the format is:
  • Time
  • Hostname: bartali
  • Generator of the message: kernel
  • Freeform message content
The kernel is not segfaulting on anything. The kernel is reporting that your userland programs are segfaulting, and trying to tell you what it can about how they failed.

A core file from the failed process would be more informative. As is, all we can say is that kded5 is calling into libKF5ConfigCore.so.5.96.0, and in that library, at process address 00007f648a0b3cb0, the code dereferences a null pointer. As to why the pointer is null, we cannot tell only from this.
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 857

PostPosted: Wed Oct 19, 2022 2:19 pm    Post subject: Reply with quote

Thanks Hu:

I'm not a pro at this (you may have guessed), but I figured out that much. The complete sequence is
1) dbus-daemon is activating service 'org.kde.kcookiejar5' for '1.743' for my uid using kioslave5, "pl" and the label "kernel" (which misled me).
2) dbus-daemon says it has successfully activated org.kde.kcookiejar5. 1 and this happens twice before both processes die a few seconds later.
3) kded5 then segfaults (twice) (thanks for catching the dereferenced null pointer) while calling libKF5ConfigCore.so.5
4) The kernel then emits a bunch of code I can't make heads or tails of.
5) dbus-daemon activates service 'org.kde.kcookiejar5'
and so on.

This double launch of 'org.kde.kcookiejar5' happens 4 or 5 times in about a minute, then goes quiet for about 20 minutes then repeats. Forever.

What I don't know is:
1) where would I find the core file you speak of? what would I do with it? I would guess a stacktrace would be the thing to start with.
2) WTH is dbus-daemon doing handling cookies? I suspect these aren't browser cookies but MIT magic cookies and they are necessary to be passed around.
3) I did a bunch of googling -- this is a rare condition apparently. I don't even usually end up here on the forums if googling finds even something like the issue.

Looking back through the log this has been continuous (40,00 times) since May 2. When it started on May 2 I had just stopped and restarted KDE. Why did I do that? Because I emerged KDE 5.24.4 on April 30th. It's been doing it since then. I'm now on a new kernel, new KDE (5.25.5) and it's still doing it.

Any help would be appreciated.

Cheers,

Jon.

Hu wrote:
Never look at your log files without reading the format specification first. ;) In this case, the format is:
  • Time
  • Hostname: bartali
  • Generator of the message: kernel
  • Freeform message content
The kernel is not segfaulting on anything. The kernel is reporting that your userland programs are segfaulting, and trying to tell you what it can about how they failed.

A core file from the failed process would be more informative. As is, all we can say is that kded5 is calling into libKF5ConfigCore.so.5.96.0, and in that library, at process address 00007f648a0b3cb0, the code dereferences a null pointer. As to why the pointer is null, we cannot tell only from this.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21764

PostPosted: Wed Oct 19, 2022 3:21 pm    Post subject: Reply with quote

jesnow wrote:
3) kded5 then segfaults (twice) (thanks for catching the dereferenced null pointer) while calling libKF5ConfigCore.so.5
It looks like two different kded5 crashed. Probably one dies, so dbus starts another one, hoping for better results the next time.
jesnow wrote:
4) The kernel then emits a bunch of code I can't make heads or tails of.
This line mostly only makes sense to the application developers, and even then, only to the ones who have a high level of proficiency in low level operations.
jesnow wrote:
What I don't know is:
1) where would I find the core file you speak of? what would I do with it? I would guess a stacktrace would be the thing to start with.
Core files are normally written to the current working directory of the crashed process, unless the administrator has changed that. Yes, a stacktrace would be good to get.
jesnow wrote:
2) WTH is dbus-daemon doing handling cookies? I suspect these aren't browser cookies but MIT magic cookies and they are necessary to be passed around.
I think something else wants cookie handling, and uses dbus to find/start a handler process.

I don't have any background with this particular failure, and generally avoid dbus as much as I can.
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 857

PostPosted: Thu Oct 20, 2022 7:10 am    Post subject: Reply with quote

Maybe I'm even in the wrong forum as the kernel and hardware seem to be working fine. I should post again
some thing more informed in Desktop Environments. Thanks for your help!

Cheers,
Jon.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21764

PostPosted: Thu Oct 20, 2022 12:05 pm    Post subject: Reply with quote

Per above post, moved from Kernel & Hardware to Desktop Environments.
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 857

PostPosted: Thu Oct 20, 2022 5:35 pm    Post subject: Reply with quote

Solved. somehow, I didn't have the dbus use flag enabled. Why? How? I don't know. But for the record, having KDE without dbus (which used to be possible) results in some peculiar messages in your system log and crashes of kde components.

Cheers,
Jon.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8942

PostPosted: Sat Oct 22, 2022 9:16 am    Post subject: Reply with quote

jesnow wrote:
having KDE without dbus (which used to be possible)

Not in a very long time. People pretending it does (and arguing against appropriate dependencies) have been conveniently ignoring noisy logs and background crashes.

Also, both org.kde.kcookiejar5.service and /usr/bin/kcookiejar5 are owned by kde-frameworks/kio, which hard-depends on dev-qt/qtdbus which - naturally - pulls in sys-apps/dbus. How is it even possible that you are missing dbus under these circumstances?

This is also likely the reason for your older thread https://forums.gentoo.org/viewtopic-p-8693972-highlight-.html#8693972

Answer:
jesnow wrote:
3) kded5 then segfaults (twice) (thanks for catching the dereferenced null pointer) while calling libKF5ConfigCore.so.5

It seems like kde-frameworks/kded should define an additional use-dependency on kconfig[dbus].
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21764

PostPosted: Sat Oct 22, 2022 3:31 pm    Post subject: Reply with quote

jesnow: what is the output of emerge --pretend --verbose dev-qt/qtdbus sys-apps/dbus kde-frameworks/kded kde-frameworks/kconfig? If any of those were first installed, or had their USE flags changed, after starting this thread, please note that as well. If possible, tell us what that command would have showed if you had run it when you started this thread.
asturm wrote:
jesnow wrote:
having KDE without dbus (which used to be possible)
Not in a very long time. People pretending it does (and arguing against appropriate dependencies) have been conveniently ignoring noisy logs and background crashes.
I would argue that it is a bug in KDE if a component crashes over dbus being absent. It is fine if the component refuses to provide service when dbus is missing, but a crash is unpleasant for the user, and a background crash is even worse since, as happened here, the user experienced the crashes over an extended period, and presumably had other weird behaviors as a result, before ever noticing that the crashes were happening. An obvious crash, or even better, an explicit error message, would promptly notify the user that the system is in a bad state and needs help.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8942

PostPosted: Sat Oct 22, 2022 3:46 pm    Post subject: Reply with quote

You can try and make that case with upstream, however dbus is assumed as a given on Linux platform and kded hard-depends on it anyway. It is Gentoo's decision to still provide some dependencies with dbus optionally - practically no one else will be building KDE Frameworks like that -, and the only way to detect runtime failure as a result is trial and error (and reports by users).
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21764

PostPosted: Sat Oct 22, 2022 4:24 pm    Post subject: Reply with quote

A hard dependency on it is not sufficient though, because a user can have it installed, and have it not run either due to the user believing it is optional (and therefore omitting it from their login setup) or due to it being broken in some way. A good error report when dbus does not behave as expected, whether because it is not installed, broken, or crashed is better than silent background crashes.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1564
Location: South America

PostPosted: Sat Oct 22, 2022 4:41 pm    Post subject: Reply with quote

Except here, dbus-daemon was actually running... But yeah, a segfault in libKF5ConfigCore looks like an unhandled error condition worthy of an upstream bug report... if one could tell how that happened :P There are are several packages involved here, including kde-frameworks/{kconfig,kded,kio}.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8942

PostPosted: Sat Oct 22, 2022 5:12 pm    Post subject: Reply with quote

The bug is caused by build-time optional dbus support in a dependency of kded. Which is completely untested.
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 857

PostPosted: Sun Oct 23, 2022 6:15 pm    Post subject: Reply with quote

Hi everybody,

I'm gratified that my weird problems touched off such a discussion. I was one of those people that only installs stuff when I really understand the reason for it. Dbus was among many "innovations" forced upon users with the advent of KDE4 seemingly at the whim of the kde project to try out stuff. Like Nepomuk, akonadi, semantic desktop and all the stuff that made KDE4 so hard to run on hardware of the time, and constantly running the cpu and the hd in the background for no good reason. Dbus it seems stood the test of time. At least you *could* tear out a lot of the unneeded parts of KDE, as opposed to having a monolithic "second operating system" that provides all services to everybody. I'm grateful to gentoo for remaining so modular.

So I have no great need to do without dbus so by all means hard-code the dependency. It does appear that KDE now requires it to work. It does appear that service 'org.kde.kcookiejar5' was the only thing that caused actual segfaults in kded, as they always came after this:

Code:

Oct 20 11:22:01 bartali dbus-daemon[3262]: [session uid=1001 pid=3260] Activating service name='org.kde.kcookiejar5' requested by ':1.2029' (uid=1001 pid=21428 comm="/usr/lib64/libexec/kf5/kioslave5 /usr/lib64/qt5/pl" label="kernel")
Oct 20 11:22:01 bartali dbus-daemon[3262]: [session uid=1001 pid=3260] Successfully activated service 'org.kde.kcookiejar5'


Instantly followed by

Code:

Oct 20 11:22:02 bartali kernel: kded5[21436]: segfault at 0 ip 00007f4af3aafcb0 sp 00007ffed67ae2f8 error 4 in libKF5ConfigCore.so.5.96.0[7f4af3aa1000+44000


That's probably a bug, kded should not segfault under any circumstances. Probably a lot of other things were failing silently (also a bug), as I had noticed that lots of things reappeared in the system tray (eg kmix) that had disappeared once the dbus use flag was compiled back in.

I don't do this for my day job, and I take my eye off the ball for a couple years and the next thing you know I'm missing something that's perfectly obvious to "everybody" is necessary. AND by then I've forgotten how I arrived at my present configuration that apparently worked fine until it didn't. This machine has been a PITA since I built it. You notice I never ask questions that involve my file server, which never has gentoo issues.

Cheers,
Jon.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum