[Mono-bugs] [Bug 74161][Nor] Changed - XmlTextReader.Read blocked when reading Xml from Network Stream

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 2 May 2005 08:07:07 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by ximian-bugzilla@winsper.org.uk.

http://bugzilla.ximian.com/show_bug.cgi?id=74161

--- shadow/74161	2005-04-06 02:56:03.000000000 -0400
+++ shadow/74161.tmp.6878	2005-05-02 08:07:07.000000000 -0400
@@ -172,6 +172,26 @@
 ------- Additional Comments From atsushi@ximian.com  2005-04-06 02:56 -------
 The code you put is exactly the same as I put, right? It does block
 under MS.NET again, of course.
 
 I believe it is the same problem refered in bug #74279. That is, it is
 by design.
+
+------- Additional Comments From ximian-bugzilla@winsper.org.uk  2005-05-02 08:07 -------
+I've done some digging and I don't think it's quite the same as bug
+#74279.  The design decision given on the mailing list relates to
+blocking whilst part-way through reading a node, which is reasonable
+behaviour.
+
+The problem is that something is trying to read X bytes and is
+blocking until it's read that many bytes, whether it's got enough data
+to parse the next node or not.  Since some Jabber packets are very
+small, they're not enough to fill the buffer so that the reader can
+continue.  I can confirm this by spamming the server with the same
+query packet so the server simply sends the same reply time and again
+until the buffer fills up and XmlTextReader.Read() does return,
+despite not reaching the end of the document.
+
+This bug is also present in .Net 1.1 SP1, but Microsoft have confirmed
+it no longer happens in 2.0, so they do consider it a bug.  It's a
+blocker for anyone trying to write a Jabber/XMPP client, so I'm
+willing to help fix this issue as much as I can.