Memory leaks? #15311

issue NicolasDorier opened 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 ,

    *** No errors detected
    Detected memory leaks!
    Dumping objects ->
    {56914750} normal block at 0x00000267E70E47D0, 24 bytes long.
     Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    {56914749} normal block at 0x00000267F5F11BE0, 9 bytes long.
     Data: <         > 09 00 00 00 00 00 00 00 00
    {56914748} normal block at 0x00000267E70E3A50, 28 bytes long.
     Data: <         `      > 1C 00 00 00 00 00 00 00 A1 60 C2 91 00 00 00 00
    {56914747} normal block at 0x00000267E8174D00, 216 bytes long.
     Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    {56775890} normal block at 0x00000267E70E8370, 24 bytes long.
     Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    {56775889} normal block at 0x00000267F5F0B6A0, 9 bytes long.
     Data: <         > 09 00 00 00 00 00 00 00 00
    {56775888} normal block at 0x00000267E70E8DF0, 28 bytes long.
     Data: <                > 1C 00 00 00 00 00 00 00 D2 9D 15 9A 00 00 00 00
    {56775887} normal block at 0x00000267E8175960, 216 bytes long.
     Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    {56750259} normal block at 0x00000267E70E7DD0, 24 bytes long.
     Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    {56750258} normal block at 0x00000267F5F13EE0, 9 bytes long.
     Data: <         > 09 00 00 00 00 00 00 00 00
    {56750257} normal block at 0x00000267E70E7AD0, 28 bytes long.
     Data: <                > 1C 00 00 00 00 00 00 00 BC 12 03 88 00 00 00 00
    {56750256} normal block at 0x00000267E05105E0, 216 bytes long.
     Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    {56118853} normal block at 0x00000267E60D98E0, 24 bytes long.
     Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    {56118852} normal block at 0x00000267F5F12BD0, 9 bytes long.
     Data: <         > 09 00 00 00 00 00 00 00 00
    {56118851} normal block at 0x00000267E60D9580, 28 bytes long.
     Data: <        Fg|     > 1C 00 00 00 00 00 00 00 46 67 7C 95 00 00 00 00
    {56118850} normal block at 0x00000267E0510820, 216 bytes long.
     Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    {55892545} normal block at 0x00000267E7BD5460, 24 bytes long.
     Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    {55892544} normal block at 0x00000267F5DF11F0, 9 bytes long.
     Data: <         > 09 00 00 00 00 00 00 00 00
    {55892543} normal block at 0x00000267E7BD3840, 28 bytes long.
     Data: <                > 1C 00 00 00 00 00 00 00 EE DF 96 A6 00 00 00 00
    {55892542} normal block at 0x00000267E050FBC0, 216 bytes long.
     Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    {46617917} normal block at 0x00000267E7BEA760, 24 bytes long.
     Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    {46617916} normal block at 0x00000267E06858F0, 9 bytes long.
     Data: <         > 09 00 00 00 00 00 00 00 00
    {46617915} normal block at 0x00000267E7BEA700, 28 bytes long.
     Data: <                > 1C 00 00 00 00 00 00 00 CA D1 E8 A2 00 00 00 00
    {46617914} normal block at 0x00000267E05103A0, 216 bytes long.
     Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    {46498875} normal block at 0x00000267E7BEA280, 24 bytes long.
     Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    {46498874} normal block at 0x00000267E7EE74D0, 9 bytes long.
     Data: <         > 09 00 00 00 00 00 00 00 00
    {46498873} normal block at 0x00000267E7BE9800, 28 bytes long.
     Data: <        8       > 1C 00 00 00 00 00 00 00 38 C3 01 9B 00 00 00 00
    {46498872} normal block at 0x00000267E0510160, 216 bytes long.
     Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    {39137074} normal block at 0x00000267E7BE9740, 24 bytes long.
     Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    {39137073} normal block at 0x00000267E74A5A70, 9 bytes long.
     Data: <         > 09 00 00 00 00 00 00 00 00
    {39137072} normal block at 0x00000267E7BEA820, 28 bytes long.
     Data: <        t       > 1C 00 00 00 00 00 00 00 74 89 FC 9C 00 00 00 00
    {39137071} normal block at 0x00000267E0510940, 216 bytes long.
     Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    {38482049} normal block at 0x00000267E7BE9B00, 24 bytes long.
     Data: <                > 18 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00
    {38482048} normal block at 0x00000267E7E9BDC0, 9 bytes long.
     Data: <         > 09 00 00 00 00 00 00 00 00
    {38482047} normal block at 0x00000267E7BEA2E0, 28 bytes long.
     Data: <        C"A     > 1C 00 00 00 00 00 00 00 43 22 41 85 00 00 00 00
    {38482046} normal block at 0x00000267E0510280, 216 bytes long.
     Data: <        M       > D8 00 00 00 00 00 00 00 4D 00 02 00 01 00 00 00
    {2180950} normal block at 0x00000267E0591F70, 8 bytes long.
     Data: <        > A0 1D E7 B7 F7 7F 00 00
    {2180949} normal block at 0x00000267E0591F20, 8 bytes long.
     Data: < p      > A0 70 BA B7 F7 7F 00 00
    {22128} normal block at 0x00000267E0556A50, 16 bytes long.
     Data: <  R g           > E0 BB 52 E0 67 02 00 00 00 00 00 00 00 00 00 00
    {22127} normal block at 0x00000267E0557450, 16 bytes long.
     Data: <  R g           > B8 BB 52 E0 67 02 00 00 00 00 00 00 00 00 00 00
    {22126} normal block at 0x00000267E0523690, 56 bytes long.
     Data: < 6R g    6R g   > 90 36 52 E0 67 02 00 00 90 36 52 E0 67 02 00 00
    {22125} normal block at 0x00000267E052BB60, 176 bytes long.
     Data: <                > 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00
    Object 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

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

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

    {22304} normal block at 0x000002B817860D10, 16 bytes long.
     Data: < T`             > 80 54 60 17 B8 02 00 00 00 00 00 00 00 00 00 00
    {22303} normal block at 0x000002B817860040, 16 bytes long.
     Data: <XT`             > 58 54 60 17 B8 02 00 00 00 00 00 00 00 00 00 00
    {22302} normal block at 0x000002B8175E61D0, 56 bytes long.
     Data: < a^      a^     > D0 61 5E 17 B8 02 00 00 D0 61 5E 17 B8 02 00 00
    {22301} normal block at 0x000002B817605400, 176 bytes long.
     Data: <                > 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00
    Object 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: 2026-05-03 06:14 UTC

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