MantisBT - Community
View Issue Details
0026701Community[OCCT] OCCT:Modeling Algorithmspublic2015-09-17 12:312015-10-23 20:49
Vico Liang 
kgv 
normalcrash 
closedfixed 
WindowsVC++ 201364 bit
[OCCT] 6.9.0 
[OCCT] 6.9.1[OCCT] 6.9.1 
bugs modalg_6 bug26701
0026701: BOPAlgo_Builder::Perform crash.
The stackframe as following:

     MSVCR120D.dll!000007fedbcb0365() Unknown
     MSVCR120D.dll!000007fedbcb0196() Unknown
     MSVCR120D.dll!000007fedbcb1e68() Unknown
     TKernel.dll!Standard_MMgrRaw::Free(void * theStorage) Line 56 C++
     TKernel.dll!Standard::Free(void * const theStorage) Line 235 C++
     [External Code]
     TKBRep.dll!BRep_ListOfCurveRepresentation::Remove(BRep_ListIteratorOfListOfCurveRepresentation & It) Line 257 C++
> TKBRep.dll!UpdateCurves(BRep_ListOfCurveRepresentation & lcr, const Handle_Geom2d_Curve & C, const Handle_Geom_Surface & S, const TopLoc_Location & L) Line 135 C++
     TKBRep.dll!BRep_Builder::UpdateEdge(const TopoDS_Edge & E, const Handle_Geom2d_Curve & C, const Handle_Geom_Surface & S, const TopLoc_Location & L, const double Tol) Line 632 C++
     TKBO.dll!BOPTools_AlgoTools2D::BuildPCurveForEdgeOnPlane(const TopoDS_Edge & aE, const TopoDS_Face & aF) Line 504 C++
     TKBO.dll!tbb::internal::parallel_for_body<BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> >,int>::operator()(const tbb::blocked_range<int> & r) Line 163 C++
     TKBO.dll!tbb::interface7::internal::partition_type_base<tbb::interface7::internal::auto_partition_type>::execute<tbb::interface7::internal::start_for<tbb::blocked_range<int>,tbb::internal::parallel_for_body<BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> >,int>,tbb::auto_partitioner const >,tbb::blocked_range<int> >(tbb::interface7::internal::start_for<tbb::blocked_range<int>,tbb::internal::parallel_for_body<BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> >,int>,tbb::auto_partitioner const > & start, tbb::blocked_range<int> & range) Line 265 C++
     TKBO.dll!tbb::interface7::internal::start_for<tbb::blocked_range<int>,tbb::internal::parallel_for_body<BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> >,int>,tbb::auto_partitioner const >::execute() Line 128 C++
     tbb_debug.dll!tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all(tbb::task & parent, tbb::task * child) Line 463 C++
     tbb_debug.dll!tbb::internal::generic_scheduler::local_spawn_root_and_wait(tbb::task & first, tbb::task * & next) Line 649 C++
     tbb_debug.dll!tbb::internal::generic_scheduler::spawn_root_and_wait(tbb::task & first, tbb::task * & next) Line 658 C++
     TKBO.dll!tbb::task::spawn_root_and_wait(tbb::task & root) Line 734 C++
     TKBO.dll!tbb::interface7::internal::start_for<tbb::blocked_range<int>,tbb::internal::parallel_for_body<BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> >,int>,tbb::auto_partitioner const >::run(const tbb::blocked_range<int> & range, const tbb::internal::parallel_for_body<BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> >,int> & body, const tbb::auto_partitioner & partitioner) Line 90 C++
     TKBO.dll!tbb::parallel_for<tbb::blocked_range<int>,tbb::internal::parallel_for_body<BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> >,int> >(const tbb::blocked_range<int> & range, const tbb::internal::parallel_for_body<BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> >,int> & body, const tbb::auto_partitioner & partitioner) Line 201 C++
     TKBO.dll!tbb::strict_ppl::parallel_for_impl<int,BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> >,tbb::auto_partitioner const >(int first, int last, int step, const BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> > & f, const tbb::auto_partitioner & partitioner) Line 256 C++
     TKBO.dll!tbb::strict_ppl::parallel_for<int,BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> > >(int first, int last, const BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> > & f) Line 283 C++
     TKBO.dll!OSD_Parallel::For<BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> > >(const int theBegin, const int theEnd, const BOPCol_Functor<BOPAlgo_BPC,BOPCol_NCVector<BOPAlgo_BPC> > & theFunctor, const unsigned int isForceSingleThreadExecution) Line 270 C++
     TKBO.dll!BOPAlgo_PaveFiller::Prepare() Line 758 C++
     TKBO.dll!BOPAlgo_PaveFiller::PerformInternal() Line 225 C++
     TKBO.dll!BOPAlgo_PaveFiller::Perform() Line 202 C++
     TKBO.dll!BOPAlgo_Builder::Perform() Line 281 C++

brestore crash_tbb.brep d
brunparallel 1
bclearobjects
eval baddobjects [explode d]
bfillds
bbuild result
No tags attached.
? Crash_TBB.brep (90,980) 2015-09-18 11:08
https://tracker.dev.opencascade.org/
Issue History
2015-09-17 12:31Vico LiangNew Issue
2015-09-17 12:31Vico LiangAssigned To => msv
2015-09-17 12:34Vico LiangNote Added: 0045767
2015-09-17 16:09msvNote Added: 0045812
2015-09-17 16:09msvAssigned Tomsv => Vico Liang
2015-09-17 16:09msvStatusnew => feedback
2015-09-18 05:36Vico LiangNote Added: 0045844
2015-09-18 05:39Vico LiangAssigned ToVico Liang => msv
2015-09-18 05:39Vico LiangStatusfeedback => acknowledged
2015-09-18 10:38msvNote Added: 0045852
2015-09-18 10:38msvAssigned Tomsv => Vico Liang
2015-09-18 10:38msvStatusacknowledged => feedback
2015-09-18 11:08Vico LiangFile Added: Crash_TBB.brep
2015-09-18 11:13Vico LiangNote Added: 0045860
2015-09-18 11:14Vico LiangAssigned ToVico Liang => msv
2015-09-18 11:14Vico LiangStatusfeedback => acknowledged
2015-09-18 11:47msvAssigned Tomsv => Vico Liang
2015-09-18 11:48msvNote Added: 0045868
2015-09-18 11:48msvAssigned ToVico Liang => msv
2015-09-18 11:48msvStatusacknowledged => assigned
2015-09-18 11:51msvAssigned Tomsv => isn
2015-09-18 11:52msvNote Added: 0045869
2015-09-21 21:58gitNote Added: 0045963
2015-09-21 22:07isnNote Added: 0045964
2015-09-21 22:07isnAssigned Toisn => msv
2015-09-21 22:07isnStatusassigned => resolved
2015-09-21 22:07isnSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11673#r11673
2015-09-22 07:14abvNote Added: 0045965
2015-09-22 07:17abvNote Added: 0045966
2015-09-22 09:10msvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11674#r11674
2015-09-22 09:14gitNote Added: 0045969
2015-09-22 09:15msvNote Added: 0045970
2015-09-22 09:15msvAssigned Tomsv => bugmaster
2015-09-22 09:15msvStatusresolved => reviewed
2015-09-22 09:15msvAdditional Information Updatedbug_revision_view_page.php?rev_id=11676#r11676
2015-09-22 10:35gitNote Added: 0045973
2015-09-22 11:49mkvAssigned Tobugmaster => mkv
2015-09-22 12:24gitNote Added: 0045990
2015-09-23 14:32mkvNote Added: 0046041
2015-09-23 14:32gitNote Added: 0046042
2015-09-23 14:32mkvNote Added: 0046043
2015-09-23 14:32mkvAssigned Tomkv => msv
2015-09-23 14:32mkvStatusreviewed => feedback
2015-09-23 14:33mkvTest case number => bugs modalg_6 bug26701
2015-09-23 14:40msvNote Added: 0046045
2015-09-23 14:40msvAssigned Tomsv => mkv
2015-09-23 14:40msvStatusfeedback => assigned
2015-09-23 16:15gitNote Added: 0046053
2015-09-23 16:17mkvNote Added: 0046054
2015-09-23 16:17mkvNote Added: 0046055
2015-09-23 16:17mkvStatusassigned => feedback
2015-09-23 16:17mkvAssigned Tomkv => bugmaster
2015-09-23 16:17mkvStatusfeedback => tested
2015-09-28 12:58kgvChangeset attached => occt master 2078dfc7
2015-09-28 12:58kgvAssigned Tobugmaster => kgv
2015-09-28 12:58kgvStatustested => verified
2015-09-28 12:58kgvResolutionopen => fixed
2015-10-16 14:55aivStatusverified => closed
2015-10-16 16:38gitNote Added: 0047024
2015-10-23 20:49aivFixed in Version => 6.9.1

Notes
(0045767)
Vico Liang   
2015-09-17 12:34   
The additional crash is using TBB allocator, but the crash stack frame is similar.
(0045812)
msv   
2015-09-17 16:09   
Dear Vico, please attach input data and script to reproduce the problem.
(0045844)
Vico Liang   
2015-09-18 05:36   
Dear msv,

It seems a data race in parallel comutation. I'm preparing the data, but the issue can't be reprodueced steadily. Would you analysis from the crash stack frame? I'm afraid it's not easy to provide you data to reproduce the problem.
(0045852)
msv   
2015-09-18 10:38   
Dear Vico, the probability of finding the cause of problem by analysis of stack frame in the case of such problem is very low, because the source code that contains an error (the source of problem) can be out of current stack frame.
Therefore it is crucial to have the input data that leads to the problem, even if it is not stably reproduced. We can use the automatic checking tools like valgrind or Intel Inspector in order to catch such a bug.
(0045860)
Vico Liang   
2015-09-18 11:13   
Dear msv,

I have uploaded file Crash_TBB.brep, the model is a compound.

To reproduce the issue, please get all the subshapes in the compound and then do a general fuse operation.

        TopTools_ListOfShape aShapes;
        TopoDS_Shape aShape = //load Crash_TBB.brep
        //
        for(TopoDS_Iterator aIter(aShape); aIter.More(); aIter.Next())
        {
             aShapes.Add(aIter.Value());
        }
        BOPAlgo_Builder aGFA;
        aGFA.SetArguments(aShapes);
        // Turn on parallel algorithm
        aGFA.SetRunParallel(Standard_True);
        aGFA.Perform();
(0045868)
msv   
2015-09-18 11:48   
Thank you, Vico, for the data.
(0045869)
msv   
2015-09-18 11:52   
Dear Ilya, please start with creating the draw script to reproduce the problem. I think we have enough commands in Draw for that.
(0045963)
git   
2015-09-21 21:58   
Branch CR26701 has been created by isn.

SHA-1: 04830f567dab95eead7c1f0976083b76614adafb


Detailed log of new commits:

Author: isn
Date: Mon Sep 21 20:50:26 2015 +0300

    0026701: BOPAlgo_Builder::Perform crash.
    (data race)
(0045964)
isn   
2015-09-21 22:07   
script to reproduce:
brestore crash_tbb.brep d
explode d
brunparallel 1
bclearobjects
baddobjects d_1 d_2 d_3 d_4 d_5 d_6 d_7 d_8 d_9 d_10 d_11 d_12 d_13 d_14 d_15 d_16 d_17 d_18 d_19 d_20 d_21 d_22 d_23 d_24 d_25 d_26 d_27 d_28 d_29 d_30 d_31 d_32 d_33 d_34 d_35 d_36
bfillds
(0045965)
abv   
2015-09-22 07:14   
Failures:

boolean bcut_complex O7
boolean bopcommon_complex K2 K3
boolean bopcut_complex K9
boolean bsection D1 E1 M8 M9 N2 N4 N5 N6 N7
bugs modalg_1 buc60531_1 buc60531_2 buc60865 buc60880 bug1255 bug1255_1 bug17194_1 bug17194_2
bugs modalg_4 bug81 bug82 bug6289 bug6502 bug6766_1 bug6766_2 bug6766_3 bug6766_4 fra62369
bugs modalg_5 bug23958 bug25470
bugs modalg_6 bug25937_1 bug25937_2 bug25937_3
bugs moddata_2 bug6450_2
(0045966)
abv   
2015-09-22 07:17   
Regarding script to reproduce: please add it to commit as a test case
(0045969)
git   
2015-09-22 09:14   
Branch CR26701 has been updated by msv.

SHA-1: 5d6efc4cac6fd39f10f5cf07bf1c2b06e7f768ba


Detailed log of new commits:

Author: msv
Date: Tue Sep 22 09:13:26 2015 +0300

    Add comments and make minor cosmetic changes.

(0045970)
msv   
2015-09-22 09:15   
Reviewed.
(0045973)
git   
2015-09-22 10:35   
Branch CR26701 has been updated by isn.

SHA-1: c0d6e3eea091b2d35d538000585b57271ce5c7e1


Detailed log of new commits:

Author: isn
Date: Tue Sep 22 10:34:19 2015 +0300

    corrections

(0045990)
git   
2015-09-22 12:24   
Branch CR26701 has been updated by msv.

SHA-1: bfdc30f575154442aa36161e8a43c97e82d7156e


Detailed log of new commits:

Author: msv
Date: Tue Sep 22 12:23:47 2015 +0300

    Correction

(0046041)
mkv   
2015-09-23 14:32   
Dear BugMaster,
Branch CR26701 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: bfdc30f575154442aa36161e8a43c97e82d7156e

Number of compiler warnings:

occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)

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

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR26701-master-occt-64/Debian70-64/bugs/modalg_6/bug26701.html [^]
http://occt-tests/CR26701-master-occt-64/Windows-64-VC10/bugs/modalg_6/bug26701.html [^]
bugs modalg_6 bug26701: OK

Testing on Linux:
occt component :
Total MEMORY difference: 92568895 / 92151446 [+0.45%]
Total CPU difference: 18896.16999999891 / 18842.199999998986 [+0.29%]
products component :
Total MEMORY difference: 25926924 / 25980951 [-0.21%]
Total CPU difference: 7239.480000000009 / 7208.589999999996 [+0.43%]

Testing on Windows:
occt component :
Total MEMORY difference: 56807230 / 56825790 [-0.03%]
Total CPU difference: 16997.41655709906 / 16810.58975949913 [+1.11%]
products component :
Total MEMORY difference: 16784757 / 16790438 [-0.03%]
Total CPU difference: 5494.916823599973 / 5526.49142599996 [-0.57%]

There are no differences in images found by testdiff.
(0046042)
git   
2015-09-23 14:32   
Branch CR26701 has been updated by mkv.

SHA-1: 1e5d95dc8e27b1f15e4928b99593ca27b01fe18c


Detailed log of new commits:

Author: mkv
Date: Wed Sep 23 14:31:35 2015 +0300

    Test case for issue CR26701

(0046043)
mkv   
2015-09-23 14:32   
Dear msv,
could you please review following test case
bugs modalg_6 bug26701
(0046045)
msv   
2015-09-23 14:40   
Please simplify the script using steps for reproduce.
(0046053)
git   
2015-09-23 16:15   
Branch CR26701 has been updated by mkv.

SHA-1: 4137987f6f228ee74f2dad2ae7fb925e200c3de6


Detailed log of new commits:

Author: mkv
Date: Wed Sep 23 16:15:39 2015 +0300

    Correction of test case for issue CR26701

(0046054)
mkv   
2015-09-23 16:17   
Dear BugMaster,
following test case is corrected and pushed to branch CR26701 of occt git-repository
bugs modalg_6 bug26701
(0046055)
mkv   
2015-09-23 16:17   
Dear BugMaster,
Branch CR26701 is TESTED.
(0047024)
git   
2015-10-16 16:38   
Branch CR26701 has been deleted by kgv.

SHA-1: 4137987f6f228ee74f2dad2ae7fb925e200c3de6