Skip to content

Memory leak on master #5042

@bgaff

Description

@bgaff

I just pulled down a fresh copy of master, did nothing special:

autoreconf -i
./configure --prefix=/tmp/ats
make -j12 && make install

/tmp/ats/bin/traffic_server
ab -n 10000000 -c 1000 http://127.0.0.1:8080/

I made no changes to any config files other to to enable the memory debug output every 30 seconds to see where it was going. And the memory stats are below, but basically it looks like Http1 client session allocators are leaking pretty badly.

     Allocated      |        In-Use      | Type Size  |   Free List Name
--------------------|--------------------|------------|----------------------------------
                  0 |                  0 |    2097152 | memory/ioBufAllocator[14]
                  0 |                  0 |    1048576 | memory/ioBufAllocator[13]
                  0 |                  0 |     524288 | memory/ioBufAllocator[12]
                  0 |                  0 |     262144 | memory/ioBufAllocator[11]
                  0 |                  0 |     131072 | memory/ioBufAllocator[10]
                  0 |                  0 |      65536 | memory/ioBufAllocator[9]
                  0 |                  0 |      32768 | memory/ioBufAllocator[8]
                  0 |                  0 |      16384 | memory/ioBufAllocator[7]
            5242880 |                  0 |       8192 | memory/ioBufAllocator[6]
         9093251072 |         9091760128 |       4096 | memory/ioBufAllocator[5]
                  0 |                  0 |       2048 | memory/ioBufAllocator[4]
                  0 |                  0 |       1024 | memory/ioBufAllocator[3]
                  0 |                  0 |        512 | memory/ioBufAllocator[2]
                  0 |                  0 |        256 | memory/ioBufAllocator[1]
                  0 |                  0 |        128 | memory/ioBufAllocator[0]
              49152 |               3456 |         96 | memory/eventAllocator
          177639120 |          177610240 |         80 | memory/mutexAllocator
          142082048 |          142078912 |         64 | memory/ioBlockAllocator
          106561440 |          106559184 |         48 | memory/ioDataAllocator
          532815360 |          532792800 |        240 | memory/ioAllocator
                  0 |                  0 |        448 | memory/socksAllocator
                  0 |                  0 |        144 | memory/udpReadContAllocator
                  0 |                  0 |        160 | memory/udpPacketAllocator
             917504 |                  0 |        896 | memory/netVCAllocator
                  0 |                  0 |        128 | memory/UDPIOEventAllocator
                  0 |                  0 |       1072 | memory/sslNetVCAllocator
                  0 |                  0 |         64 | memory/RamCacheLRUEntry
                  0 |                  0 |         96 | memory/RamCacheCLFUSEntry
                  0 |                  0 |        160 | memory/openDirEntry
                  0 |                  0 |         48 | memory/evacuationKey
                  0 |                  0 |         64 | memory/cacheRemoveCont
                  0 |                  0 |         96 | memory/evacuationBlock
                  0 |                  0 |        960 | memory/cacheVConnection
                  0 |                  0 |         16 | memory/DNSRequestDataAllocator
                  0 |                  0 |      29584 | memory/dnsBufAllocator
                  0 |                  0 |       1296 | memory/dnsEntryAllocator
                  0 |                  0 |         16 | memory/expiryQueueEntry
                  0 |                  0 |         64 | memory/refCountCacheHashingValueAllocator
                  0 |                  0 |        112 | memory/hostDBFileContAllocator
             296960 |               2320 |       2320 | memory/hostDBContAllocator
                  0 |                  0 |        128 | memory/OneWayTunnelAllocator
            3407872 |            3096576 |       2048 | memory/hdrStrHeap
            3670016 |            3096576 |       2048 | memory/hdrHeap
                  0 |                  0 |        256 | memory/httpCacheAltAllocator
                  0 |                  0 |       3392 | memory/http2ClientSessionAllocator
                  0 |                  0 |       3120 | memory/http2StreamAllocator
                  0 |                  0 |        144 | memory/RemapPluginsAlloc
                  0 |                  0 |        208 | memory/http1ServerSessionAllocator
           13885440 |                  0 |       9040 | memory/httpSMAllocator
         2308491120 |         2308454720 |       1040 | memory/http1ClientSessionAllocator
                  0 |                  0 |        144 | memory/socksProxyAllocator
                  0 |                  0 |         32 | memory/MIMEFieldSDKHandle
                  0 |                  0 |        288 | memory/INKVConnAllocator
                  0 |                  0 |        144 | memory/INKContAllocator
                  0 |                  0 |         32 | memory/apiHookAllocator
                  0 |                  0 |        528 | memory/FetchSMAllocator
            1703936 |                  0 |       1024 | memory/ArenaBlock
        12390013920 |        12365454912 |            | TOTAL

And the ASAN output for this: https://paste.apache.org/6ttx

@zizhong bisected and it seems to point commit a37f0d9

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions