[Mono-bugs] [Bug 63093][Maj] New - race condition with code using Process class

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 15 Aug 2004 13:37:03 -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 jeroen@xs4all.nl.

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

--- shadow/63093	2004-08-15 13:37:03.000000000 -0400
+++ shadow/63093.tmp.5228	2004-08-15 13:37:03.000000000 -0400
@@ -0,0 +1,34 @@
+Bug#: 63093
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: Jeroen@xs4all.nl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: race condition with code using Process class
+
+I'm encountering a race condition in the NAnt code which checks whether
+"pkg-config --exists mono" returns true (0). Lupus already experienced the
+problem himself: on linux/ppc NAnt frequently thinks mono isn't installed,
+while it really is.
+
+I've traced this to a method in NAnt (ExternalProgramBase.ExecuteTask)
+which starts a new Process to run pkg-config and then waits until it
+finishes. Now, sometimes this works fine and NAnt builds ok, but frequently
+it fails. The return code is somehow 1 at that point.
+
+I've added debugging output to the method and i've seen during 1 NAnt run
+first multiple successes followed by a failure. So this really looks like
+some sort of race condition.
+
+Any ideas why this issue is appearing on linux/ppc? NAnt works absolutely
+fine on linux/x86. I'll attach the source file in question.