View Issue Details

IDProjectCategoryView StatusLast Update
0023260Open CASCADEOCCT:Meshpublic2012-11-16 13:18
ReportervtnAssigned Todbv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformLinux, Windows 
Product Version6.5.4 
Target Version6.5.4Fixed in Version6.5.4 
Summary0023260: Regression: Instability in parallel incmesh on Linux.
DescriptionTest cases mesh standard_incmesh_parallel K2 R3 detect problem in parallel incmesh command on Linux.

An exception was caught 0xb62cd10f : Standard_NullObject: Attempt to access to null object
TagsNo tags attached.
Test case numberNot needed

Relationships

has duplicate 0023221 closedabv Sometimes incmesh command with parallel parameter raise an execption or produce different results on Linux. 
child of 0022850 closeddbv Not stable fix 22735 

Activities

vtn

2012-07-11 15:49

developer   ~0020910

Looks like a regression of 0022850 issue.

vtn

2012-07-11 15:50

developer   ~0020911

Reproduced in CR23087_CR23210_master GIT repository.

vtn

2012-07-12 18:26

developer   ~0020937

The end file of mesh grid is updated in GIT. It will be necessary to delete TODO bloc for this problem after integration of fix.

dbv

2012-07-16 12:48

developer   ~0020982

Added protection to the function which may have data race (according to the valgrind report).

Fix pushed to the branch CR23260

Dear Andrey,
Please review.

dbv

2012-07-16 14:43

developer   ~0020987

Added protection for the BRep_Tool::PolygonOnTriangulation and BRep_Tool::UVPoints inside BRepMesh_FastDiscretFace::RestoreStructureFromTriangulation

Dear Andrey,
Please review

abv

2012-07-16 15:11

manager   ~0020988

I have changed slightly the order of operators so as to lock mutex only once; no other remarks. Please test

vtn

2012-07-17 11:44

developer   ~0021003

The problem still exists in CR23273 heritable from CR23260.

dbv

2012-07-17 12:14

developer   ~0021004

Problem was that the Standard_Mutex::SentryNested were created as temporary objects. So they did not have any effect.

Fix has been pushed to the branch CR23260

Dear Andrey,
Please review.

abv

2012-07-17 12:42

manager   ~0021005

No remarks, please test

abv

2012-07-17 15:59

manager   ~0021010

We recognized that the fix does not work; the possible reason is that map of edges uses TopTools_ShapeMapHasher which accounts for the edge location, thus edges with different locations are considered different and do not get protected from the data race. The fix to be tried is to change the map to use the edge's TShape (which is Handle) instead of the whole Edge.

dbv

2012-07-17 18:15

developer   ~0021022

Map inside TopTools_MutexForShapeProvider now stores Handle_TopoDS_TShape as a key instead of TopoDS_Shape.

Changes have been pushed to the git.

Dear Andrey,
Please review.

abv

2012-07-17 19:24

manager   ~0021024

No remarks, please test

vtn

2012-07-18 12:36

developer   ~0021041

Test cases mesh standard_incmesh_parallel R3 hangs up or performance is decreased (killed by cpulimit 1000).
Platforms are:
Debian40, Mandriva2008, SL51-64.

vtn

2012-07-18 15:13

developer   ~0021050

It is looks like a performance problem of stations. The incmesh is called 1000 times in circle for R3 case. The time for one incmesh call is about 1 second. cpulimit is set to 1000. It means the case may be killed by cputime if station has old processor.

I think the issue may be closed.

dbv

2012-07-18 15:36

developer   ~0021051

I tested the branch with a valgrind (helgrind tool was used). And now it doesn't report about any problems in occt code.

So I also think that the problem is finally fixed.

apn

2012-07-19 12:00

administrator   ~0021061

Dear BugMaster,
The workbenches
KAS:dev:mkv-23260-occt (GIT branch CR23260)
KAS:dev:mkv-23260-products (GIT master)
were compiled on Linux platform and tested.

Regression:
Not detected

Improvements:
Not detected

Testing case:
Not needed

See results in /QADisk/occttests/results/KAS/dev/mkv-23260-products_18072012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120706-opt_06072012/lin
See test cases in /QADisk/occttests/tests/ED

Related Changesets

occt: master f67d0512

2012-07-20 13:18:29

dbv

Details Diff
0023260: Regression: Instability in parallel incmesh on Linux.

Added protection to the function which may have data race (according to the valgrind report).
Added protection to the BRepMesh_FastDiscretFace::RestoreStructureFromTriangulation function
Slight reordering to optimize use of mutex (lock once)
Now Standard_Mutex::SentryNested are created as named object.
Map inside TopTools_MutexForShapeProvider now store Handle_TopoDS_TShape as a key instead of TopoDS_Shape
Affected Issues
0023260
mod - src/BRepMesh/BRepMesh_FastDiscretFace.cdl Diff File
mod - src/BRepMesh/BRepMesh_FastDiscretFace.cxx Diff File
mod - src/TopTools/TopTools_MutexForShapeProvider.cxx Diff File
mod - src/TopTools/TopTools_MutexForShapeProvider.hxx Diff File

Issue History

Date Modified Username Field Change
2012-07-11 15:49 vtn New Issue
2012-07-11 15:49 vtn Assigned To => dbv
2012-07-11 15:49 vtn Note Added: 0020910
2012-07-11 15:49 vtn Status new => assigned
2012-07-11 15:50 vtn Note Added: 0020911
2012-07-12 18:26 vtn Note Added: 0020937
2012-07-13 11:55 dbv Reproducibility always => random
2012-07-13 16:27 dbv Relationship added related to 0023221
2012-07-16 12:48 dbv Note Added: 0020982
2012-07-16 12:48 dbv Assigned To dbv => abv
2012-07-16 12:48 dbv Status assigned => resolved
2012-07-16 14:43 dbv Note Added: 0020987
2012-07-16 15:11 abv Note Added: 0020988
2012-07-16 15:11 abv Assigned To abv => bugmaster
2012-07-16 15:11 abv Status resolved => reviewed
2012-07-16 18:42 mkv Assigned To bugmaster => mkv
2012-07-17 11:44 vtn Note Added: 0021003
2012-07-17 11:44 vtn Assigned To mkv => dbv
2012-07-17 11:44 vtn Status reviewed => assigned
2012-07-17 11:49 dbv Platform Linux => Linux, Windows
2012-07-17 12:14 dbv Note Added: 0021004
2012-07-17 12:14 dbv Assigned To dbv => abv
2012-07-17 12:14 dbv Status assigned => resolved
2012-07-17 12:24 dbv Relationship deleted related to 0023221
2012-07-17 12:25 dbv Relationship added has duplicate 0023221
2012-07-17 12:42 abv Note Added: 0021005
2012-07-17 12:42 abv Status resolved => reviewed
2012-07-17 13:42 mkv Assigned To abv => mkv
2012-07-17 15:59 abv Note Added: 0021010
2012-07-17 15:59 abv Assigned To mkv => dbv
2012-07-17 15:59 abv Status reviewed => assigned
2012-07-17 18:15 dbv Note Added: 0021022
2012-07-17 18:15 dbv Assigned To dbv => abv
2012-07-17 18:15 dbv Status assigned => resolved
2012-07-17 19:24 abv Note Added: 0021024
2012-07-17 19:24 abv Assigned To abv => bugmaster
2012-07-17 19:24 abv Status resolved => reviewed
2012-07-18 12:36 vtn Note Added: 0021041
2012-07-18 12:36 vtn Assigned To bugmaster => dbv
2012-07-18 12:36 vtn Status reviewed => assigned
2012-07-18 15:13 vtn Note Added: 0021050
2012-07-18 15:13 vtn Status assigned => resolved
2012-07-18 15:22 abv Status resolved => reviewed
2012-07-18 15:36 dbv Note Added: 0021051
2012-07-18 16:22 mkv Assigned To dbv => mkv
2012-07-19 11:12 mkv Assigned To mkv => apn
2012-07-19 12:00 apn Note Added: 0021061
2012-07-19 12:02 apn Test case number => Not needed
2012-07-19 12:02 apn Assigned To apn => bugmaster
2012-07-19 12:02 apn Status reviewed => tested
2012-07-23 12:20 dbv Changeset attached => occt master f67d0512
2012-07-23 12:20 dbv Assigned To bugmaster => dbv
2012-07-23 12:20 dbv Status tested => verified
2012-07-23 12:20 dbv Resolution open => fixed
2012-07-23 13:01 abv Relationship added child of 0022850
2012-11-09 09:52 abv Category OCCT:Modeling Algorithms => OCCT:Mesh
2012-11-16 13:13 bugmaster Fixed in Version => 6.5.4
2012-11-16 13:18 bugmaster Status verified => closed