Mail Archive Home | carol List | December 2004 Index
| <-- Date Index --> | <-- Thread Index --> |
I ran into a problem with unit tests in CAROL and was about to submit a new bug report, when I noticed that this problem had been already reported about two years ago. So, I just posted a comment on the old ticket: http://forge.objectweb.org/tracker/index.php?func=detail&aid=100160&group_id=26&atid=100026 Unfortunately, the line wrapping is all messed up and I couldn't figure out a way to upload the patch as a separate file. I'm attaching the bug report and the patch to this message. Thanks, Vadim
The attached patch seems to fix a non-deterministic build failure.
The build failure (included at the bottom of this file) occurs within
the "launch.test.double" target in
carol/test/conform/generic/carol_double.xml.
This target launches a number of process simultaneously within the
<parallel> task. One of these processes does this:'
<sequential>
<sleep seconds="10"/>
<delete dir="${report.dir}" />
<mkdir dir="${report.dir}" />
<mkdir dir="${report.dir}/html" />
... the rest omitted for brevity ...
</sequential>
Another process does this:
<sequential>
<sleep seconds="10"/>
<mkdir dir="${report.dir}" />
<mkdir dir="${report.dir}/html" />
<junit printsummary="yes"
... snipped for brevity ...
</sequential>
Clearly, this is a race condition. Consider the following sequence of
events:
1. Process #2 creates ${report.dir}.
2. Process #2 attempts to create ${report.dir}/html. This involves
creating all non-existent parent directories. In this
particular, case the parent directory exists. So, process #2
obtains a file handle for the parent directory in preparation
for creating the requested subdirectory.
3. Process #1 deletes ${report.dir}.
4. Process #2 is now holding an invalid file handle for a directory
that no longer exists. It attempts to create the html/
subdirectory and fails.
As far as I can tell, the <delete> task is unnecessary.
Vadim
P.S. Here's the build failure:
==============================================================================
launch.test.double:
[java] ManageableRegistry started on port 1099
[java] Initial Naming Context:
[java]
IOR:000000000000002b49444c3a6f6d672e6f72672f436f734e616d696e672f4e616d696e67436f6e746578744578743a312e30000000000001000000000000007c000102000000000a3132372e302e302e310007d000000035afabcb0000000020e2e2004c0000000100000000000000010000000d544e616d65536572766963650000000000000004000000000a0000000000000100000001000000200000000000010001000000020501000100010020000101090000000100010100
[java] TransientNameServer: setting port for initial object references
to: 2000
[java] Ready.
[mkdir] Created dir:
/var/vadim/scratch/ow/carol/output/dist/test/results/multi_suniiop_sunjrmp1.2
[mkdir] Created dir:
/var/vadim/scratch/ow/carol/output/dist/test/results/multi_suniiop_sunjrmp1.2/html
[junit] Running
org.objectweb.carol.jtests.conform.basic.clients.MultiProtocolTests
[junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.726 sec
[java] Timeout: killed the sub-process
[java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:749)
[java] at
org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:170)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:83)
[java] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at
org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
[java] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at
org.apache.tools.ant.taskdefs.Parallel$TaskRunnable.run(Parallel.java:417)
[java] at java.lang.Thread.run(Thread.java:534)
[java] Timeout: killed the sub-process
[java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:749)
[java] at
org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:170)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:83)
[java] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at
org.apache.tools.ant.taskdefs.Parallel$TaskRunnable.run(Parallel.java:417)
[java] at java.lang.Thread.run(Thread.java:534)
[java] Timeout: killed the sub-process
[java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:749)
[java] at
org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:170)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:83)
[java] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at
org.apache.tools.ant.taskdefs.Parallel$TaskRunnable.run(Parallel.java:417)
[java] at java.lang.Thread.run(Thread.java:534)
BUILD FAILED
/var/vadim/scratch/ow/carol/build.xml:225: The following error occurred while
executing this line:
/var/vadim/scratch/ow/carol/test/build.xml:183: The following error occurred
while executing this line:
/var/vadim/scratch/ow/carol/test/conform/carol_all_tests.xml:8: The following
error occurred while executing this line:
/var/vadim/scratch/ow/carol/test/conform/carol_all_tests.xml:32: The
following error occurred while executing this line:
/var/vadim/scratch/ow/carol/test/conform/carol_all_tests.xml:184: The
following error occurred while executing this line:
/var/vadim/scratch/ow/carol/test/conform/generic/carol_double.xml:111: The
following error occurred while executing this line:
/var/vadim/scratch/ow/carol/test/conform/generic/carol_double.xml:190:
Directory
/var/vadim/scratch/ow/carol/output/dist/test/results/multi_suniiop_sunjrmp1.2/html
creation was not successful for an unknown reason
Total time: 5 minutes 53 seconds
Index: test/conform/generic/carol_double.xml
===================================================================
RCS file: /cvsroot/carol/carol/test/conform/generic/carol_double.xml,v
retrieving revision 1.11
diff -u -r1.11 carol_double.xml
--- test/conform/generic/carol_double.xml 9 Feb 2004 11:00:24 -0000 1.11
+++ test/conform/generic/carol_double.xml 17 Dec 2004 22:17:53 -0000
@@ -167,7 +167,6 @@
<sequential>
<sleep seconds="10"/>
- <delete dir="${report.dir}" />
<mkdir dir="${report.dir}" />
<mkdir dir="${report.dir}/html" />
<junit printsummary="yes"
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.