Bug 1343 - guidance-power-manager does a DOS on KDE by consuming all the client window handles provided by the xserver
: guidance-power-manager does a DOS on KDE by consuming all the client window h...
Status: RESOLVED FIXED
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Contributed Packages
: Fresh
: x86_64 Linux
: Normal normal
: ---
Assigned To: ROSA Linux Bugs
: ROSA Linux Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-26 01:11 MSK by Giovanni Mariani
Modified: 2013-01-10 23:01 MSK (History)
2 users (show)

See Also:
RPM Package: guidance-power-manager-4.4.0-2-rosa2012.1
ISO-related:
Bad POT generating:
Upstream:


Attachments
Xsession-errors log from a sessions showing the error messages (170.83 KB, text/plain)
2012-12-26 01:13 MSK, Giovanni Mariani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni Mariani 2012-12-26 01:11:55 MSK
Description of problem:
We have in Contrib this package, adding a KDE system-control icon to configure the power saving in the DE; unfortunately it really needs HAL to work:
look right at the start of the man python script file (/usr/bin/guidance-power-manager) and, if it don't find it, it cannot start and keeps trying to restart itself (as the code snippet below shows):
************************
class PowerManager(QWidget):
    """ Our configuration dialog. """

    def __init__(self, parent):
        def powerstart(self):
            try:
                self.powermanager = PowerManage()
            except Exception,e:
                print "Is Hal running? Failed with error: ", e
                print "Will try again to connect to HAL in 30 seconds."
                time.sleep(30)
                powerstart(self) 

        QWidget.__init__(self, parent)
************************
So, when HAL is not installed, what this package does is really a sort of DOS attack to the DE: when its starting condition triggers, the script continuously fails at the start and next tries to restart itself every 30 sec (flooding in the meantime the .xsession-errors log with the two error messages shown above) until it consume all the window handles provided by the xserver (and then the xsession log start saying "Maximum number of clients reached")...
After that any attempt to launch another GUI app will fail with the same error.

This can happen after a while: it needs more or little time according how many windows and apps you opened in the meantime, but it will always happen, even if the system is completely idle after the initial DE login.

Exiting from the KDE is always possible and doing a logout-login cycle restores the KDE functionality.


Version-Release number of selected component (if applicable):
4.4.0-2-rosa2012.1

How reproducible:
Always

Steps to Reproduce:
1. Install the package and configure the power saving options
2. Wait until the timer for power saving triggers
3. Look at the .xsession-errors flooded by "Is Hal running? Failed with error:  HALD_NOT_RUNNING Will try again to connect to HAL in 30 seconds." messages,
until it starts to appear the message "Maximum number of clients reached"
4. Try to launch a Konsole or any other GUI app: it will fail.
Comment 1 Giovanni Mariani 2012-12-26 01:13:30 MSK
Created attachment 995 [details]
Xsession-errors log from a sessions showing the error messages
Comment 2 Aleksandr Kazantcev 2013-01-04 01:42:12 MSK
We already has updated hal package in contrib - if you really need this package try install it.
Comment 3 Giovanni Mariani 2013-01-04 12:13:22 MSK
(In reply to comment #2)
> We already has updated hal package in contrib - if you really need this
> package try install it.

Yep, but to solve this bug you have also to fix the guidance-power-manager package and make it actually require the needed HAL package (and ATM it does not AFAICT); otherwise any user could easily experience the above trouble, because the installation of guidance-power-manager does not bring in the hal package, needed for guidance-power-manager correctly working.
Comment 4 Denis Silakov 2013-01-10 23:01:45 MSK
'hal' has been added to guidance-power-manager requirements.