Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-8104

Fix memory leaks noted by ASAN

      I ran a verify-only pass of test_tiered_abort -T 12 -v (see WT-8103) and after successful verification of the data, ASAN reported a bunch of memory leaks when the process exited. They are:

      723708 records verified
      
      =================================================================
      ==23310==ERROR: LeakSanitizer: detected memory leaks
      
      Direct leak of 120 byte(s) in 1 object(s) allocated from:
          #0 0x4c761a in calloc (/mnt/data0/sue/wt.7957/build_posix/test/csuite/test_tiered_abort+0x4c761a)
          #1 0x7f44503f5d7a  (<unknown module>)
          #2 0x87ddc4 in __wt_tiered_bucket_config /mnt/data0/sue/wt.7957/build_posix/../src/tiered/tiered_config.c:126:5
          #3 0x87fa89 in __wt_tiered_conn_config /mnt/data0/sue/wt.7957/build_posix/../src/tiered/tiered_config.c:164:9
          #4 0x513793 in wiredtiger_open /mnt/data0/sue/wt.7957/build_posix/../src/conn/conn_api.c:2830:5
          #5 0x4f7f10 in main /mnt/data0/sue/wt.7957/build_posix/test/csuite/../../../test/csuite/tiered_abort/main.c:723:5
          #6 0x7f4453ed7b96 in __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310
      
      Direct leak of 45 byte(s) in 1 object(s) allocated from:
          #0 0x4c7423 in __interceptor_malloc (/mnt/data0/sue/wt.7957/build_posix/test/csuite/test_tiered_abort+0x4c7423)
          #1 0x501694 in dmalloc /mnt/data0/sue/wt.7957/build_posix/test/utility/../../../test/utility/misc.c:401:14
          #2 0x5033ed in testutil_parse_opts /mnt/data0/sue/wt.7957/build_posix/test/utility/../../../test/utility/parse_opts.c:137:32
          #3 0x4f73ba in main /mnt/data0/sue/wt.7957/build_posix/test/csuite/../../../test/csuite/tiered_abort/main.c:628:5
          #4 0x7f4453ed7b96 in __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310
      
      Direct leak of 35 byte(s) in 1 object(s) allocated from:
          #0 0x4c7423 in __interceptor_malloc (/mnt/data0/sue/wt.7957/build_posix/test/csuite/test_tiered_abort+0x4c7423)
          #1 0x501694 in dmalloc /mnt/data0/sue/wt.7957/build_posix/test/utility/../../../test/utility/misc.c:401:14
          #2 0x503278 in testutil_parse_opts /mnt/data0/sue/wt.7957/build_posix/test/utility/../../../test/utility/parse_opts.c:129:22
          #3 0x4f73ba in main /mnt/data0/sue/wt.7957/build_posix/test/csuite/../../../test/csuite/tiered_abort/main.c:628:5
          #4 0x7f4453ed7b96 in __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310
      
      Direct leak of 33 byte(s) in 1 object(s) allocated from:
          #0 0x4c7423 in __interceptor_malloc (/mnt/data0/sue/wt.7957/build_posix/test/csuite/test_tiered_abort+0x4c7423)
          #1 0x501694 in dmalloc /mnt/data0/sue/wt.7957/build_posix/test/utility/../../../test/utility/misc.c:401:14
          #2 0x503569 in testutil_parse_opts /mnt/data0/sue/wt.7957/build_posix/test/utility/../../../test/utility/parse_opts.c:142:17
          #3 0x4f73ba in main /mnt/data0/sue/wt.7957/build_posix/test/csuite/../../../test/csuite/tiered_abort/main.c:628:5
          #4 0x7f4453ed7b96 in __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310
      
      Direct leak of 4 byte(s) in 1 object(s) allocated from:
          #0 0x4c7423 in __interceptor_malloc (/mnt/data0/sue/wt.7957/build_posix/test/csuite/test_tiered_abort+0x4c7423)
          #1 0x6ebf7e in __wt_malloc /mnt/data0/sue/wt.7957/build_posix/../src/os_common/os_alloc.c:81:14
          #2 0x6ed97d in __wt_strndup /mnt/data0/sue/wt.7957/build_posix/../src/os_common/os_alloc.c:264:5
          #3 0x87d966 in __wt_tiered_bucket_config /mnt/data0/sue/wt.7957/build_posix/../src/tiered/tiered_config.c:120:5
          #4 0x87fa89 in __wt_tiered_conn_config /mnt/data0/sue/wt.7957/build_posix/../src/tiered/tiered_config.c:164:9
          #5 0x513793 in wiredtiger_open /mnt/data0/sue/wt.7957/build_posix/../src/conn/conn_api.c:2830:5
          #6 0x4f7f10 in main /mnt/data0/sue/wt.7957/build_posix/test/csuite/../../../test/csuite/tiered_abort/main.c:723:5
          #7 0x7f4453ed7b96 in __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310
      
      Direct leak of 1 byte(s) in 1 object(s) allocated from:
          #0 0x4c7423 in __interceptor_malloc (/mnt/data0/sue/wt.7957/build_posix/test/csuite/test_tiered_abort+0x4c7423)
          #1 0x6ebf7e in __wt_malloc /mnt/data0/sue/wt.7957/build_posix/../src/os_common/os_alloc.c:81:14
          #2 0x6ed97d in __wt_strndup /mnt/data0/sue/wt.7957/build_posix/../src/os_common/os_alloc.c:264:5
          #3 0x87da5b in __wt_tiered_bucket_config /mnt/data0/sue/wt.7957/build_posix/../src/tiered/tiered_config.c:121:5
          #4 0x87fa89 in __wt_tiered_conn_config /mnt/data0/sue/wt.7957/build_posix/../src/tiered/tiered_config.c:164:9
          #5 0x513793 in wiredtiger_open /mnt/data0/sue/wt.7957/build_posix/../src/conn/conn_api.c:2830:5
          #6 0x4f7f10 in main /mnt/data0/sue/wt.7957/build_posix/test/csuite/../../../test/csuite/tiered_abort/main.c:723:5
          #7 0x7f4453ed7b96 in __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310
      
      Indirect leak of 15 byte(s) in 1 object(s) allocated from:
          #0 0x4c7423 in __interceptor_malloc (/mnt/data0/sue/wt.7957/build_posix/test/csuite/test_tiered_abort+0x4c7423)
          #1 0x7f44503f758f  (<unknown module>)
          #2 0x7f44503f62d5  (<unknown module>)
          #3 0x87ddc4 in __wt_tiered_bucket_config /mnt/data0/sue/wt.7957/build_posix/../src/tiered/tiered_config.c:126:5
          #4 0x87fa89 in __wt_tiered_conn_config /mnt/data0/sue/wt.7957/build_posix/../src/tiered/tiered_config.c:164:9
          #5 0x513793 in wiredtiger_open /mnt/data0/sue/wt.7957/build_posix/../src/conn/conn_api.c:2830:5
          #6 0x4f7f10 in main /mnt/data0/sue/wt.7957/build_posix/test/csuite/../../../test/csuite/tiered_abort/main.c:723:5
          #7 0x7f4453ed7b96 in __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310
      
      Indirect leak of 9 byte(s) in 1 object(s) allocated from:
          #0 0x4c7423 in __interceptor_malloc (/mnt/data0/sue/wt.7957/build_posix/test/csuite/test_tiered_abort+0x4c7423)
          #1 0x7f44503f758f  (<unknown module>)
          #2 0x7f44503f6078  (<unknown module>)
          #3 0x87ddc4 in __wt_tiered_bucket_config /mnt/data0/sue/wt.7957/build_posix/../src/tiered/tiered_config.c:126:5
          #4 0x87fa89 in __wt_tiered_conn_config /mnt/data0/sue/wt.7957/build_posix/../src/tiered/tiered_config.c:164:9
          #5 0x513793 in wiredtiger_open /mnt/data0/sue/wt.7957/build_posix/../src/conn/conn_api.c:2830:5
          #6 0x4f7f10 in main /mnt/data0/sue/wt.7957/build_posix/test/csuite/../../../test/csuite/tiered_abort/main.c:723:5
          #7 0x7f4453ed7b96 in __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310
      
      Indirect leak of 1 byte(s) in 1 object(s) allocated from:
          #0 0x4b1d70 in strdup (/mnt/data0/sue/wt.7957/build_posix/test/csuite/test_tiered_abort+0x4b1d70)
          #1 0x7f44503f5e8c  (<unknown module>)
          #2 0x87ddc4 in __wt_tiered_bucket_config /mnt/data0/sue/wt.7957/build_posix/../src/tiered/tiered_config.c:126:5
          #3 0x87fa89 in __wt_tiered_conn_config /mnt/data0/sue/wt.7957/build_posix/../src/tiered/tiered_config.c:164:9
          #4 0x513793 in wiredtiger_open /mnt/data0/sue/wt.7957/build_posix/../src/conn/conn_api.c:2830:5
          #5 0x4f7f10 in main /mnt/data0/sue/wt.7957/build_posix/test/csuite/../../../test/csuite/tiered_abort/main.c:723:5
          #6 0x7f4453ed7b96 in __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310
      
      SUMMARY: AddressSanitizer: 263 byte(s) leaked in 9 allocation(s).
      

            Assignee:
            donald.anderson@mongodb.com Donald Anderson
            Reporter:
            sue.loverso@mongodb.com Susan LoVerso
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: