Checkbox on Kubuntu stalls when gathering information

Bug #557443 reported by Marc Tardif
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
Undecided
Marc Tardif
checkbox (Ubuntu)
Fix Released
Undecided
Marc Tardif
Lucid
Fix Released
Undecided
Unassigned

Bug Description

The impact of this bug is that checkbox stalls forever when attempting to gather system information on Kubuntu. This fix changes the way that kdesudo is called in order to successfully pass the PATH information in the environment.

When running Checkbox on Kubuntu, the application seems to stall forever when attempting to gather information from the system. The reason is that the backend is started during this process which calls upon kdesudo. The backend_info plugin assumes that kdesudo can take environment variables as part of the option:

  kdesudo -- PATH=/foo command

However, it seems that kdesudo calls the argument with execv instead of the shell, so environment variables cannot be given this way.

Related branches

Marc Tardif (cr3)
Changed in checkbox:
assignee: nobody → Marc Tardif (cr3)
status: New → Confirmed
Marc Tardif (cr3)
Changed in checkbox:
status: Confirmed → Fix Committed
Marc Tardif (cr3)
Changed in checkbox:
status: Fix Committed → Fix Released
Marc Tardif (cr3)
Changed in checkbox (Ubuntu Lucid):
milestone: none → lucid-updates
Changed in checkbox (Ubuntu):
status: New → Fix Released
assignee: nobody → Marc Tardif (cr3)
Changed in checkbox (Ubuntu Lucid):
status: New → In Progress
Marc Tardif (cr3)
description: updated
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hello, the following information should complete this bug as a valid SRU report, to hopefully upload this fix to Lucid.

Further discussion of the problem:

The command used to invoke the backend will be of the form:

kdesudo -- PATH=/usr/share/checkbox/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games /usr/share/checkbox/backend

kdesudo absolutely can't handle the environment variable so if this command is invoked by hand, it simply exits without invoking the backend.

When this happens, the frontend just hangs there, waiting for the backend to start and respond to control messages. This obviously never happens and the frontend will stall forever.

Solution:

Checkbox revision 787 works around this problem by adding a --path parameter on the superprivileged backend. The backend then adds the given path to its own environment, in substitution of passing the PATH environment variable which kdesudo can't handle.

The backend_info plugin takes its own $PATH and passes it, via --path, to the backend when spawning it. This way, even under kdesudo, we ensure that the backend will have the correct path, all while avoiding confusing kdesudo with the PATH variable before the command to execute.

TEST CASE:

1- Boot a Kubuntu 10.04 LiveCD choosing "Try Kubuntu without installing"
2- Open konsole and install checkbox:
   sudo apt-get update; sudo apt-get install checkbox-gtk
3- Launch checkbox-gtk from the terminal
4- When it gets to the "Gathering information from your system" it stays there forever, as the frontend is waiting for the backend to start and open the communication pipes (which never happens as the backend fails to start).
5- Additional verification is to ps wwuxa |grep backend and confirm that the backend process is not present.

Regression potential:
The new code is just passing the contents of $PATH (which coming from the environment should already be properly formatted) to the backend (handling it through Python's options module so it should also be quite resilient). Thus the new code doesn't look like it could introduce potential problems; An empty $PATH would result in a lot of failed tests (as the backend might fail to find commands to run) and a malformed $PATH would have given problems with the old version as well. Given that the original behavior was "doesn't work at all", chances for a regression are almost nil.

Revision history for this message
Ara Pulido (ara) wrote :

This bug is awaiting verification that the checkbox version in lucid-proposed solves the problem. Please test checkbox and update this bug with the results. If the problem is solved, change the tag 'verification-needed' to 'verification-done'.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Marc, or anyone else affected,

Accepted checkbox into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in checkbox (Ubuntu Lucid):
status: In Progress → Fix Committed
Revision history for this message
Chad A Davis (chadadavis) wrote :

Verified fix from checkbox 0.9.2 on Kubuntu Lucid

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package checkbox - 0.9.2

---------------
checkbox (0.9.2) lucid-proposed; urgency=low

  New upstream release (LP: #567568):
  * Added referer when sending submissions to Launchpad (LP: #550973)
  * Added suggests to checkbox package in debian/control file (LP: #352740)
  * Fixed udev_resource script to be more resilient (LP: #556824)
  * Fixed cdimage_resource script to read casper.log (LP: #558728)
  * Fixed reporting all resources found for a job (LP: #560948)
  * Fixed stalling when using kdesudo to start backend (LP: #557443)
  * Fixed starting the appropriate default browser on UNR (LP: #563050)
  * Fixed opening the report with the gconf preferred browser (LP: #562580)
  * Fixed suspend_test to use relative time for wakealarm (LP: #349768)
  * Fixed backend not getting terminated upon closing (LP: #553328)
 -- Daniel Manrique <email address hidden> Wed, 22 Jun 2011 14:18:08 -0400

Changed in checkbox (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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