[jira] [Commented] (XERCESC-2153) Tests can fail on Windows when run in parallel
[ https://issues.apache.org/jira/browse/XERCESC-2153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16963562#comment-16963562 ] martin goodall commented on XERCESC-2153: - I found a bug in win32transservice.cpp. the variables used in calls to (::Reg.) to get registry items are too small, causing memory to get overwritten. This caused random behavior on my system when running in parallel as it ended up overwriting a few bytes of the hashed memory allocations. The problem is hard to reproduce predictably as it only overwrites a few bytes and it was overwriting pointers in the hash tables. > Tests can fail on Windows when run in parallel > -- > > Key: XERCESC-2153 > URL: https://issues.apache.org/jira/browse/XERCESC-2153 > Project: Xerces-C++ > Issue Type: Wish > Components: Samples/Tests >Affects Versions: 3.2.1 > Environment: Windows 10 x64 with VS2017 x64 build of Xerces-C++ 3.2.2 > prerelease. >Reporter: Roger Leigh >Assignee: Roger Leigh >Priority: Minor > Labels: test-fail, windows > Fix For: 3.2.2 > > > Tests always pass when run serially, so I don't see this as a blocker for > 3.2.2 unless it's indicative of a very long-standing problem internally in > Xerces rather than that the tests were not originally written with parallel > execution in mind. > When running "ctest -jn" to run tests in parallel, tests can randomly fail. > Looks like an interaction between tests when run at the same time. Some > resource contention? > The following is a reduced testcase, where I've found two tests which > interact badly (there may be others). Both are using personal.xml as input. > {{D:\xerces-c-3.2.2\b>ctest -C Release -j 4 -R "DOMPrint3|StdInParse2"}} > {{Test project D:/xerces-c-3.2.2/b}} > {{ Start 66: DOMPrint3}} > {{ Start 70: StdInParse2}} > {{1/2 Test #66: DOMPrint3 ***Failed 0.07 sec}} > {{2/2 Test #70: StdInParse2 .. Passed 0.08 sec}}{{50% > tests passed, 1 tests failed out of 2}}{{Total Test time (real) = 0.11 > sec}}{{The following tests FAILED:}} > {{ 66 - DOMPrint3 (Failed)}} > {{Errors while running CTest}} > I can't reproduce on Linux, so it may well be Windows-specific due to file > locking preventing multiple readers of a file? Is it due to one process > having it held open on stdin while the other tries to open it. Running > multiple StdInParse[123] tests or multiple DOMPrint[123] tests does not > result in failure. But when the two are combined, it's always DOMPrint that > fails; is it the open mode being used? -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org
[jira] [Commented] (XERCESC-2153) Tests can fail on Windows when run in parallel
[ https://issues.apache.org/jira/browse/XERCESC-2153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16610530#comment-16610530 ] Roger Leigh commented on XERCESC-2153: -- Putting some debug messages in WindowsFileMgr::fileOpen (called from BinFileInputStream from LocalFileInputSource), shows that the HRESULT is 0x80070020 (sharing violation) which meets the hypothesis above. The input file on stdin must be opened without FILE_SHARE_WRITE. This isn't a bug in Xerces-C++, it's due to the way the CMake execute_process function sets up pipes for STDIN with read and write access. I have created a ticket for that here which contains more details: https://gitlab.kitware.com/cmake/cmake/issues/18359 > Tests can fail on Windows when run in parallel > -- > > Key: XERCESC-2153 > URL: https://issues.apache.org/jira/browse/XERCESC-2153 > Project: Xerces-C++ > Issue Type: Improvement > Components: Samples/Tests >Affects Versions: 3.2.1 > Environment: Windows 10 x64 with VS2017 x64 build of Xerces-C++ 3.2.2 > prerelease. >Reporter: Roger Leigh >Assignee: Roger Leigh >Priority: Minor > Labels: test-fail, windows > > Tests always pass when run serially, so I don't see this as a blocker for > 3.2.2 unless it's indicative of a very long-standing problem internally in > Xerces rather than that the tests were not originally written with parallel > execution in mind. > When running "ctest -jn" to run tests in parallel, tests can randomly fail. > Looks like an interaction between tests when run at the same time. Some > resource contention? > The following is a reduced testcase, where I've found two tests which > interact badly (there may be others). Both are using personal.xml as input. > {{D:\xerces-c-3.2.2\b>ctest -C Release -j 4 -R "DOMPrint3|StdInParse2"}} > {{Test project D:/xerces-c-3.2.2/b}} > {{ Start 66: DOMPrint3}} > {{ Start 70: StdInParse2}} > {{1/2 Test #66: DOMPrint3 ***Failed 0.07 sec}} > {{2/2 Test #70: StdInParse2 .. Passed 0.08 sec}}{{50% > tests passed, 1 tests failed out of 2}}{{Total Test time (real) = 0.11 > sec}}{{The following tests FAILED:}} > {{ 66 - DOMPrint3 (Failed)}} > {{Errors while running CTest}} > I can't reproduce on Linux, so it may well be Windows-specific due to file > locking preventing multiple readers of a file? Is it due to one process > having it held open on stdin while the other tries to open it. Running > multiple StdInParse[123] tests or multiple DOMPrint[123] tests does not > result in failure. But when the two are combined, it's always DOMPrint that > fails; is it the open mode being used? -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org