Jobs whose commands can't be found or exit with signals result in strange behavior and dead backends
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
checkbox (Ubuntu) |
Fix Released
|
High
|
Daniel Manrique |
Bug Description
This was observed when /usr/share/
The reason was found (by cr3) to be that the Job.execute method could return either bytes (in most cases, the result of the command is returned as bytes), or a string (a generic error message assigned by Job in the case of commands that aren't present or exit with signals). This was confusing the backend, which always tries to decode data returned from jobs.
The fix is to explicitly encode the error strings assigned by Jobs, so that the data received by the backend (and other invokers of Job.execute) is always consistent.
Steps to reproduce:
- Either move /usr/share/
- Launch checkbox
Expected result:
- List of tests to select from
- Backend remains there, awaiting our commands.
Actual result:
- Backend dies silently.
- Frontend stalls forever waiting for backend.
Since the backend dies quite silently, the way to determine what was happening was to add some debugging statements to the backend, so that it reported exceptions other than UnicodeDecodeError after executing the job.
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: checkbox 0.14.1
ProcVersionSign
Uname: Linux 3.4.0-3-generic i686
ApportVersion: 2.1.1-0ubuntu2
Architecture: i386
Date: Fri Jul 13 16:26:53 2012
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha i386 (20120601)
ProcEnviron:
LANGUAGE=en_CA:en
TERM=xterm
PATH=(custom, no user)
LANG=en_CA.UTF-8
SHELL=/bin/bash
SourcePackage: checkbox
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Marc Tardif (community): Approve
-
Diff: 60 lines (+7/-6)3 files modifiedcheckbox/job.py (+3/-3)
debian/changelog (+4/-1)
plugins/message_info.py (+0/-2)
- Luke Yelavich (community): Approve
- Ubuntu branches: Pending requested
-
Diff: 121705 lines (+24643/-21683)183 files modifiedcheckbox/job.py (+18/-4)
checkbox/lib/dmi.py (+16/-0)
checkbox/lib/resolver.py (+6/-4)
checkbox/lib/tests/resolver.py (+3/-1)
checkbox/parsers/dmidecode.py (+4/-1)
checkbox/parsers/efi.py (+52/-0)
checkbox/parsers/submission.py (+29/-12)
checkbox/parsers/tests/efi.py (+63/-0)
checkbox/tests/job.py (+37/-0)
checkbox/tests/message_files.py (+57/-0)
data/websites/html5_video.html (+14/-0)
data/whitelists/default.whitelist (+2/-0)
data/whitelists/smoke.whitelist (+1/-0)
data/whitelists/sniff.whitelist (+1/-0)
debian/changelog (+114/-0)
debian/checkbox-qt.install (+1/-1)
debian/checkbox.config (+0/-2)
debian/checkbox.install (+1/-1)
debian/checkbox.links (+1/-0)
debian/checkbox.templates (+0/-12)
debian/control (+9/-5)
debian/po/ast.po (+19/-50)
debian/po/cs.po (+19/-48)
debian/po/de.po (+19/-54)
debian/po/en_AU.po (+19/-52)
debian/po/en_GB.po (+19/-52)
debian/po/es.po (+21/-54)
debian/po/fr.po (+19/-48)
debian/po/he.po (+19/-48)
debian/po/hu.po (+19/-50)
debian/po/it.po (+19/-52)
debian/po/ja.po (+19/-53)
debian/po/nl.po (+19/-54)
debian/po/oc.po (+19/-48)
debian/po/pl.po (+19/-48)
debian/po/pt_BR.po (+19/-53)
debian/po/ro.po (+19/-48)
debian/po/ru.po (+19/-48)
debian/po/templates.pot (+16/-44)
debian/po/tr.po (+19/-48)
debian/po/uk.po (+19/-48)
debian/po/zh_CN.po (+19/-48)
debian/po/zh_TW.po (+19/-50)
debian/pycompat (+0/-1)
debian/rules (+10/-1)
debian/watch (+0/-3)
install/postinst (+1/-1)
jobs/cpu.txt.in (+8/-2)
jobs/disk.txt.in (+5/-5)
jobs/firewire.txt.in (+6/-0)
jobs/info.txt.in (+9/-8)
jobs/install.txt.in (+4/-2)
jobs/mediacard.txt.in (+48/-0)
jobs/miscellanea.txt.in (+3/-2)
jobs/networking.txt.in (+1/-1)
jobs/power-management.txt.in (+11/-2)
jobs/resource.txt.in (+5/-0)
jobs/usb.txt.in (+22/-10)
jobs/wireless.txt.in (+1/-1)
patches/0.14.2 (+17/-0)
patches/0.4 (+3/-3)
patches/0.5 (+3/-3)
patches/0.8 (+3/-3)
patches/0.9 (+3/-3)
plugins/message_info.py (+0/-2)
po/POTFILES.in (+2/-0)
po/ace.po (+238/-208)
po/af.po (+238/-208)
po/am.po (+238/-208)
po/ar.po (+241/-211)
po/ast.po (+248/-209)
po/az.po (+238/-208)
po/be.po (+238/-208)
po/bg.po (+238/-208)
po/bn.po (+247/-208)
po/bo.po (+238/-208)
po/br.po (+238/-208)
po/bs.po (+247/-208)
po/ca.po (+238/-208)
po/ca@valencia.po (+238/-208)
po/checkbox.pot (+236/-206)
po/ckb.po (+238/-208)
po/cs.po (+246/-207)
po/cy.po (+238/-208)
po/da.po (+238/-208)
po/de.po (+224/-200)
po/dv.po (+238/-208)
po/el.po (+250/-211)
po/en_AU.po (+585/-546)
po/en_CA.po (+238/-208)
po/en_GB.po (+555/-516)
po/eo.po (+238/-208)
po/es.po (+225/-197)
po/et.po (+238/-208)
po/eu.po (+238/-208)
po/fa.po (+238/-208)
po/fi.po (+241/-208)
po/fr.po (+238/-205)
po/ga.po (+238/-208)
po/gd.po (+238/-208)
po/gl.po (+238/-208)
po/he.po (+238/-208)
po/hi.po (+238/-208)
po/hr.po (+238/-208)
po/hu.po (+248/-209)
po/hy.po (+238/-208)
po/id.po (+238/-208)
po/is.po (+238/-208)
po/it.po (+250/-211)
po/ja.po (+241/-208)
po/jbo.po (+238/-208)
po/ka.po (+238/-208)
po/kk.po (+238/-208)
po/km.po (+249/-210)
po/kn.po (+238/-208)
po/ko.po (+238/-208)
po/ku.po (+238/-208)
po/ky.po (+238/-208)
po/lt.po (+238/-208)
po/lv.po (+238/-208)
po/mk.po (+238/-208)
po/ml.po (+238/-208)
po/mr.po (+238/-208)
po/ms.po (+247/-208)
po/my.po (+238/-208)
po/nb.po (+238/-208)
po/nds.po (+238/-208)
po/ne.po (+238/-208)
po/nl.po (+249/-210)
po/nn.po (+238/-208)
po/oc.po (+241/-205)
po/pl.po (+238/-208)
po/ps.po (+238/-208)
po/pt.po (+238/-208)
po/pt_BR.po (+224/-196)
po/ro.po (+249/-210)
po/ru.po (+247/-208)
po/sd.po (+238/-208)
po/shn.po (+238/-208)
po/si.po (+238/-208)
po/sk.po (+238/-208)
po/sl.po (+249/-210)
po/sq.po (+240/-208)
po/sr.po (+238/-208)
po/sv.po (+238/-208)
po/ta.po (+238/-208)
po/te.po (+238/-208)
po/th.po (+238/-208)
po/tr.po (+246/-207)
po/ug.po (+249/-210)
po/uk.po (+343/-277)
po/ur.po (+238/-208)
po/uz.po (+238/-208)
po/vi.po (+238/-208)
po/zh_CN.po (+246/-207)
po/zh_HK.po (+238/-208)
po/zh_TW.po (+238/-208)
qt/checkbox-qt.desktop.in (+1/-1)
qt/com.canonical.QtCheckbox.service (+1/-1)
scripts/cpu_offlining (+13/-15)
scripts/cpu_scaling_test (+0/-630)
scripts/cpu_topology (+18/-10)
scripts/create_connection (+23/-17)
scripts/disk_read_performance_test (+28/-6)
scripts/disk_smart (+20/-5)
scripts/disk_stats_test (+4/-7)
scripts/dmi_resource (+4/-4)
scripts/efi_resource (+54/-0)
scripts/frequency_governors_test (+645/-0)
scripts/fwts_test (+5/-4)
scripts/gpu_test (+9/-23)
scripts/ipmi_test (+9/-2)
scripts/memory_compare (+75/-27)
scripts/memory_test (+38/-21)
scripts/network_bandwidth_test (+16/-11)
scripts/network_device_info (+1/-1)
scripts/network_ntp_test (+24/-20)
scripts/optical_detect (+1/-1)
scripts/optical_read_test (+18/-8)
scripts/process_wait (+3/-2)
scripts/removable_storage_test (+63/-50)
setup.cfg (+1/-0)
setup.py (+1/-1)
This bug was fixed in the package checkbox - 0.14.2
---------------
checkbox (0.14.2) quantal; urgency=low
* New upstream release (LP: #1025869)
[Jeff Marcom]
* scripts/gpu_test - Fixed potential thread exiting issue.
[Javier Collado]
* Fixed detection of circular references in resolver.
[Jeff Lane] info.txt. in: added block_device resource requirements to hdparm job so miscellanea. txt.in: modified fwts_results.log job optical_ detect: minor tweak to send error output to stderr optical_ read_test: added root user check because this needs to be stdout. write() and flush() calls with simple print statements. network_ device_ info: minor change so that the fail message now cpu_scaling_ test: lots of output changes using logging module. governors_ test to be more descriptive and less cpu.txt. in: added an attachment job to attach the freq_governors log. governors to write to log file cpu_offlining: added an extra bit of output in case of failures. power-managemen t.txt.in: added job to attach fwts_wakealarm.log to network_ ntp_test: Tweaked output to use log levels more disk_read_ performance_ test: Added extra targeted output so that removable_ storage_ test: vastly improved the output from that script memory_ compare: changed the output a little so failures now dump
* New version 0.14.2 for Quantal Quetzal development.
* jobs/cpu.txt.in: added cpu_scaling_test log attachment job
* jobs/disk.txt.in: modified block_device requirements so they'll work right
jobs/
it won't run on removable stuff where it's not necessary.
* jobs/info.txt.in: removed extraneous fwts_log job
jobs/
* scripts/
scripts/
run with root privileges. Added some additional output for stderr for
failures so we will know WHY a test or the script failed. Replaced
sys.
* scripts/ipmi_test: output tweaks so error messages now go to stderr. No BMC
message is a little more clear. Module failed to load now generates an
error rather than a simple exit.
* scripts/
specifies that it was an error and outputs to stderr properly.
* scripts/disk_smart: Improvements to the logging and output during testing.
* scripts/
renamed script to frequency_
confusing. Added a --log option to write logs to an actual file
jobs/
Modified cpu/frequency_
* scripts/
* scripts/fwts_test: improved console output so that the info displayed in
submission.xml is more useful.
jobs/
results.
* scripts/
appropriately. Added some decoding so that bytes output show up as strings
properly in output. Converted from optparse to argparse. Added a root
check because this needs to be root to properly run.
* scripts/
users can understand what's going on. Moved the exit bits so the test will
actuall run on multiple drives as originally intended and not exit on the
first failure.
* scripts/
and also introduced some new error handling to cover a couple conditions
that generated unhelpful tracebacks.
* scripts/
data to stderr and success to stdout. Also added a try/except block to
catch possible ZeroDivisionError cases if dmi or meminfo return 0 (found on
my local system due to a library issue)
* jobs/p...