[ http://issues.apache.org/jira/browse/XALANJ-2083?page=history ]

Rony Zoghby updated XALANJ-2083:
--------------------------------

    Attachment: XalanXercesTest.zip

Hi,

Please find attached the standalone test case that reproduces the problem.  The 
attached XalanXercesTest.zip contains the following files for the test:

test.jar: contains the test code which is also attached in the 
zip.(ExecuteParallelFormulaeTest.java)  We have simplified our executions down 
to the bare minimum of javax functions. 
com.jar: to build the unique input xml files so that each thread is executing 
on an xml with unique PCDATA at every node.  
input.xml: the base xml file that is the reference for building the unique 
input xml files
conv.xsl: the xsl formula being executed

We have tested with Xerces 2.6.2 and Xalan 2.6.0 as well as the previous 
version we mentioned(2.5) and also an earlier 2.0 version and all have 
reproduced the problem.

To run test case where number of xsl transformations per thread is 50 and 
number of threads is 50 execute the following command (all execution results 
are dumped to disk):

/usr/local/j2sdk1.4.2_04/bin/java -Xms256M -Xmx512M 
-Xbootclasspath/p:xerces.jar:xalan.jar -cp 
test.jar:xerces.jar:xalan.jar:com.jar test/ExecuteParallelFormulaeTest 
/MXJ_NUMBER_OF_TRIES:50 /MXJ_NUMBER_OF_THREADS:50 /MXJ_FORMULA:conv.xsl 
/MXJ_INPUT_FILE:input.xml /MXJ_OUTPUT_FILE:New_Xml

To run test verification:

/usr/local/j2sdk1.4.2_04/bin/java -Xms256M -Xmx512M -cp test.jar 
test/ParallelTestVerification /MXJ_NUMBER_OF_TRIES:50 /MXJ_NUMBER_OF_THREADS:50 
/MXJ_OUTPUT_FILE:New_Xml

Example of result of screen printout from verification:

*********************************
NOT EQUAL: File1:New_Xml_28_42.xml File2:New_Xml_28_43.xml
*********************************

*********************************
NOT EQUAL: File1:New_Xml_28_43.xml File2:New_Xml_28_44.xml
*********************************

 - meaning that execution number 43 in thread number 28 is not equal to the 
other executions in this thread.  When you diff the files you see that the node 
action has a value 182405 in 'New_Xml_28_43.xml' whereas, in all the other 
executions it has a value 164753.  When you search in the other results from 
other executions you find that the value 182405 belongs to the results from 
thread 31.  If you check the printout from the test execution you see that 
28_43 executed at the same time as 31_44 so the result came from thread 31 
meaning that we are obtaining random results from parallel executions of 
seperate xsl executions on different xml files.

Transforming Node: ThreadNumber:28 TryNumber:43 OutputFile:New_Xml_28_43.xml
Transforming Node: ThreadNumber:31 TryNumber:44 OutputFile:New_Xml_31_44.xml

Hope this is clear,

Rony

P.S: Can you please remove the zip attachment after downloading it as it has 
some proprietary aspects?

(Visible to jira-users)


> Data corrupted in Parallel XSL execution
> ----------------------------------------
>
>          Key: XALANJ-2083
>          URL: http://issues.apache.org/jira/browse/XALANJ-2083
>      Project: XalanJ2
>         Type: Bug
>     Versions: 2.5
>  Environment: Solaris 8, JDK1.4.2_05 - Xalan with Xerces 2.5.0 and xercesImpl 
> Xerces-J_2_0_1_01
>     Reporter: Rony Zoghby
>     Priority: Critical
>  Attachments: XalanXercesTest.zip
>
> Hi,
> We're executing the same stylesheet on different XML documents at the same 
> time (multiple concurrent threads). Randomly, the result of the execution of 
> one thread is the result of the execution of another:
> Example:
> XML INPUT1: <Date>17/01/1976</Date>
> XML INPUT2: <Date>20/04/2004</Date>
> The results of the XSL that extracts the date are:
> RESULT 1: 20/04/2004 (the result of the second execution)
> RESULT 2: 20/04/2004
> Is this issue related to Bug ID 19434? It seems like if it is the same.
> If not, is there a fix for this?
> Regards,
> Rony.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to