> ----- Original Message ----- > From: "Troy Laurin" <[EMAIL PROTECTED]> > To: "Gert Driesen" <[EMAIL PROTECTED]> > Cc: "Nant-Developers (E-Mail)" <[EMAIL PROTECTED]> > Sent: Thursday, July 22, 2004 7:18 AM > Subject: XmlLogger is fixed! Was RE: [nant-dev] XmlLogger is broken? >
> Responding to myself, because it looks like our mail server decided not > to deliver this last message (grr) > > Comments below. > > > -----Original Message----- > > From: Troy Laurin > > Sent: Wednesday, 21 July 2004 5:26 PM > > To: Gert Driesen > > Cc: Nant-Developers (E-Mail) > > Subject: RE: [nant-dev] XmlLogger is broken? > > > > > > I'll see if I can reproduce this later today ... > > > > > > > > Gert > > > > > > In fact, every time the build has hung has been during an > > 'exec' task. > > > Although there doesn't seem to be anything wrong with the task (by) > > > itself... the build process completes perfectly if the xml > > logger is > > > removed as a listener. > > > > Success! > > > > Repro and log attached. Pardon the absolutely horrible build file :-) > > > > Running the build will require changing the arguments to cvs > > to something that will actually work (I would have referenced > > a public cvs repository, but our proxy would have blocked > > testing it on my machine (grr)) > > > > > Interestingly, with this repro, neither the hang point nor > > the xml exception are consistent. In multiple runs, the > > build never hung before the exception, although both the time > > and 'distance' between the exception and hang was variable. > > > > I would guess that the exception is caused by exec's output > > and error streams emitting strings at essentially the same time: > > error stream... cvs export: Updating C:/temp/foo/Gif2Png > > output stream... U C:/temp/foo/Gif2Png/gif2png.lib > > > > Putting a synchronization lock in XmlLogger should prevent > > the exception, which may in turn prevent the hang... > > Unfortunately no time to try this today, but I'll try first > > thing tomorrow. > > I guess the question remains: Is this the appropriate fix? > > The exec task probably shouldn't be logging on two threads at > > once, but the XmlLogger probably shouldn't fail in this case anyway. > > > > > > Oop, network's going down in 2 mins :-) > > > > -T > Adding synchronization to XmlLogger does indeed fix the problem! > Context diff attached. Thanks !! Fix committed to cvs. > > In ExternalProgramBase.cs, there are comments in the two threaded > methods to the tune of "Ensure only one thread writes to the log at any > time", but the synchronization is then performed on the _reading_ > stream. That is, each thread is synchronizing on a different object. > Should this be changed, so both threads are locking on OutputWriter, > rather than its own input stream? Yeps indeed, this is now also fixed in cvs. Again, thanks for tracking this bug down ! Gert ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
