Bug 208979

Summary: kdesu hangs before asking for password
Product: [Applications] kdesu Reporter: Andreas Tiemeyer <grey271>
Component: generalAssignee: kdesu bugs tracker <kdesu-bugs-null>
Status: REPORTED ---    
Severity: normal CC: benderamp, dilfridge, grey271, hochglanz, pip.kde, theunfor, xeyefo9277
Priority: NOR    
Version: 1.0   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: strace of command 'kdesu xterm'

Description Andreas Tiemeyer 2009-09-30 13:45:21 UTC
Version:           1.0 (using KDE 4.3.1)
Compiler:          gcc (GCC) 4.4.1 
OS:                Linux
Installed from:    Unspecified Linux

Calling kdesu from a terminal doesn't pop up a window asking for a password. Nothing happens until the process is killed.

This problem is intermittent, rebooting always solves it.
Comment 1 Andreas Tiemeyer 2009-09-30 13:52:01 UTC
Created attachment 37263 [details]
strace of command 'kdesu xterm'

This is the strace of the command

$ kdesu xterm

The command hangs at the last strace line until it is killed
Comment 2 Oswald Buddenhagen 2010-11-07 00:12:16 UTC
*** Bug 245710 has been marked as a duplicate of this bug. ***
Comment 3 Oswald Buddenhagen 2010-11-07 00:13:16 UTC
possibly related to bug 210373
Comment 4 Oswald Buddenhagen 2010-11-07 19:30:35 UTC
unrelated, after all. kdesud is simply hanging. this is in fact a duplicate of bug 115898, but i erroneously repurposed it and attached some supposed duplicates to it, so leaving things as is.
Comment 5 Oswald Buddenhagen 2010-11-13 21:06:15 UTC
SVN commit 1196639 by ossi:

make socket handling more reliable

make the socket non-blocking, so things don't go awry when a client
freezes. the socket reading will be able to deal with that. the
socket writing function will simply ignore errors - that's not a
problem, as the socket's internal buffer is big enough for our
payloads, so blocking would indicate a serious problem anyway.

set the accept() queue length to 10. no reason to limit it to one.

speculative fix for
CCBUG: 208979
FIXED-IN: 4.5.4

 M  +3 -1      kdesud.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1196639
Comment 6 Oswald Buddenhagen 2011-04-09 11:35:03 UTC
*** Bug 268965 has been marked as a duplicate of this bug. ***
Comment 7 Oswald Buddenhagen 2011-04-09 14:00:10 UTC
according to the duplicate, the problem still persists.
the problem cannot be a stale socket (it's not a lock in either case), because that would just produce a "connection refused" or "no such file or directory" error. so kdesud must be actually hanging. when you manage to reproduce it, please attach gdb to the kdesud process and create a backtrace (please install debug symbols if you are not compiling yourself, otherwise make a debug build).
Comment 8 Andreas K. Huettel 2011-04-19 22:21:29 UTC
https://bugs.gentoo.org/show_bug.cgi?id=304213
is another duplicate (kde-4.6.2)
Comment 9 Harald Nikolisin 2011-07-02 16:53:44 UTC
Same problem here since a long time.

The problem never occurs at the beginning of a session. It appears after a decent period of time.

strace of the kdesu call (PID 32311):
------------
Process 32311 attached - interrupt to quit
recvfrom(9,
------------

strace of the kdesud (PID 15635):
------------
Process 15635 attached - interrupt to quit
futex(0x63014c, FUTEX_WAIT_PRIVATE, 1, NULL
------------
Comment 10 JoseLuisT 2014-01-18 20:31:44 UTC
I'm affected by this bug as well... kdesu hangs and does nothing, and its stupid.
Comment 11 JoseLuisT 2014-01-18 20:38:41 UTC
This bug is still present in KDE 4.8.4 in Debian Packages... and effectively I run one application with kdesu, then a file with the name kdesu_:0 in /tmp/ksocket-myusername, I exit the application I opened with kdesu, the file persists there and when I want to open again another application with root privileges kdesu stays there silent, no password prompt window, I open up krunner kill that shit... then I try to use kdesu again... silent... kill the shit... then I remove the kdesu_:0 file and vuala! kdesu works again.
Comment 12 Paul 2014-11-22 17:55:07 UTC
Present in Platform Version 4.14.2 from vendor openSUSE 13.2 x86_64 kernel 3.16.6

(The location of the socket file has changed in this release to: /run/user/#UID/ksocket-$USER)
Comment 13 Justin Zobel 2021-03-09 23:42:40 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.