[nSLUG] Improving QA of Linux distributions
D G Teed
donald.teed at gmail.com
Fri Jun 24 16:51:48 ADT 2011
On Fri, Jun 24, 2011 at 4:30 PM, Peter Dobcsanyi <petrus at ftml.net> wrote:
> On Fri, Jun 24, 2011 at 12:36:54PM -0300, D G Teed wrote:
> > I would think everyone who is writing code (say at Redhat, in this case
> > of not testing for a file before opening) is aware of things they teach
> > a first year programming course.
> Could you, please, explain what kind of "testing" you have in mind and
> why that would be beneficial.
I checked my email history and my memory was slightly off.
In the problem I encountered, the file existed, but it was empty.
When yum was run with any arguments, it crapped out with a backtrace:
Loading "rhnplugin" plugin
Loading "security" plugin
Loading "dellsysidplugin" plugin
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
File "/usr/share/yum-cli/yummain.py", line 85, in main
File "/usr/share/yum-cli/cli.py", line 163, in getOptionsConfig
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 183,
File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 169, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/rhnplugin.py", line 110, in init_hook
login_info = up2dateAuth.getLoginInfo()
File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 211, in
File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 159, in login
File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 120, in
data = pickle.load(pcklAuth)
File "/usr/lib64/python2.4/pickle.py", line 1390, in load
File "/usr/lib64/python2.4/pickle.py", line 872, in load
File "/usr/lib64/python2.4/pickle.py", line 894, in load_eof
The source of this problem was that /var/spool/up2date/loginAuth.pkl
was an empty file. This wasn't at all obvious in the errors.
This could have been recovered more gracefully by testing
for error after a read from the file. Of course there was some other
bug present which wiped it empty but I never saw it happen again.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nSLUG