> doing anything to a c stream will work in a multithreaded environment; ie, > the internal buffers/vars will not be stompped on. > > It''s in the spec(don''t ask me where, I read it in the info docs).I think the issue is with Xfrd''s IOStream type (libxutil/iostream.h), rather than with standard C streams. (and I don''t know if they''re safe for multiple users, although I would expect that they''re single thread-oriented) Cheers, Mark _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
I''ve attached a patch for libxutil/libxc. This fixes one of the hangs I''ve seen during migrations. It applies against 2.0 and 2.0-testing. Changes: * Encountering EOF or error when xfrd reads from stream could cause an infinite loop. * Cleaned up the closing of streams. * Fixed several memory leaks. Please consider applying. Signed-off-by: Charles Coffing <ccoffing@novell.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> I''ve attached a patch for libxutil/libxc. This fixes one of > the hangs I''ve seen during migrations. It applies against > 2.0 and 2.0-testing. > > Changes: > * Encountering EOF or error when xfrd reads from stream > could cause an infinite loop. > * Cleaned up the closing of streams. > * Fixed several memory leaks. > > Please consider applying. > > Signed-off-by: Charles Coffing <ccoffing@novell.com>Thanks! Ian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Charles Coffing wrote:> I''ve attached a patch for libxutil/libxc. This fixes one of the hangs I''ve seen during migrations. It applies against 2.0 and 2.0-testing. > > Changes: > * Encountering EOF or error when xfrd reads from stream could cause an infinite loop. > * Cleaned up the closing of streams. > * Fixed several memory leaks.Is it possible for IOStreams to be used concurrently, or are they only used in a single-threaded manner? -- David Hopwood <david.nospam.hopwood@blueyonder.co.uk> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, 5 Apr 2005, David Hopwood wrote:> Charles Coffing wrote: > > I''ve attached a patch for libxutil/libxc. This fixes one of the hangs I''ve seen during migrations. It applies against 2.0 and 2.0-testing. > > > > Changes: > > * Encountering EOF or error when xfrd reads from stream could cause an infinite loop. > > * Cleaned up the closing of streams. > > * Fixed several memory leaks. > > Is it possible for IOStreams to be used concurrently, or are they only > used in a single-threaded manner?doing anything to a c stream will work in a multithreaded environment; ie, the internal buffers/vars will not be stompped on. It''s in the spec(don''t ask me where, I read it in the info docs). _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mark Williamson wrote:>>doing anything to a c stream will work in a multithreaded environment; ie, >>the internal buffers/vars will not be stompped on. >> >>It''s in the spec(don''t ask me where, I read it in the info docs). > > I think the issue is with Xfrd''s IOStream type (libxutil/iostream.h), rather > than with standard C streams. > > (and I don''t know if they''re safe for multiple users, although I would expect > that they''re single thread-oriented)Well, the patch seemed to be assuming that they don''t need to be safe for multiple threads. For example, the patch tries to make multiple closes safe, but this won''t work if the closes are concurrent. I was just checking that no-one was expecting this to work. -- David Hopwood <david.nospam.hopwood@blueyonder.co.uk> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel