Bug 289530 - Installation of applets written in python lead to problems with devicenotifier
Summary: Installation of applets written in python lead to problems with devicenotifier
Status: RESOLVED UNMAINTAINED
Alias: None
Product: bindings
Classification: Developer tools
Component: pykde (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-21 21:53 UTC by Mirek Mieszczak
Modified: 2018-11-17 05:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mirek Mieszczak 2011-12-21 21:53:28 UTC
+++ This bug was initially created as a clone of Bug #281331 +++

Version:           unspecified (using KDE 4.6.5) 
OS:                Linux

Installation of any applet that is written in python lead to silent crash (or program end) of kdeinit4 plasma-desktop.

This lead to the state, that after insering of usb keys, or harddisks mounting of these devices is impossible.

Reproducible: Always

Steps to Reproduce:
Install python applet on desktop/panel like:
veromix: http://kde-apps.org/content/show.php/Veromix+-+volume+control+%2B+soundmenu?content=116676
tail: http://kde-apps.org/content/show.php/tail?content=118067
After that, try to mount inserted usb stick

Actual Results:  
The usb key will no be mounted, and on log there will appear following message:
console-kit-daemon[2097]: WARNING: Couldn't read /proc/2766/environ: Failed to open file '/proc/2766/environ': No such file or directory 

where mentioned proc (in that case 2766) is:
kdeinit4 plasma-desktop, which silently disappeared at the moment of starting of the python applet. 

Expected Results:  
Normal mount of usb stick.

It happen frequently, that if there are active python applets, the login procedure to kde is taking very long time, and plasma-desktop is taking 100% of cpu usage. killing of plasma-desktop, and restarting it after few minutes helps in most cases.
Comment 1 Christoph Feck 2011-12-21 23:58:31 UTC
According to bug 281331 comment #2, this is a problem with the bindings.
Comment 2 Mirek Mieszczak 2012-03-09 10:45:18 UTC
In kde 4.8.1 the problem still exists.
Comment 3 Mirek Mieszczak 2012-08-16 06:39:57 UTC
KDE 4.8.5 nothing changed
Comment 4 Mirek Mieszczak 2012-08-20 13:02:35 UTC
I have logged dbus/policykit traffic, and it seems, that after silent restart of
kdeinit4: plasma-desktop
system doesn't update dbus caller ID for the new process.


user dbus session:
signal sender=:1.16 -> dest=(null destination) serial=33786 path=/org/kde/solid/Device__2Forg_2Ffreedesktop_2FUDisks_2Fdevices_2Fsdb1; interface=org.kde.Solid.Device; member=setupRequested
signal sender=:1.16 -> dest=(null destination) serial=33787 path=/org/kde/solid/Device__2Forg_2Ffreedesktop_2FUDisks_2Fdevices_2Fsdb1; interface=org.kde.Solid.Device; member=setupDone
   int32 1
   string "Wystąpił nieokreślony błąd.: Not Authorized"
method call sender=:1.14 -> dest=org.kde.DeviceNotifications serial=806 path=/org/kde/DeviceNotifications; interface=org.kde.DeviceNotifications; member=notify
   int32 1
   string "Nie można zamontować następującego urządzenia: kuba"
   string "Wystąpił nieokreślony błąd.: Not Authorized"
   string "/org/freedesktop/UDisks/devices/sdb1"





log from polkitd:
** (polkitd:23950): DEBUG: system-bus-name::1.19 is inquiring whether system-bus-name::1.20 is authorized for org.freedesktop.udisks.filesystem-mount
** (polkitd:23950): DEBUG:  user of caller is unix-user:root
** (polkitd:23950): DEBUG:  user of subject is unix-user:mirek
** (polkitd:23950): DEBUG: checking whether system-bus-name::1.20 is authorized for org.freedesktop.udisks.filesystem-mount
** (polkitd:23950): DEBUG:   (nil)
** (polkitd:23950): DEBUG:  not authorized


and log from consolekit:

console-kit-daemon[14480]: DEBUG: CkManager: get session for unix process: 31707
console-kit-daemon[14480]: DEBUG: uid = 0
console-kit-daemon[14480]: DEBUG: pid = 23950
console-kit-daemon[14480]: WARNING: Couldn't read /proc/31707/environ: Failed to open file '/proc/31707/environ': No such file or directory
console-kit-daemon[14480]: DEBUG: CkManager: unable to lookup session for unix process: 31707
Comment 5 Hector Martin 2015-07-20 09:30:42 UTC
Still happening in 4.14.10. I was wondering why my Device Notifier stopped working, turns out Veromix was triggering this. Same exact symptoms as in the prior comment: the Python applet somehow triggers a fork/restart of plasma-desktop, DBus gets confused about what PID the connection is coming from, and that breaks Polkit/ConsoleKit.
Comment 6 Hector Martin 2015-07-20 09:54:45 UTC
Turns out this is a Gentoo bug. There's a pykde plugin wrapper patch that shells out to eselect to figure out the Python version, but gets the fork() backwards - the parent execs and the child lives on. That's what breaks everything.

Filed a Gentoo bug. Feel free to close this.
https://bugs.gentoo.org/show_bug.cgi?id=555436
Comment 7 Andrew Crouthamel 2018-11-17 05:27:45 UTC
Hello, unfortunately this bug is being closed as unmaintained, per request of einar77.