k9copy calls kdesu but kdesu password window never appears

Bug #1033538 reported by D. Hugh Redelmeier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
k9copy (Ubuntu)
New
Undecided
Unassigned

Bug Description

k9copy should be run as a regular user but it needs superuser privileges for some reasons. It apparently invokes a kdelib routine "kdesu" to escalate its privilege. In my case, the main k9window becomes unresponsive, awaiting kdesu's result. But there is no kdesu window for entering the password so kdesu cannot succeed.

If I run k9copy from a terminal, I see messages indicating what's going on. But I cannot enter the password from that terminal. Here is a chunk of those messages:

k9copy(2688)/kdesu (kdelibs) KDESu::PtyProcess::exec: [ ../../kdesu/process.cpp : 293 ] Running "/usr/bin/sudo"
k9copy(2688)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [ ../../kdesu/su.cpp : 259 ] Read line "[sudo] password for silly: "
k9copy(2688)/kdesu (kdelibs) KDESu::PtyProcess::WaitSlave: [ ../../kdesu/process.cpp : 379 ] Child pid 2715
k9copy(2688)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [ ../../kdesu/su.cpp : 259 ] Read line ""
k9copy(2688)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [ ../../kdesu/su.cpp : 259 ] Read line "Sorry, try again."
k9copy(2688)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [ ../../kdesu/su.cpp : 259 ] Read line "[sudo] password for silly: "
^C

The ^C was my ending the hung process.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: k9copy 2.3.8-1
ProcVersionSignature: Ubuntu 3.2.0-27.43-generic 3.2.21
Uname: Linux 3.2.0-27-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.0.1-0ubuntu11
Architecture: amd64
Date: Mon Aug 6 10:49:28 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: k9copy
UpgradeStatus: Upgraded to precise on 2012-07-25 (12 days ago)

Revision history for this message
D. Hugh Redelmeier (hugh-mimosa) wrote :
Revision history for this message
D. Hugh Redelmeier (hugh-mimosa) wrote :

A little more data from another run.

Here's what "ps laxgwf" shows while kdesu is waiting vainly for a password.

0 1000 2562 2510 20 0 835828 50804 n_tty_ Sl+ pts/2 0:03 | \_ k9copy
4 0 2575 2562 20 0 53220 1992 n_tty_ Ss+ pts/4 0:00 | \_ /usr/bin/sudo -u root /usr/lib/kde4/libexec/kdesu_stub -

If I read this correctly, the sudo process is waiting for a tty event of some kind on pts/4.
Looking in /proc/*/fd, I find the only process with pts/4 file descriptors is this one (0, 1, and 2).
So this sudo process is never going to get anywhere.

BTW, file descriptor 7 of the sudo process is /dev/tty.

Revision history for this message
D. Hugh Redelmeier (hugh-mimosa) wrote :

A work-around:

When googling for one of the messages, I found this thread (in Italian, which I don't understand): <http://www.linuxmind-italia.org/index.php?topic=11584.0>. The last message seems to say that things worked after he deleted .kde.

I renamed ~/.kde so it would not be found by KDE. I then ran k9copy via a ssh -Y session. It worked! I assume that hiding .kde is the thing that made the difference.

After completion, I did a diff -r on the old and current .kde directories. The differences are in these files:
  .kde/share/apps/kconf_update/log/update.log
  .kde/share/apps/kfileplaces/bookmarks.xml
  .kde/share/config/K9Copy
  .kde/share/config/k9copyrc
  .kde/share/config/kdebugrc
  .kde/share/config/kdeglobals
  .kde/share/config/phonondevicesrc

Still seems like a bug.

Revision history for this message
D. Hugh Redelmeier (hugh-mimosa) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.