MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029996Open CASCADE[OCCT] OCCT:Visualizationpublic2018-07-28 13:152019-03-05 13:46
Reporterbugmaster 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformMicrosoft Visual Studio 2017OSOS Version
Product Version[OCCT] 7.4.0 
Target Version[OCCT] 7.4.0Fixed in Version[OCCT] 7.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 Filesxlsx file icon comparison-amd-i5.xlsx (12,567 bytes) 2018-08-30 11:46
xlsx file icon comparison-GeForce-Intel.xlsx (13,068 bytes) 2018-08-31 13:40

- Relationships
related to 0030005closedbugmaster Visualization, OpenGl_Context - replace NCollection_SparseArray with NCollection_Array1 for myDrawBuffers 
related to 0030377closedbugmaster DRAW, Windows - command executed via option -c fails on puts 
child of 0029912closedbugmaster Implementation of jenkins-test-12 with VC 2017 

-  Notes
(0078253)
kgv (developer)
2018-07-31 20:52
edited on: 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)?

(0078255)
kgv (developer)
2018-07-31 22:35
edited on: 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).

(0078288)
bugmaster (administrator)
2018-08-01 18:28

They taken locally on testex(s) station. I never take anything from the network
(0078291)
bugmaster (administrator)
2018-08-01 18:49

For example : \\testex1\occt-3rdparty
(0078292)
kgv (developer)
2018-08-01 18:52

Could you please run tests using NON-ActiveState Tcl build to compare results?
(0078751)
kgv (developer)
2018-08-24 02:19

Andrey,

could you please take a look for a possible improvement of checktrend?
(0078847)
abv (manager)
2018-08-30 07:03
edited on: 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.

(0078850)
bugmaster (administrator)
2018-08-30 11:37
edited on: 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

(0078851)
bugmaster (administrator)
2018-08-30 11:49

Or if it is not reproduced on integrated graphics Intel HD 4600 you suggest to use integrated video?
(0078857)
abv (manager)
2018-08-30 12:42

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
(0078888)
bugmaster (administrator)
2018-08-31 13:39

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.
(0082356)
abv (manager)
2019-02-26 11:31

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.
(0082364)
abv (manager)
2019-02-26 13:08

Upgrading drivers to latest version (419.17) did not help
(0082365)
git (administrator)
2019-02-26 13:12

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
(0082372)
git (administrator)
2019-02-26 14:35

Branch CR29996 has been updated forcibly by abv.

SHA-1: a9ad5d3c438fb14adfdafddab7e14a8224facc32
(0082374)
git (administrator)
2019-02-26 15:28

Branch CR29996 has been updated forcibly by abv.

SHA-1: 3bb61eb0fecee9fe7c481c88b34b3eb877647e0f
(0082394)
abv (manager)
2019-02-27 08:27

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).
(0082397)
kgv (developer)
2019-02-27 08:59

Please raise the patch.
(0082408)
apn (administrator)
2019-02-27 12:53

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
(0082620)
git (administrator)
2019-03-05 13:46

Branch CR29996 has been deleted by kgv.

SHA-1: 3bb61eb0fecee9fe7c481c88b34b3eb877647e0f

- Related Changesets
occt: master 3bb61eb0
Timestamp: 2019-02-26 10:07:09
Author: 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
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-28 13:22 bugmaster Relationship added child of 0029912
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 View Revisions
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 View Revisions
2018-07-31 22:37 kgv Note Edited: 0078255 View Revisions
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 View Revisions
2018-08-28 13:46 bugmaster Description Updated View Revisions
2018-08-29 19:02 bugmaster Description Updated View Revisions
2018-08-30 07:03 abv Note Added: 0078847
2018-08-30 07:04 abv Note Edited: 0078847 View Revisions
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 View Revisions
2018-08-30 11:46 bugmaster File Added: comparison-amd-i5.xlsx
2018-08-30 11:46 bugmaster Note Edited: 0078850 View Revisions
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 View Revisions
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 View Revisions
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 00:58 kgv Relationship added related to 0027871
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


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker