Bug 348961 - update failed and client said to report it.
Summary: update failed and client said to report it.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 7
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Luke Macken
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-23 16:03 UTC by Kim D. Dimick
Modified: 2016-09-20 02:38 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-06-17 02:43:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
0001-Catch-unknown-errors-when-parsing-the-update-metadat.patch (1.83 KB, patch)
2008-05-13 03:27 UTC, Luke Macken
no flags Details | Diff
0001-Catch-unknown-errors-when-parsing-the-update-metadat.patch (1.92 KB, patch)
2008-05-13 03:40 UTC, Luke Macken
no flags Details | Diff
An updated patch to catch struct.error when parsing the update metadata. (2.07 KB, patch)
2008-05-30 18:36 UTC, Luke Macken
no flags Details | Diff

Description Kim D. Dimick 2007-10-23 16:03:21 UTC
Description of problem:

Update failed see attached output.

Version-Release number of selected component (if applicable):


How reproducible:

Use the update client and try to update the only update from 10-23-07

Steps to Reproduce:
1.
2.
3.
  
Actual results:

Component: pirut
Summary: TB01d293f7 struct.py:87:unpack:error: unpack requires a string argument
of length 4

Traceback (most recent call last):
  File "/usr/sbin/pup", line 650, in <module>
    main()
  File "/usr/sbin/pup", line 646, in main
    pup.run()
  File "/usr/sbin/pup", line 470, in run
    self.doRefresh()
  File "/usr/sbin/pup", line 295, in doRefresh
    self.populateUpdates()
  File "/usr/sbin/pup", line 351, in populateUpdates
    self.updateMetadata.add(repo)
  File "/usr/lib/python2.5/site-packages/yum/update_md.py", line 253, in add
    for event, elem in iterparse(infile):
  File "<string>", line 61, in __iter__
  File "/usr/lib/python2.5/gzip.py", line 227, in read
    self._read(readsize)
  File "/usr/lib/python2.5/gzip.py", line 275, in _read
    self._read_eof()
  File "/usr/lib/python2.5/gzip.py", line 308, in _read_eof
    crc32 = read32(self.fileobj)
  File "/usr/lib/python2.5/gzip.py", line 40, in read32
    return struct.unpack("<l", input.read(4))[0]
  File "/usr/lib/python2.5/struct.py", line 87, in unpack
    return o.unpack(s)
error: unpack requires a string argument of length 4

Local variables in innermost frame:
s: 
fmt: <l
o: <Struct object at 0xb4ea660>


Expected results:


Additional info:

Comment 1 Peter van Egdom 2007-11-14 19:13:48 UTC
Thank you for the report. However this has been reported to the incorrect
component. Reassigning from "up2date" to "pirut". Feel free to report any
further bugs you find to our bug tracking system.

Comment 2 Jeremy Katz 2007-11-16 01:03:41 UTC
We should probably fail more gracefully on bad files

Comment 3 Seth Vidal 2007-12-07 03:40:58 UTC
you've got an ioerror catch in update_md.py for this one - do you want a more
generic exception catch or just additional exceptions?

Comment 4 Seth Vidal 2008-03-12 15:04:13 UTC
Jeremy,  Can we still make this happen? I can't seem to get it to fallover on a
bad file in this way anymore but I may not be trying hard enough.



Comment 5 Luke Macken 2008-05-13 03:27:21 UTC
Attaching a patch that catches unknown exceptions while parsing the update
metadata, and throws an UpdateNoticeException.  This will allow pup to fail more
gracefully.

Comment 6 Luke Macken 2008-05-13 03:27:44 UTC
Created attachment 305194 [details]
0001-Catch-unknown-errors-when-parsing-the-update-metadat.patch

Comment 7 Luke Macken 2008-05-13 03:40:29 UTC
Created attachment 305195 [details]
0001-Catch-unknown-errors-when-parsing-the-update-metadat.patch

Patch to catch unknown exceptions while parsing the update metadata
(potentially due to corruption), spit out the traceback, and throw an
UpdateNoticeException.

Comment 8 Luke Macken 2008-05-13 03:42:17 UTC
Seth, what do you think about this patch?  I'm not quite sure of a better way
that we can handle unknown updateinfo corruption, other than spitting out the
traceback and masking the exception...

Comment 9 Bug Zapper 2008-05-14 14:50:25 UTC
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Seth Vidal 2008-05-30 15:32:31 UTC
Luke, the global except is just going to get us in trouble. If we could isolate
the type of exceptions a bit more I'd be happier with it.

Comment 11 Luke Macken 2008-05-30 18:36:47 UTC
Created attachment 307226 [details]
An updated patch to catch struct.error when parsing the update metadata.

Comment 12 Luke Macken 2008-05-30 18:37:27 UTC
Updated patch attached, which catches struct.error, and throws an
UpdateNoticeException mentioning that the metadata is corrupted.

Comment 13 Bug Zapper 2008-06-17 02:43:30 UTC
Fedora 7 changed to end-of-life (EOL) status on June 13, 2008. 
Fedora 7 is no longer maintained, which means that it will not 
receive any further security or bug fix updates. As a result we 
are closing this bug. 

If you can reproduce this bug against a currently maintained version 
of Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.