MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023920Community[OCCT] OCCT:Foundation Classespublic2013-04-21 09:252015-09-05 16:34
ReporterRoman Lygin 
Assigned ToRoman Lygin 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformAOSLOS VersionL
Product Version[OCCT] 6.6.0 
Target Version[OCCT] 6.7.0Fixed in Version[OCCT] 6.7.0 
Summary0023920: Change use of static variables in Message package to prevent data races in Shape Healing
DescriptionMessage_MsgFile.cxx uses static variables to create messages for undefined keywords. When running Shape Healing concurrently this leads to data races when the message files have not been loaded upfront (e.g. due to failure to set environment variables CSF_SHMessage in end-user environment).

To minimize risk of data races when running Shape Healing concurrently, the fix suggests setting the static variables for error messages only once. This gives a possibility to enforce calling the method Message_MsgFile::Msg() upfront to initialize these variables and only read-access them afterwards.
Steps To Reproduce1. Do not set CSF_SHMessage env var upfront
2. Invoke concurrently Shape Healing on any shape that generates messages (see ShapeFix_*.cxx)
3. Check for data races (e.g. using Intel Inspector XE)
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
has duplicate 0022546closedjgv Community Improving thread-safety 
related to 0025057closedbugmaster Open CASCADE Message_Algorithm fails to find messages defined for base class 

-  Notes
(0024230)
Roman Lygin (developer)
2013-04-21 09:30

Fix pushed into git repository
(0024235)
abv (manager)
2013-04-22 08:51

No remarks, please test
(0024293)
mkv (tester)
2013-04-26 16:43

Dear BugMaster,

Branch CR23920 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 24c0eb5c4e637a99852fbc0013717464dd486a61

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 11 (11 on master)

products component :
Linux: 0 (0 on master)
Windows: 64 (64 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 366251492 / 366591592
Total CPU difference: 42577.76000000097 / 54394.90000000041

Testing on Windows:
Total MEMORY difference: 419777708 / 419806404
Total CPU difference: 30655.59375 / 34616.171875

There are not serious differences in images found by testdiff.

- Related Changesets
occt: master fa523cdd
Timestamp: 2013-04-21 05:28:54
Author: Roman Lygin
Details ] Diff ]
0023920: Change use of static variables in Message package to prevent data races in Shape Healing
mod - src/Message/Message_MsgFile.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2013-04-21 09:25 Roman Lygin New Issue
2013-04-21 09:25 Roman Lygin Assigned To => abv
2013-04-21 09:30 Roman Lygin Note Added: 0024230
2013-04-21 09:30 Roman Lygin Status new => resolved
2013-04-22 08:51 abv Note Added: 0024235
2013-04-22 08:51 abv Assigned To abv => bugmaster
2013-04-22 08:51 abv Status resolved => reviewed
2013-04-26 16:43 mkv Note Added: 0024293
2013-04-26 16:43 mkv Test case number => Not needed
2013-04-26 16:43 mkv Status reviewed => tested
2013-05-20 10:56 Roman Lygin Changeset attached => occt master fa523cdd
2013-05-20 10:56 Roman Lygin Assigned To bugmaster => Roman Lygin
2013-05-20 10:56 Roman Lygin Status tested => verified
2013-05-20 10:56 Roman Lygin Resolution open => fixed
2013-05-20 16:50 bugmaster Target Version => 6.7.0
2013-12-19 13:53 bugmaster Status verified => closed
2013-12-19 13:55 bugmaster Fixed in Version => 6.7.0
2014-07-08 15:46 abv Relationship added related to 0025057
2015-09-05 16:34 abv Relationship added has duplicate 0022546


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker