Memory leaks? #15311

issue NicolasDorier openend this issue on February 1, 2019
  1. NicolasDorier commented at 7:30 am on February 1, 2019: contributor

    I compiled with msvc today and ran tests_bitcoin.exe. It seems it detected memory leaks. Unsure if it is serious or not.

    Ping @ken2812221 ,

     0*** No errors detected
     1Detected memory leaks!
     2Dumping objects ->
     3{56914750} normal block at 0x00000267E70E47D0, 24 bytes long.
     4 Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
     5{56914749} normal block at 0x00000267F5F11BE0, 9 bytes long.
     6 Data: <         > 09 00 00 00 00 00 00 00 00
     7{56914748} normal block at 0x00000267E70E3A50, 28 bytes long.
     8 Data: <         `      > 1C 00 00 00 00 00 00 00 A1 60 C2 91 00 00 00 00
     9{56914747} normal block at 0x00000267E8174D00, 216 bytes long.
    10 Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    11{56775890} normal block at 0x00000267E70E8370, 24 bytes long.
    12 Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    13{56775889} normal block at 0x00000267F5F0B6A0, 9 bytes long.
    14 Data: <         > 09 00 00 00 00 00 00 00 00
    15{56775888} normal block at 0x00000267E70E8DF0, 28 bytes long.
    16 Data: <                > 1C 00 00 00 00 00 00 00 D2 9D 15 9A 00 00 00 00
    17{56775887} normal block at 0x00000267E8175960, 216 bytes long.
    18 Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    19{56750259} normal block at 0x00000267E70E7DD0, 24 bytes long.
    20 Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    21{56750258} normal block at 0x00000267F5F13EE0, 9 bytes long.
    22 Data: <         > 09 00 00 00 00 00 00 00 00
    23{56750257} normal block at 0x00000267E70E7AD0, 28 bytes long.
    24 Data: <                > 1C 00 00 00 00 00 00 00 BC 12 03 88 00 00 00 00
    25{56750256} normal block at 0x00000267E05105E0, 216 bytes long.
    26 Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    27{56118853} normal block at 0x00000267E60D98E0, 24 bytes long.
    28 Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    29{56118852} normal block at 0x00000267F5F12BD0, 9 bytes long.
    30 Data: <         > 09 00 00 00 00 00 00 00 00
    31{56118851} normal block at 0x00000267E60D9580, 28 bytes long.
    32 Data: <        Fg|     > 1C 00 00 00 00 00 00 00 46 67 7C 95 00 00 00 00
    33{56118850} normal block at 0x00000267E0510820, 216 bytes long.
    34 Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    35{55892545} normal block at 0x00000267E7BD5460, 24 bytes long.
    36 Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    37{55892544} normal block at 0x00000267F5DF11F0, 9 bytes long.
    38 Data: <         > 09 00 00 00 00 00 00 00 00
    39{55892543} normal block at 0x00000267E7BD3840, 28 bytes long.
    40 Data: <                > 1C 00 00 00 00 00 00 00 EE DF 96 A6 00 00 00 00
    41{55892542} normal block at 0x00000267E050FBC0, 216 bytes long.
    42 Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    43{46617917} normal block at 0x00000267E7BEA760, 24 bytes long.
    44 Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    45{46617916} normal block at 0x00000267E06858F0, 9 bytes long.
    46 Data: <         > 09 00 00 00 00 00 00 00 00
    47{46617915} normal block at 0x00000267E7BEA700, 28 bytes long.
    48 Data: <                > 1C 00 00 00 00 00 00 00 CA D1 E8 A2 00 00 00 00
    49{46617914} normal block at 0x00000267E05103A0, 216 bytes long.
    50 Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    51{46498875} normal block at 0x00000267E7BEA280, 24 bytes long.
    52 Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    53{46498874} normal block at 0x00000267E7EE74D0, 9 bytes long.
    54 Data: <         > 09 00 00 00 00 00 00 00 00
    55{46498873} normal block at 0x00000267E7BE9800, 28 bytes long.
    56 Data: <        8       > 1C 00 00 00 00 00 00 00 38 C3 01 9B 00 00 00 00
    57{46498872} normal block at 0x00000267E0510160, 216 bytes long.
    58 Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    59{39137074} normal block at 0x00000267E7BE9740, 24 bytes long.
    60 Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    61{39137073} normal block at 0x00000267E74A5A70, 9 bytes long.
    62 Data: <         > 09 00 00 00 00 00 00 00 00
    63{39137072} normal block at 0x00000267E7BEA820, 28 bytes long.
    64 Data: <        t       > 1C 00 00 00 00 00 00 00 74 89 FC 9C 00 00 00 00
    65{39137071} normal block at 0x00000267E0510940, 216 bytes long.
    66 Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    67{38482049} normal block at 0x00000267E7BE9B00, 24 bytes long.
    68 Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    69{38482048} normal block at 0x00000267E7E9BDC0, 9 bytes long.
    70 Data: <         > 09 00 00 00 00 00 00 00 00
    71{38482047} normal block at 0x00000267E7BEA2E0, 28 bytes long.
    72 Data: <        C"A     > 1C 00 00 00 00 00 00 00 43 22 41 85 00 00 00 00
    73{38482046} normal block at 0x00000267E0510280, 216 bytes long.
    74 Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    75{2180950} normal block at 0x00000267E0591F70, 8 bytes long.
    76 Data: <        > A0 1D E7 B7 F7 7F 00 00
    77{2180949} normal block at 0x00000267E0591F20, 8 bytes long.
    78 Data: < p      > A0 70 BA B7 F7 7F 00 00
    79{22128} normal block at 0x00000267E0556A50, 16 bytes long.
    80 Data: <  R g           > E0 BB 52 E0 67 02 00 00 00 00 00 00 00 00 00 00
    81{22127} normal block at 0x00000267E0557450, 16 bytes long.
    82 Data: <  R g           > B8 BB 52 E0 67 02 00 00 00 00 00 00 00 00 00 00
    83{22126} normal block at 0x00000267E0523690, 56 bytes long.
    84 Data: < 6R g    6R g   > 90 36 52 E0 67 02 00 00 90 36 52 E0 67 02 00 00
    85{22125} normal block at 0x00000267E052BB60, 176 bytes long.
    86 Data: <                > 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00
    87Object dump complete.
    
  2. fanquake added the label Resource usage on Feb 1, 2019
  3. jonasschnelli commented at 7:33 am on February 1, 2019: contributor

    @NicolasDorier can you get a call stack or similar or elements that did access those leaked blocks (like valgrind)?

    Also, AFAIK the macOS leak detector (Instruments; which is not based on valgrind) does report false positives on Berkley DB. Some memory handling there is hard to follow for leak detectors.

  4. NicolasDorier commented at 7:51 am on February 1, 2019: contributor
    Trying to… the blocks are not determinist and I have no idea about which test cause it.
  5. NicolasDorier commented at 8:11 am on February 1, 2019: contributor

    Mmmh. I am tempted to ignore. .\test_bitcoin.exe -t arith_uint256_tests give me

     0*** No errors detected
     1Detected memory leaks!
     2Dumping objects ->
     3{22315} normal block at 0x00000129E5204C30, 16 bytes long.
     4 Data: <@ 4 )           > 40 0C 34 E7 29 01 00 00 00 00 00 00 00 00 00 00
     5{22314} normal block at 0x00000129E52050E0, 16 bytes long.
     6 Data: <  4 )           > 18 0C 34 E7 29 01 00 00 00 00 00 00 00 00 00 00
     7{22313} normal block at 0x00000129E51EACA0, 56 bytes long.
     8 Data: <    )       )   > A0 AC 1E E5 29 01 00 00 A0 AC 1E E5 29 01 00 00
     9{22312} normal block at 0x00000129E7340BC0, 176 bytes long.
    10 Data: <                > 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00
    11Object dump complete.
    

    But so does .\test_bitcoin.exe -t addrman_tests.cpp

    0{22304} normal block at 0x000002B817860D10, 16 bytes long.
    1 Data: < T`             > 80 54 60 17 B8 02 00 00 00 00 00 00 00 00 00 00
    2{22303} normal block at 0x000002B817860040, 16 bytes long.
    3 Data: <XT`             > 58 54 60 17 B8 02 00 00 00 00 00 00 00 00 00 00
    4{22302} normal block at 0x000002B8175E61D0, 56 bytes long.
    5 Data: < a^      a^     > D0 61 5E 17 B8 02 00 00 D0 61 5E 17 B8 02 00 00
    6{22301} normal block at 0x000002B817605400, 176 bytes long.
    7 Data: <                > 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00
    8Object dump complete.
    

    Probably coming from boost itself.

  6. NicolasDorier commented at 8:18 am on February 1, 2019: contributor
    Closing this… it is probably a problem from boost…
  7. NicolasDorier closed this on Feb 1, 2019

  8. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-31 03:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me