[Mono-bugs] [Bug 546959] New: Mono hang when parsing feeds using System.ServiceModel.Syndication.SyndicationFeed

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 14 12:56:39 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=546959


           Summary: Mono hang when parsing feeds using
                    System.ServiceModel.Syndication.SyndicationFeed
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: Other
        OS/Version: FreeBSD
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: romain at blogreen.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=322517)
 --> (http://bugzilla.novell.com/attachment.cgi?id=322517)
Fix

User-Agent:       Mozilla/5.0 (X11; U; FreeBSD amd64; fr-fr) AppleWebKit/531.2+
(KHTML, like Gecko) Safari/531.2+

While trying to use System.ServiceModel.Syndication.SyndicationFeed to parse
feeds, I often encountered hangs with feeds such as:

http://code.google.com/feeds/p/bsd-sharp/svnchanges/basic
http://planet.gnome.org/rss20.xml
http://romain.blogreen.org/rss.xml


Reproducible: Always

Steps to Reproduce:

I use the following code:

-------------------8<-------------------
            using (XmlReader r = XmlReader.Create (uri)) {
                try {
                    r.Settings.XmlResolver = null;
                    SyndicationFeed feed = SyndicationFeed.Load(r);
                } catch (XmlException e) {
                    log.Error(string.Format("{0}:{1}:{2}", e.Message,
e.LineNumber, e.LinePosition));
                    Console.WriteLine(e.StackTrace);                    
                    return false;
                }
                return true;
            }
-------------------8<-------------------

The problem has been reproduced on Debian GNU/Linux and FreeBSD with mono
2.4.2.3, as long as FreeBSD with mono 2.6 brom the 2-6 branch.

Actual Results:  
Program hangs

Expected Results:  
Program keep running


 The code reveals similar constructs in various functions with and without the
line highlighted bellow:

-------------------8<-------------------
if (!reader.IsEmptyElement) {
  reader.Read ();
  for (...) {
    ...
    reader.Read (); // <------------
  }
  reader.Read ();
-------------------8<-------------------

Adding this line where it is missing solve this issue (I'll send other bugs for
other issues soon though)

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list