View Issue Details

IDProjectCategoryView StatusLast Update
0029996Open CASCADEOCCT:Visualizationpublic2021-03-25 10:21
Reporterbugmaster Assigned Toabv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformMicrosoft Visual Studio 2017 
Product Version7.4.0 
Target Version7.4.0Fixed in Version7.4.0 
Summary0029996: Porting to VC 2017: memory leak reported in visualisation
DescriptionAfter moving tests from notebook to testex(s) test case bugs vis bug79 become invalid (instability)
Steps To ReproduceOn workstation with NVidia GeForce 10x graphics:

testgrid bugs vis bug7*
testgrid bugs vis bug1*
Additional information
and documentation updates
bug79 is failing in Jennkins with errors like that (on branch CR27620):


Checking trend: nb = 3, mean delta = 1844.0, sigma = 707.1067811865476
Checking trend failed: mean delta per step = 1844.0, sigma = 707.1067811865476, expected delta = 0
TagsNo tags attached.
Test case numberNot needed

Attached Files

  • comparison-amd-i5.xlsx (12,567 bytes)
  • comparison-GeForce-Intel.xlsx (13,068 bytes)

Relationships

related to 0030005 closedbugmaster Open CASCADE Visualization, OpenGl_Context - replace NCollection_SparseArray with NCollection_Array1 for myDrawBuffers 
related to 0030377 closedbugmaster Open CASCADE DRAW, Windows - command executed via option -c fails on puts 

Activities

kgv

2018-07-31 20:52

developer   ~0078253

Last edited: 2018-07-31 20:52

Igor, could you please compare Tcl DLLs builds used for testing VC10 and VC14 builds?
Are they same or different?
Where they can be taken ("C:/occt-3rdparty/Windows-64-VC14/tcltk-86-64" on local Jenkins system is not very helpful to find an origin in network)?

kgv

2018-07-31 22:35

developer   ~0078255

Last edited: 2018-07-31 22:37

On my system OCCT 7.2.0 vc14

TclTk 8.6.2.2 (2016-03-10), coming with OCCT 7.2.0 vc10 distribution:
57093681 
57093681 
57093681 
Checking trend: nb = 3, mean delta = 0.0, sigma = 0.0
57093657 
Checking trend: nb = 4, mean delta = -8.0, sigma = 13.856406460551018
57093657 
Checking trend: nb = 5, mean delta = -6.0, sigma = 12.0
57093657 
Checking trend: nb = 6, mean delta = -4.8, sigma = 10.73312629199899
57093657 
Checking trend: nb = 7, mean delta = -4.0, sigma = 9.797958971132712
57093657 
Checking trend: nb = 8, mean delta = -3.4285714285714284, sigma = 9.071147352221454
57093657 
Checking trend: nb = 9, mean delta = -3.0, sigma = 8.48528137423857
57093657 


TclTk 8.6.2.4 (ActiveState) from "occt700products":
60030917 
60030917 
60030917 
Checking trend: nb = 3, mean delta = 0.0, sigma = 0.0
60047277 
Checking trend: nb = 4, mean delta = 5453.333333333333, sigma = 9445.450403942277
60047277 
Checking trend: nb = 5, mean delta = 4090.0, sigma = 8180.0
60047277 
Checking trend: nb = 6, mean delta = 3272.0, sigma = 7316.414422379312
60047277 
Checking trend: nb = 7, mean delta = 2726.6666666666665, sigma = 6678.942031988799
60047277 
Checking trend: nb = 8, mean delta = 2337.1428571428573, sigma = 6183.498778430958
60047277 
Checking trend: nb = 9, mean delta = 2045.0, sigma = 5784.133470105959
60047277 
Checking trend: nb = 10, mean delta = 1817.7777777777778, sigma = 5453.333333333334


So it looks that test memory trend can be affected by execution of Tcl commands (lappend/checktrend) and might depend on Tcl version / compiler used for building Tcl.
In addition, results might be affected by (bugs/memory leaks/memory allocator optimizations in OpenGL driver installed in the system).

bugmaster

2018-08-01 18:28

administrator   ~0078288

They taken locally on testex(s) station. I never take anything from the network

bugmaster

2018-08-01 18:49

administrator   ~0078291

For example : \\testex1\occt-3rdparty

kgv

2018-08-01 18:52

developer   ~0078292

Could you please run tests using NON-ActiveState Tcl build to compare results?

kgv

2018-08-24 02:19

developer   ~0078751

Andrey,

could you please take a look for a possible improvement of checktrend?

abv

2018-08-30 07:03

manager   ~0078847

Last edited: 2018-08-30 07:04

I have built current OCCT master (with Visual Studio 2017 Community Edition, 64-bit Release mode) with 3 versions of Tcl/Tk:

A. As downloaded from https://www.opencascade.com/sites/default/files/private/occt/3rdparty/tcltk-86-64.zip
B. ActiveTcl 8.6.4.1 (64-bit)
C. Tcl 8.6.8 freshly compiled from sources using MSVC 2017 Community Edition with dynamic run-time libs (/MD)

and tried executing the test case on my workstation (CPU i7-4790, with integrated graphics Intel HD 4600, 16 GB RAM, Windows 10 64-bit). The results are identical and do not seem to depend on Tcl build:

1. Command "test bugs vis bug79" yields OK; it printed "channel not found" error message on second and further runs (for all builds) yesterday, but not when I re-tried in the morning
2. Command "testgrid bugs vis bug79" yields OK on all runs

Please describe more precisely the sequence of actions, environment (including precise identification of Tcl build), and results in the configuration where the problem appears. I can share my build of Tcl 8.6.8 if you like to experiment with it.

I also advise to try switching between discrete and integrated graphic cards to see if the issue depends on the card used.

bugmaster

2018-08-30 11:37

administrator   ~0078850

Last edited: 2018-08-30 11:46

Compilation and testing executed with :
C:\occt-3rdparty\Windows-64-VC14\tcltk-86-64

__________________________________________________________________________
ActiveState ActiveTcl 8.6.4.0.298892 Mar 12, 2015
__________________________________________________________________________

Output in case of error bugs vis bug79 (Behavior unstable (OK/KO)):

========
OCC79
========
vinit
Driver1/Viewer1/View1
brestore C:/occt_tests_data/private/customers/MitutoyoUK/OCC162.brep n
n
vdisplay s
verase s
s
vdisplay s
Display s

verase s
s
vdisplay s
Display s

meminfo h
47993386

verase s
s
vdisplay s
Display s

meminfo h
47994730

verase s
s
vdisplay s
Display s

meminfo h
47995882

Checking trend: nb = 3, mean delta = 1248.0, sigma = 135.7645019878171
Checking trend failed: mean delta per step = 1248.0, sigma = 135.7645019878171, expected delta = 0

Tcl Exception: Memory leak detected

> I also advise to try switching between discrete and integrated graphic cards to see if the issue depends on the card used.

I did not understand the meaning of your proposal. Problem is reproduced and on 1080. See attached table

comparison-amd-i5.xlsx

bugmaster

2018-08-30 11:46

administrator  

comparison-amd-i5.xlsx (12,567 bytes)

bugmaster

2018-08-30 11:49

administrator   ~0078851

Or if it is not reproduced on integrated graphics Intel HD 4600 you suggest to use integrated video?

abv

2018-08-30 12:42

manager   ~0078857

The idea is to check if the problem is reproducible only with NVidia graphics but not Intel -- this would suggest that the problem is in graphic driver but not Tcl

bugmaster

2018-08-31 13:39

administrator   ~0078888

I check bug vis on \\revamping1\OCCT without definition -parallel on
GeForce 750 Ti and Intel(R) HD Graphic 4600
Switching was realized by overtaking the cable from the GeForce to Intel

Results shows that on Intel problem not reproduced at all (see attached comparison-GeForce-Intel). It means that problem in NVidia drivers. And on new drivers for 1080 for example amount of bat cases increased. And what we should do? Introduce TO DO in cases with such check.

bugmaster

2018-08-31 13:40

administrator  

comparison-GeForce-Intel.xlsx (13,068 bytes)

abv

2019-02-26 11:31

manager   ~0082356

I confirm that I can reproduce this issue on my desktop computer with GeForce GTX 1060 (driver version 416.34). Command test bugs vis bug79 fails from time to time, while command testgrid bugs vis bug7* fails on each run for bug79.

abv

2019-02-26 13:08

manager   ~0082364

Upgrading drivers to latest version (419.17) did not help

git

2019-02-26 13:12

administrator   ~0082365

Branch CR29996 has been created by abv.

SHA-1: 0f3a6943d0a884ec1b6a3f7d6727a8dc762c5eea


Detailed log of new commits:

Author: abv
Date: Tue Feb 26 13:07:09 2019 +0300

    0029996: Porting to VC 2017: memory leak reported in visualisation
    
    One more erase-display cycle is performed in the test script before memory measurements, to avoid false memory leaks reported on NVidia graphics

git

2019-02-26 14:35

administrator   ~0082372

Branch CR29996 has been updated forcibly by abv.

SHA-1: a9ad5d3c438fb14adfdafddab7e14a8224facc32

git

2019-02-26 15:28

administrator   ~0082374

Branch CR29996 has been updated forcibly by abv.

SHA-1: 3bb61eb0fecee9fe7c481c88b34b3eb877647e0f

abv

2019-02-27 08:27

manager   ~0082394

Kirill, I have corrected tests bug79 and bug172 as per your suggestion (disabling VBO) and now they seem to pass fine, see Jenkins job CR29996-master-abv. Please review (branch CR29996).

kgv

2019-02-27 08:59

developer   ~0082397

Please raise the patch.

apn

2019-02-27 12:53

administrator   ~0082408

Combination -
OCCT branch : CR29996
master SHA - 3bb61eb0fecee9fe7c481c88b34b3eb877647e0f
d67d4b811012eef8913d3c535c29654d0acf3c4c
Products branch : master SHA - b4f0b00c20dec5376d841941164e1fa4249d1d84
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16537.760000000024 / 16542.15999999996 [-0.03%]
Products
Total CPU difference: 9068.630000000041 / 9061.510000000035 [+0.08%]
Windows-64-VC14:
OCCT
Total CPU difference: 18014.25 / 17946.09375 [+0.38%]
Products
Total CPU difference: 10479.765625 / 10439.25 [+0.39%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2019-03-05 13:46

administrator   ~0082620

Branch CR29996 has been deleted by kgv.

SHA-1: 3bb61eb0fecee9fe7c481c88b34b3eb877647e0f

Related Changesets

occt: master 3bb61eb0

2019-02-26 10:07:09

abv


Committer: abv Details Diff
0029996: Porting to VC 2017: memory leak reported in visualisation

Tests for memory leaks on display / erase cycles are performed with VBO disabled to avoid false memory leaks reported on NVidia graphics
Affected Issues
0029996
mod - tests/bugs/vis/bug172 Diff File
mod - tests/bugs/vis/bug79 Diff File

Issue History

Date Modified Username Field Change
2018-07-28 13:15 bugmaster New Issue
2018-07-28 13:15 bugmaster Assigned To => kgv
2018-07-28 13:16 bugmaster Status new => assigned
2018-07-31 20:52 kgv Note Added: 0078253
2018-07-31 20:52 kgv Assigned To kgv => bugmaster
2018-07-31 20:52 kgv Status assigned => feedback
2018-07-31 20:52 kgv Note Edited: 0078253
2018-07-31 22:21 kgv Relationship added related to 0030005
2018-07-31 22:35 kgv Note Added: 0078255
2018-07-31 22:36 kgv Note Edited: 0078255
2018-07-31 22:37 kgv Note Edited: 0078255
2018-08-01 18:28 bugmaster Note Added: 0078288
2018-08-01 18:29 bugmaster Assigned To bugmaster => kgv
2018-08-01 18:49 bugmaster Note Added: 0078291
2018-08-01 18:52 kgv Note Added: 0078292
2018-08-01 18:52 kgv Assigned To kgv => bugmaster
2018-08-24 02:19 kgv Note Added: 0078751
2018-08-24 02:19 kgv Assigned To bugmaster => abv
2018-08-24 02:19 kgv Status feedback => assigned
2018-08-28 13:06 bugmaster Description Updated
2018-08-28 13:46 bugmaster Description Updated
2018-08-29 19:02 bugmaster Description Updated
2018-08-30 07:03 abv Note Added: 0078847
2018-08-30 07:04 abv Note Edited: 0078847
2018-08-30 07:05 abv Assigned To abv => bugmaster
2018-08-30 07:05 abv Status assigned => feedback
2018-08-30 11:37 bugmaster Note Added: 0078850
2018-08-30 11:45 bugmaster Note Edited: 0078850
2018-08-30 11:46 bugmaster File Added: comparison-amd-i5.xlsx
2018-08-30 11:46 bugmaster Note Edited: 0078850
2018-08-30 11:46 bugmaster Assigned To bugmaster => abv
2018-08-30 11:49 bugmaster Note Added: 0078851
2018-08-30 12:42 abv Note Added: 0078857
2018-08-31 13:39 bugmaster Status feedback => assigned
2018-08-31 13:39 bugmaster Note Added: 0078888
2018-08-31 13:40 bugmaster File Added: comparison-GeForce-Intel.xlsx
2018-11-19 14:50 abv Relationship added related to 0030377
2018-11-20 14:19 abv Additional Information Updated
2019-02-26 11:31 abv Note Added: 0082356
2019-02-26 13:08 abv Note Added: 0082364
2019-02-26 13:10 abv Summary Porting to VC 2017 : Regressions in visualisation => Porting to VC 2017: memory leak reported in visualisation
2019-02-26 13:12 git Note Added: 0082365
2019-02-26 14:35 git Note Added: 0082372
2019-02-26 15:28 git Note Added: 0082374
2019-02-27 08:27 abv Note Added: 0082394
2019-02-27 08:27 abv Assigned To abv => kgv
2019-02-27 08:27 abv Status assigned => resolved
2019-02-27 08:27 abv Steps to Reproduce Updated
2019-02-27 08:59 kgv Note Added: 0082397
2019-02-27 08:59 kgv Assigned To kgv => bugmaster
2019-02-27 08:59 kgv Status resolved => reviewed
2019-02-27 08:59 kgv Product Version => 7.4.0
2019-02-27 12:53 apn Test case number => Not needed
2019-02-27 12:53 apn Note Added: 0082408
2019-02-27 12:53 apn Status reviewed => tested
2019-03-03 21:12 abv Changeset attached => occt master 3bb61eb0
2019-03-03 21:12 abv Assigned To bugmaster => abv
2019-03-03 21:12 abv Status tested => verified
2019-03-03 21:12 abv Resolution open => fixed
2019-03-05 13:46 git Note Added: 0082620