network_check crashed with OSError in _execute_child(): [Errno 2] No such file or directory

Bug #988260 reported by ERE
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
checkbox (Ubuntu)
Fix Released
Low
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
On systems where zenity is not installed or otherwise fails to run, the network_check test crashes with an exception which may also trigger a bug report and is confusing to the user.

The error message is:

network_check crashed with OSError in _execute_child(): [Errno 2] No such file or directory

The development branch fixes this by properly catching the exception and outputting a useful error message to stdout instead. That way the test result will still be available even if zenity is not usable.

[Test Case]
- Either uninstall zenity (undesirable because it also removes metacity and unity-2d) or render it inoperable by renaming the executable.
- Manually run /usr/share/checkbox/scripts/network_check
- An exception trace will appear and the user will be asked to report a problem.

[Regression Potential]
A regression in the sense of the old behavior reoccurring is virtually impossible, as we're simply catching an exception that was previously being ignored. The new code is very unlikely to fail as it's just a print statement so no unrelated failures are introduced.

ProblemType: CrashDistroRelease: Ubuntu 11.10
Package: checkbox 0.12.8
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
CasperVersion: 1.287
CheckboxSubmission: 1be3304fd540677596ce7b85a36afa1b
CheckboxSystem: d00f84de8a555815fa1c4660280da308
Date: Wed Apr 25 10:34:02 2012
ExecutablePath: /usr/share/checkbox/scripts/network_check
InterpreterPath: /usr/bin/python2.7
LiveMediaBuild: Lubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
ProcCmdline: /usr/bin/python /usr/share/checkbox/scripts/network_check
ProcEnviron:
 PATH=(custom, no user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/share/checkbox/scripts/network_check']SourcePackage: checkbox
Title: network_check crashed with OSError in _execute_child(): [Errno 2] No such file or directory
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Related branches

Revision history for this message
ERE (karfter) wrote :
tags: removed: need-duplicate-check
Changed in checkbox (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Daniel Manrique (roadmr) wrote :

network_check calls the zenity command to display a success/failure graphical dialog box. My guess is that you didn't have zenity installed, which caused this failure when trying to call it as seen in the attached traceback.txt.

This is present on the most current version of the test, a way to fix it would be to wrap the "call" call (pardon the redundancy) on line 57 in a try:except block, so the exception thrown (OSError) is handled gracefully, maybe by just outputting a message to stdout.

visibility: private → public
Changed in checkbox (Ubuntu):
importance: Medium → Low
status: New → Triaged
tags: added: bitesize
Revision history for this message
Daniel Manrique (roadmr) wrote :

I'm triaging as importance: Low as this will only affect people who explicitly removed zenity (and metacity and unity-2d in the process). Also tagging bitesize to see if we can get some community help with this.

Revision history for this message
Marc Tardif (cr3) wrote :

Why is the script not automatic by default? Or, better yet, why isn't it only automatic? If there needs to be any manual intervention, it would be preferable to define the job as such and use the test button to execute the script. This would provide a much more unified user experience than calling zenity that breaks the flow of checkbox.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Marc:

There is another fully-automated test (networking/internet). The network_check test is manual by design (though it does require you to click "test" and then pops up the zenity window). It's not used in the default checkbox whitelist, but some other users may still require it in their whitelists and expect it to be manual, otherwise I think they'd be using networking/internet instead.

Thus it may be worth fixing this small misbehavior for those who need it, but based on previous experience we should at least ask around before radically changing this test, as we may inadvertently affect others :(

Changed in checkbox (Ubuntu):
status: Triaged → Fix Committed
Daniel Manrique (roadmr)
Changed in checkbox (Ubuntu):
status: Fix Committed → Fix Released
Daniel Manrique (roadmr)
description: updated
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Hello ERE, or anyone else affected,

Accepted checkbox into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/checkbox/0.13.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in checkbox (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Daniel Manrique (roadmr) wrote :
Download full text (3.3 KiB)

Hi, I'm testing this on a 12.04.1 system, since it's a VM I can afford to remove zenity without problems.

First I remove zenity, with checkbox 0.13.7 installed here's what the relevant packages look like:

# dpkg --list checkbox* zenity
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii checkbox 0.13.7 System testing application
un checkbox-gtk <none> (no description available)
ii checkbox-qt 0.13.7 QT4 interface for checkbox
un zenity <none> (no description available)

The test command results in this:
# /usr/share/checkbox/scripts/network_check
Traceback (most recent call last):
  File "/usr/share/checkbox/scripts/network_check", line 64, in <module>
    sys.exit(main())
  File "/usr/share/checkbox/scripts/network_check", line 56, in main
    call(command)
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Then in one fell swoop:

# apt-get install -y checkbox checkbox-qt && dpkg --list checkbox* && /usr/share/checkbox/scripts/network_check
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  checkbox-cli checkbox-gtk bonnie++ bootchart bzr cvs ethtool flex git-core
  nmap smartmontools sox stress
Recommended packages:
  gstreamer0.10-gconf
The following packages will be upgraded:
  checkbox checkbox-qt
2 upgraded, 0 newly installed, 0 to remove and 248 not upgraded.
Need to get 0 B/1,511 kB of archives.
After this operation, 27.6 kB disk space will be freed.
Preconfiguring packages ...
(Reading database ... 144166 files and directories currently installed.)
Preparing to replace checkbox 0.13.7 (using .../checkbox_0.13.8_i386.deb) ...
Unpacking replacement checkbox ...
Preparing to replace checkbox-qt 0.13.7 (using .../checkbox-qt_0.13.8_i386.deb) ...
Unpacking replacement checkbox-qt ...
Processing triggers for man-db ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for gnome-menus ...
Setting up checkbox (0.13.8) ...
Setting up checkbox-qt (0.13.8) ...
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii checkbox 0.13.8 System testing application
un checkbox-gtk <none> (no description available)
ii checkbox-qt 0.13.8 QT4 interface for checkbox...

Read more...

tags: added: verification-done
removed: verification-needed
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello ERE, or anyone else affected,

Accepted checkbox into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/checkbox/0.13.9 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Daniel Manrique (roadmr) wrote :
Download full text (3.3 KiB)

OK, repeating the tests from comment #7 on a virtual machine but testing checkbox 0.13.9 this time:

- Removing zenity
$ dpkg --list checkbox* zenity
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii checkbox 0.13.7 System testing application
un checkbox-cli <none> (no description available)
un checkbox-gtk <none> (no description available)
ii checkbox-qt 0.13.7 QT4 interface for checkbox
un zenity <none> (no description available)

Test command:
$ /usr/share/checkbox/scripts/network_check
Traceback (most recent call last):
  File "/usr/share/checkbox/scripts/network_check", line 64, in <module>
    sys.exit(main())
  File "/usr/share/checkbox/scripts/network_check", line 56, in main
    call(command)
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Next installation of checkbox 0.13.9 and retest:

$ apt-get install -y checkbox checkbox-qt && dpkg --list checkbox* && /usr/share/checkbox/scripts/network_check
Reading package lists... 0%
Reading package lists... Done
Reading state information... Done

Suggested packages:
  checkbox-cli checkbox-gtk bonnie++ bootchart bzr cvs ethtool flex fwts
  git-core nmap smartmontools sox stress
The following packages will be upgraded:
  checkbox checkbox-qt
2 upgraded, 0 newly installed, 0 to remove and 326 not upgraded.
Need to get 0 B/1,510 kB of archives.
After this operation, 27.6 kB disk space will be freed.

Preconfiguring packages ...
(Reading database ... 141899 files and directories currently installed.)
Preparing to replace checkbox 0.13.7 (using .../checkbox_0.13.9_i386.deb) ...
Unpacking replacement checkbox ...
Preparing to replace checkbox-qt 0.13.7 (using .../checkbox-qt_0.13.9_i386.deb) ...
Unpacking replacement checkbox-qt ...
Processing triggers for man-db ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for gnome-menus ...
Setting up checkbox (0.13.9) ...
Setting up checkbox-qt (0.13.9) ...
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii checkbox 0.13.9 System testing application
un checkbox-cli <none> (no description available)
un checkbox-gtk <none> (no description available)
ii checkbox-qt 0.13.9 QT4 interface for checkbox
...

Read more...

tags: added: verification-done
removed: verification-needed
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package checkbox - 0.13.9

---------------
checkbox (0.13.9) precise-proposed; urgency=low

  * Updated fix for bug #1026614 which was missing some code.
  * Removed bad fix for bug 990133.

checkbox (0.13.8) precise-proposed; urgency=low

  * New upstream release (LP: #1061198)

  [Marc Tardif]
  * checkbox/dispatcher.py: Updated license to GPLv3 to be consistent with
    rest of Checkbox files (LP: #1049881)

  [Sylvain Pineau]
  * qt/frontend/qtfront.ui: Fixed the test purpose widget size to allow two
    lines of description (LP: #1032255)
  * scripts/camera_test, jobs/camera.txt.in: Added a 10s timeout to the camera
    still test (LP: #990133)

  [Daniel Manrique]
  * jobs/audio.txt.in: replaced gconfaudiosink by autoaudiosink (LP: #978895)
  * Instruct Chromium browser to accept file:// URLs so it can correctly
    open the checkbox submission.xml report (LP: #1026614)
  * scripts/network_check: InvalidURL exception is caught and handled more
    cleanly (LP: #751701)
  * Set the correct user (root) for fwts-wakealarm test (LP: #1004102)
  * Set correct user (root) for usb/storage-preinserted, so it works correctly
    on servers (LP: #1004131)

  [Nathan Williams]
  * scripts/network_check: Fixed exception handling in the absence of zenity
    (LP: #988260)
 -- Daniel Manrique <email address hidden> Tue, 20 Nov 2012 16:31:02 -0500

Changed in checkbox (Ubuntu Precise):
status: Fix Committed → Fix Released
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.