Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

CodeLoad benchmark appears to leak memory #24

Open
GoogleCodeExporter opened this issue Apr 11, 2015 · 1 comment
Open

CodeLoad benchmark appears to leak memory #24

GoogleCodeExporter opened this issue Apr 11, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

To reproduce, increase the iteration count in code-load.js (say to 10000/1000):

# d8 run-code-load.js --trace_gc
[5650]        7 ms: Scavenge 2.1 (38.5) -> 2.1 (38.5) MB, 0.7 ms [allocation 
failure].
[5650]        9 ms: Scavenge 2.1 (38.5) -> 2.1 (39.5) MB, 0.7 ms [allocation 
failure].
[5650]       24 ms: Scavenge 3.8 (40.5) -> 3.4 (40.5) MB, 0.3 ms [allocation 
failure].
[5650]       44 ms: Scavenge 5.7 (42.5) -> 4.8 (42.5) MB, 0.6 ms [allocation 
failure].
[5650]       62 ms: Scavenge 7.0 (42.5) -> 6.2 (43.5) MB, 0.6 ms [allocation 
failure].
[5650]       82 ms: Scavenge 8.5 (44.5) -> 7.6 (44.5) MB, 0.9 ms [allocation 
failure].
[5650]      128 ms: Scavenge 13.0 (47.5) -> 10.9 (48.5) MB, 1.0 ms (+ 1.5 ms in 
23 steps since last GC) [allocation failure].
[5650]      168 ms: Scavenge 15.3 (50.5) -> 13.7 (52.5) MB, 1.3 ms (+ 3.8 ms in 
42 steps since last GC) [allocation failure].
[5650]      210 ms: Scavenge 18.3 (52.5) -> 16.6 (54.5) MB, 1.9 ms (+ 3.1 ms in 
44 steps since last GC) [allocation failure].
[5650] Speed up marking because of heap size increase
[5650] Marking speed increased to 3
[5650]      248 ms: Mark-sweep 20.2 (55.5) -> 18.6 (57.5) MB, 5.4 ms (+ 11.1 ms 
in 144 steps since start of marking, biggest step 0.6 ms) [GC interrupt] [GC in 
old space requested].
[5650]      335 ms: Scavenge 29.8 (61.5) -> 25.6 (62.5) MB, 1.9 ms [allocation 
failure].
[5650]      401 ms: Scavenge 33.8 (65.5) -> 30.6 (67.5) MB, 2.5 ms [allocation 
failure].
[5650]      476 ms: Scavenge 39.9 (70.5) -> 36.4 (73.5) MB, 3.4 ms [allocation 
failure].
[5650]      643 ms: Scavenge 57.7 (81.5) -> 49.5 (83.5) MB, 3.8 ms [allocation 
failure].
[5650]      776 ms: Scavenge 66.1 (90.5) -> 59.7 (94.5) MB, 5.1 ms [allocation 
failure].
[5650]      922 ms: Scavenge 78.3 (102.5) -> 71.2 (106.5) MB, 4.6 ms 
[allocation failure].
[5650]     1083 ms: Scavenge 89.0 (114.5) -> 82.2 (118.5) MB, 5.3 ms (+ 12.9 ms 
in 171 steps since last GC) [allocation failure].
[5650]     1247 ms: Scavenge 100.1 (126.5) -> 93.2 (130.5) MB, 5.3 ms (+ 13.8 
ms in 173 steps since last GC) [allocation failure].
[5650]     1416 ms: Scavenge 111.9 (137.5) -> 105.0 (142.5) MB, 5.3 ms (+ 18.5 
ms in 173 steps since last GC) [allocation failure].
[5650]     1580 ms: Scavenge 122.9 (148.5) -> 116.0 (152.5) MB, 5.3 ms (+ 14.7 
ms in 173 steps since last GC) [allocation failure].
[5650] Speed up marking because marker was not keeping up
[5650] Marking speed increased to 3
[5650] Speed up marking because marker was not keeping up
[5650] Marking speed increased to 6
[5650]     1690 ms: Mark-sweep 123.5 (156.5) -> 115.4 (158.5) MB, 24.9 ms (+ 
84.2 ms in 762 steps since start of marking, biggest step 2.8 ms) [GC 
interrupt] [GC in old space requested].
[5650]     1859 ms: Scavenge 137.1 (167.5) -> 128.5 (168.5) MB, 4.0 ms 
[allocation failure].
[5650]     1990 ms: Scavenge 145.0 (174.5) -> 138.6 (180.5) MB, 5.4 ms 
[allocation failure].
[5650]     2137 ms: Scavenge 157.7 (187.5) -> 150.5 (191.5) MB, 5.0 ms 
[allocation failure].
[5650]     2278 ms: Scavenge 168.2 (198.5) -> 161.4 (202.5) MB, 5.3 ms 
[allocation failure].
[5650]     2421 ms: Scavenge 179.6 (210.5) -> 172.6 (214.5) MB, 5.2 ms 
[allocation failure].
[5650]     2563 ms: Scavenge 190.5 (221.5) -> 183.6 (226.5) MB, 5.4 ms 
[allocation failure].
[5650]     2706 ms: Scavenge 201.6 (231.5) -> 194.7 (235.5) MB, 5.4 ms 
[allocation failure].
[5650]     2848 ms: Scavenge 212.6 (243.5) -> 205.7 (247.5) MB, 5.5 ms 
[allocation failure].
[5650]     2991 ms: Scavenge 223.7 (255.5) -> 216.8 (259.5) MB, 5.6 ms 
[allocation failure].
[5650]     3133 ms: Scavenge 234.7 (266.5) -> 227.8 (270.5) MB, 5.6 ms 
[allocation failure].
[5650]     3276 ms: Scavenge 245.8 (276.5) -> 238.8 (281.5) MB, 5.7 ms 
[allocation failure].
[5650]     3418 ms: Scavenge 256.8 (287.5) -> 249.9 (293.5) MB, 5.8 ms 
[allocation failure].
[5650]     3561 ms: Scavenge 267.8 (299.5) -> 260.9 (303.5) MB, 5.9 ms 
[allocation failure].
[5650]     3704 ms: Scavenge 278.8 (311.5) -> 271.9 (315.5) MB, 5.8 ms 
[allocation failure].
[5650]     3846 ms: Scavenge 289.9 (322.5) -> 282.9 (326.5) MB, 5.9 ms 
[allocation failure].
[5650]     3988 ms: Scavenge 300.9 (332.5) -> 294.0 (337.5) MB, 6.0 ms 
[allocation failure].
[5650]     4131 ms: Scavenge 311.9 (344.5) -> 305.0 (349.5) MB, 6.0 ms 
[allocation failure].
[5650]     4274 ms: Scavenge 323.5 (356.5) -> 316.6 (360.5) MB, 6.0 ms 
[allocation failure].
[5650]     4416 ms: Scavenge 334.5 (367.5) -> 327.6 (371.5) MB, 6.1 ms 
[allocation failure].
[5650]     4558 ms: Scavenge 345.6 (378.5) -> 338.6 (382.5) MB, 6.2 ms 
[allocation failure].
[5650]     4701 ms: Scavenge 356.6 (390.5) -> 349.7 (394.5) MB, 6.2 ms 
[allocation failure].
[5650]     4844 ms: Scavenge 367.6 (400.5) -> 360.7 (405.5) MB, 6.4 ms 
[allocation failure].
[5650]     4986 ms: Scavenge 378.7 (412.5) -> 371.7 (416.5) MB, 6.4 ms 
[allocation failure].
--- end of first benchmark ---
[5650]     5197 ms: Scavenge 390.3 (423.5) -> 384.9 (427.5) MB, 7.9 ms 
[allocation failure].
[5650]     5377 ms: Scavenge 400.7 (434.5) -> 395.9 (439.5) MB, 8.9 ms 
[allocation failure].
[5650]     5574 ms: Scavenge 413.0 (446.5) -> 407.8 (451.5) MB, 8.9 ms 
[allocation failure].
[5650]     5765 ms: Scavenge 424.3 (457.5) -> 419.4 (463.5) MB, 9.2 ms 
[allocation failure].
[5650]     5952 ms: Scavenge 436.0 (469.5) -> 430.8 (475.5) MB, 9.2 ms 
[allocation failure].
[5650]     6140 ms: Scavenge 447.5 (480.5) -> 442.4 (486.5) MB, 9.4 ms 
[allocation failure].
[5650]     6330 ms: Scavenge 459.0 (493.5) -> 453.9 (499.5) MB, 9.4 ms 
[allocation failure].
[5650]     6522 ms: Scavenge 471.1 (504.5) -> 466.1 (511.5) MB, 10.2 ms (+ 2.3 
ms in 11 steps since last GC) [allocation failure].
[5650]     6735 ms: Scavenge 482.7 (517.5) -> 477.6 (523.5) MB, 10.3 ms (+ 14.0 
ms in 134 steps since last GC) [allocation failure].
[5650]     6950 ms: Scavenge 494.2 (529.5) -> 489.0 (536.5) MB, 10.5 ms (+ 15.0 
ms in 138 steps since last GC) [allocation failure].
[5650] Speed up marking because marker was not keeping up
[5650] Marking speed increased to 3
[5650]     7193 ms: Scavenge 505.7 (542.5) -> 500.6 (548.5) MB, 10.6 ms (+ 38.9 
ms in 133 steps since last GC) [allocation failure].
[5650]     7437 ms: Scavenge 517.1 (553.5) -> 512.0 (560.5) MB, 10.7 ms (+ 40.9 
ms in 136 steps since last GC) [allocation failure].
[5650]     7684 ms: Scavenge 528.6 (567.5) -> 523.5 (572.5) MB, 10.8 ms (+ 41.5 
ms in 138 steps since last GC) [allocation failure].
[5650]     7938 ms: Scavenge 540.1 (578.5) -> 534.9 (585.5) MB, 11.2 ms (+ 46.8 
ms in 139 steps since last GC) [allocation failure].
[5650]     8192 ms: Scavenge 551.6 (591.5) -> 546.5 (597.5) MB, 11.4 ms (+ 46.1 
ms in 138 steps since last GC) [allocation failure].
[5650] Speed up marking after 1024 steps
[5650] Marking speed increased to 6
[5650]     8540 ms: Mark-sweep 563.0 (603.5) -> 467.5 (603.5) MB, 75.1 ms (+ 
320.7 ms in 1104 steps since start of marking, biggest step 1.6 ms) [GC 
interrupt] [GC in old space requested].
[5650]     8780 ms: Scavenge 488.0 (606.5) -> 482.2 (609.5) MB, 9.4 ms 
[allocation failure].
[5650]     8952 ms: Scavenge 496.4 (611.5) -> 491.8 (614.5) MB, 10.6 ms 
[allocation failure].
[5650]     9169 ms: Scavenge 509.8 (617.5) -> 504.4 (619.5) MB, 10.2 ms 
[allocation failure].
[5650]     9357 ms: Scavenge 520.3 (622.5) -> 515.4 (625.5) MB, 10.9 ms 
[allocation failure].
[5650]     9564 ms: Scavenge 532.5 (628.5) -> 527.4 (630.5) MB, 10.7 ms 
[allocation failure].
[5650]     9763 ms: Scavenge 543.8 (632.5) -> 538.8 (636.5) MB, 11.3 ms 
[allocation failure].
[5650]     9961 ms: Scavenge 555.5 (640.5) -> 550.4 (645.5) MB, 11.0 ms 
[allocation failure].
[5650]    10159 ms: Scavenge 567.0 (648.5) -> 561.9 (653.5) MB, 11.1 ms 
[allocation failure].
[5650]    10357 ms: Scavenge 578.4 (657.5) -> 573.4 (662.5) MB, 11.4 ms 
[allocation failure].
[5650]    10555 ms: Scavenge 589.9 (666.5) -> 584.8 (671.5) MB, 11.3 ms 
[allocation failure].
[5650]    10756 ms: Scavenge 601.4 (675.5) -> 596.3 (680.5) MB, 11.5 ms 
[allocation failure].
[5650]    10956 ms: Scavenge 612.8 (685.5) -> 607.8 (690.5) MB, 11.8 ms 
[allocation failure].
[5650]    11155 ms: Scavenge 624.3 (697.5) -> 619.2 (703.5) MB, 11.9 ms 
[allocation failure].
[5650]    11353 ms: Scavenge 635.8 (708.5) -> 630.7 (714.5) MB, 12.1 ms 
[allocation failure].
[5650]    11553 ms: Scavenge 647.2 (720.5) -> 642.1 (726.5) MB, 12.2 ms 
[allocation failure].
[5650]    11752 ms: Scavenge 658.7 (732.5) -> 653.6 (738.5) MB, 12.4 ms 
[allocation failure].
[5650]    11954 ms: Scavenge 673.2 (747.5) -> 668.1 (753.5) MB, 12.5 ms 
[allocation failure].
[5650]    12155 ms: Scavenge 684.6 (758.5) -> 679.5 (764.5) MB, 12.9 ms 
[allocation failure].
[5650]    12368 ms: Scavenge 696.1 (770.5) -> 691.0 (776.5) MB, 14.0 ms 
[allocation failure].
[5650]    12575 ms: Scavenge 707.5 (782.5) -> 702.4 (787.5) MB, 13.1 ms 
[allocation failure].
[5650]    12781 ms: Scavenge 719.0 (794.5) -> 713.9 (800.5) MB, 13.5 ms 
[allocation failure].
[5650]    12994 ms: Scavenge 730.5 (805.5) -> 725.4 (811.5) MB, 14.1 ms 
[allocation failure].
[5650]    13230 ms: Scavenge 741.9 (817.5) -> 736.8 (823.5) MB, 14.6 ms 
[allocation failure].
[5650]    13442 ms: Scavenge 753.4 (829.5) -> 748.3 (835.5) MB, 13.9 ms 
[allocation failure].
[5650]    13647 ms: Scavenge 764.8 (841.5) -> 759.7 (847.5) MB, 14.0 ms 
[allocation failure].
[5650]    13853 ms: Scavenge 776.3 (852.5) -> 771.2 (858.5) MB, 14.1 ms 
[allocation failure].
[5650]    14062 ms: Scavenge 787.8 (864.5) -> 782.6 (870.5) MB, 14.0 ms 
[allocation failure].
[5650]    14269 ms: Scavenge 799.2 (876.5) -> 794.1 (881.5) MB, 14.5 ms 
[allocation failure].
[5650]    14473 ms: Scavenge 810.7 (887.5) -> 805.6 (893.5) MB, 14.4 ms 
[allocation failure].
[5650]    14680 ms: Scavenge 822.1 (899.5) -> 817.0 (905.5) MB, 14.6 ms 
[allocation failure].
[5650]    14883 ms: Scavenge 833.6 (910.5) -> 828.5 (916.5) MB, 14.7 ms 
[allocation failure].
[5650]    15085 ms: Scavenge 845.0 (923.5) -> 839.9 (929.5) MB, 14.8 ms 
[allocation failure].
CodeLoad: 20689

Looks like garbage accumulates that cannot be freed (not even after benchmark 
finishes, it seems). Expected: no leak.
Admittedly, benchmark score doesn't really suffer from this on v8, as long as 
enough memory is available.

What version of the product are you using? v8 3.28.38, octane 2.0

Original issue reported on code.google.com by [email protected] on 28 Aug 2014 at 2:42

@GoogleCodeExporter
Copy link
Author

This commit fixes the memory leak in code-load benchmark

https://github.com/masrud/octane-benchmark/commit/6965d545eb2ff586c701019d4d38ea
b0b0df948b

Original comment by [email protected] on 6 Apr 2015 at 8:18

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant