View Issue Details

IDProjectCategoryView StatusLast Update
0006097DarkRadiantDesign/Codingpublic13.01.2024 05:32
Reportergreebo Assigned Togreebo  
PrioritynormalSeveritynormalReproducibilityhave not tried
Status closedResolutionfixed 
Product Version3.2.0 
Target Version3.3.0Fixed in Version3.3.0 
Summary0006097: xmlutil thread safety problems
DescriptionIn an artificial heavy load scenario using hundreds of decl parser threads it became apparent that the xmlutil::Document/xml::Node class pair is not thread safe, causing crashes at random points in time.

While the xmlutil::Document locks its public API, this is not really enough since the xml::Node structure it is handing out is not using any locks to manipulate the xmlNodePtrs.

On top of that, there's no explicit test coverage of the xmlutil namespace, this is tested implicitly at best.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

DarkRadiant: master 27923433

10.09.2022 07:57

greebo


Details Diff
0006097: Start creating unit tests covering the xmlutil::Document type Affected Issues
0006097
mod - libs/xmlutil/Document.cpp Diff File
mod - test/CMakeLists.txt Diff File
add - test/XmlUtil.cpp Diff File
mod - test/algorithm/FileUtils.h Diff File
mod - tools/msvc/Tests/Tests.vcxproj Diff File
mod - tools/msvc/Tests/Tests.vcxproj.filters Diff File

DarkRadiant: master ffb76029

10.09.2022 08:53

greebo


Details Diff
0006097: Remove the dangerous copy-constructor which will trigger a crash as soon as the second copy goes out of scope. Affected Issues
0006097
mod - libs/xmlutil/Document.cpp Diff File
mod - libs/xmlutil/Document.h Diff File

DarkRadiant: master c1348a64

10.09.2022 08:54

greebo


Details Diff
0006097: xmlutil::Document unit tests Affected Issues
0006097
mod - test/XmlUtil.cpp Diff File
add - test/resources/xml/broken_file.xml Diff File
add - test/resources/xml/testfile.xml Diff File

DarkRadiant: master f8e1eaf2

10.09.2022 10:25

greebo


Details Diff
0006097: Remove public access to the private xmlNodePtr, allow friend access to xmlutil::Document Affected Issues
0006097
mod - libs/xmlutil/Document.cpp Diff File
mod - libs/xmlutil/Node.cpp Diff File
mod - libs/xmlutil/Node.h Diff File
mod - radiantcore/map/format/portable/PortableMapWriter.cpp Diff File

DarkRadiant: master b5b51c1f

10.09.2022 11:25

greebo


Details Diff
0006097: Add xmlutil::Node unit tests Affected Issues
0006097
mod - test/XmlUtil.cpp Diff File
mod - test/resources/xml/testfile.xml Diff File

DarkRadiant: master 4af30f87

10.09.2022 11:52

greebo


Details Diff
0006097: Add more xmlutil::Node unit tests Affected Issues
0006097
mod - test/XmlUtil.cpp Diff File

DarkRadiant: master 28819a3b

10.09.2022 11:54

greebo


Details Diff
0006097: Fix xmlutil::Node::addText implementation Affected Issues
0006097
mod - libs/xmlutil/Node.cpp Diff File

DarkRadiant: master 050f5e06

10.09.2022 13:56

greebo


Details Diff
0006097: Every xml::Node now holds a reference to the owning xml::Document, which exposes its mutex to its Node friends. Affected Issues
0006097
mod - libs/xmlutil/Document.cpp Diff File
mod - libs/xmlutil/Document.h Diff File
mod - libs/xmlutil/Node.cpp Diff File
mod - libs/xmlutil/Node.h Diff File
mod - radiant/eventmanager/ShortcutSaver.h Diff File
mod - radiantcore/map/format/portable/PortableMapWriter.cpp Diff File
mod - radiantcore/xmlregistry/RegistryTree.cpp Diff File
mod - radiantcore/xmlregistry/RegistryTree.h Diff File
mod - radiantcore/xmlregistry/XMLRegistry.cpp Diff File
mod - test/XmlUtil.cpp Diff File

DarkRadiant: master 24399fa2

10.09.2022 14:07

greebo


Details Diff
0006097: All xml::Document or xml::Node operations now require the mutex to be locked Affected Issues
0006097
mod - libs/xmlutil/Document.cpp Diff File
mod - libs/xmlutil/Node.cpp Diff File

Issue History

Date Modified Username Field Change
10.09.2022 06:38 greebo New Issue
10.09.2022 06:38 greebo Status new => confirmed
10.09.2022 06:39 greebo Assigned To => greebo
10.09.2022 06:39 greebo Status confirmed => assigned
11.09.2022 13:31 greebo Target Version => 3.3.0
11.09.2022 13:31 greebo Status assigned => resolved
11.09.2022 13:31 greebo Resolution open => fixed
11.09.2022 13:31 greebo Fixed in Version => 3.3.0
11.09.2022 13:43 greebo Changeset attached => DarkRadiant master 27923433
11.09.2022 13:43 greebo Changeset attached => DarkRadiant master ffb76029
11.09.2022 13:43 greebo Changeset attached => DarkRadiant master c1348a64
11.09.2022 13:43 greebo Changeset attached => DarkRadiant master f8e1eaf2
11.09.2022 13:43 greebo Changeset attached => DarkRadiant master b5b51c1f
11.09.2022 13:43 greebo Changeset attached => DarkRadiant master 4af30f87
11.09.2022 13:43 greebo Changeset attached => DarkRadiant master 28819a3b
11.09.2022 13:43 greebo Changeset attached => DarkRadiant master 050f5e06
11.09.2022 13:43 greebo Changeset attached => DarkRadiant master 24399fa2
13.01.2024 05:32 greebo Status resolved => closed