Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 289601 - yum doesn't handle bad xml very gracefully
Summary: yum doesn't handle bad xml very gracefully
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum
Version: 5.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: James Antill
QA Contact:
URL:
Whiteboard:
Depends On: 226169
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-13 17:56 UTC by Máirín Duffy
Modified: 2013-01-10 10:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-19 14:52:51 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Máirín Duffy 2007-09-13 17:56:03 UTC
Hi, this is a clone of bug 226169 for a backport of the yum fix for RHEL 5. 

+++ This bug was initially created as a clone of Bug #226169 +++

Version-Release number of selected component (if applicable):
yum-3.0.1-5.el5

An excerpt of yum's behavior upon encountering bad xml:

[root@milkbones ~]# yum check-update
Loading "rhnplugin" plugin
[
Loading "installonlyn" plugin
Setting up repositories
rhel-x86_64-server-5      100% |=========================| 1.2 kB    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 867 kB    00:01
##################                                 1039/2811

(process:12033): GLib-WARNING **: GError set over the top of a previous GError
or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before
it's set.
The overwriting error message was: Parsing primary.xml error: Entity 'gt' not
defined

(process:12033): GLib-WARNING **: GError set over the top of a previous GError
or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before
it's set.
The overwriting error message was: Parsing primary.xml error: Entity 'amp' not
defined

(process:12033): GLib-WARNING **: GError set over the top of a previous GError
or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before
it's set.
The overwriting error message was: Parsing primary.xml error: Entity 'amp' not
defined

-- Additional comment from duffy@redhat.com on 2007-01-31 14:46 EST --
Created an attachment (id=147045)
traceback from jkt


-- Additional comment from duffy@redhat.com on 2007-01-31 14:47 EST --
Created an attachment (id=147046)
traceback from jneedle


-- Additional comment from katzj@redhat.com on 2007-01-31 15:26 EST --
I vaguely remember fixing this -- can you try a rebuild of yum-metadata-parser
from rawhide and see if it helps?  

-- Additional comment from skvidal@linux.duke.edu on 2007-08-03 16:19 EST --
anyone?

-- Additional comment from katzj@redhat.com on 2007-09-13 13:51 EST --
This is definitely fixed in current code.  If we want to push an update for
RHEL5, then a new bug should be opened and pushed along through the process

Comment 1 RHEL Product and Program Management 2007-10-16 03:39:46 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 2 James Antill 2008-01-30 15:00:05 UTC
 This should be fixed in the current yum-metadata-parser RHEL-5.2 errata.


Comment 9 James Antill 2008-04-23 13:53:32 UTC
 Yeh, there's very little we can do about actual bad XML ... AIUI, because it's
libxml that dies then. I had assumed that this BZ referred to things using &
and > etc.

 So ... Máirín Duffy ... do you know what this BZ is about ?:)


Comment 10 Jeff Needle 2008-04-23 14:12:57 UTC
Hmm, milkbones - that's mine, so I guess this is mine to respond to.  This was
an intermittent error - can't reproduce it any more, but the GLIB-Warning
messages were definitely Very Ugly and something that screamed "Bug me!", and
this clone was in response to Jeremy's assertion that "This is definitely fixed
in current code", so we wanted to make sure it got into the RHEL5 stream at some
point.  Sure, we can't do much about bogus XML, but when you start getting
errors that say stuff like "This indicates a bug in someone's code." you should
expect bug reports.

Comment 11 James Antill 2008-04-23 14:42:19 UTC
 yeh, that's fine, and hopefully we've gotten rid of those messages now ... and
in the latest code we don't do those messages for bad XML, but we do traceback
which is almost as ugly :).


Comment 12 Daniel Veillard 2008-04-23 14:52:44 UTC
For reference:

Bad XML is just not XML, explicit bias from the XML spec designer
team (the the HTML parsing horror stories if you disagree :-)
  http://www.w3.org/TR/REC-xml/#dt-fatal

Daniel

Comment 16 Chris Ward 2008-06-17 15:48:53 UTC
Reminder: This bug includes the 'RHTS' QA Whiteboard Keyword. Don't forget to add
'RHTSdone' to the QA Whiteboard along with a comment describing where the RHTS
test can be found once the RHTS test has been written. Otherwise, if an RHTS
will not be created, please remove RHTS from the qa whiteboard.


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