-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/port based sni filtering #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bneradt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
Let's add the ability to specify a single port without doing a range.
iocore/net/SSLSNIConfig.h
Outdated
| void set_regex_name(const std::string ®ex_name); | ||
|
|
||
| using port_range_t = swoc::DiscreteRange<long>; | ||
| port_range_t ports{1, 65535}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's create a define for this...or does ATS have one already maybe?
constexpr uint16_t MAX_PORT_VALUE = std::numeric_limits<uint16_t>::max();
iocore/net/SSLSNIConfig.h
Outdated
| void set_glob_name(std::string name); | ||
| void set_regex_name(const std::string ®ex_name); | ||
|
|
||
| using port_range_t = swoc::DiscreteRange<long>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make the type uint16_t?
iocore/net/SSLSNIConfig.h
Outdated
| struct NamedElement { | ||
| NamedElement() {} | ||
|
|
||
| NamedElement(const NamedElement &other) = delete; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NamedElement const &other
iocore/net/SSLSNIConfig.h
Outdated
| */ | ||
| int load_sni_config(); | ||
| std::pair<const ActionVector *, ActionItem::Context> get(std::string_view servername) const; | ||
| std::pair<const ActionVector *, ActionItem::Context> get(std::string_view servername, long conn_port) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe uint16_t dest_port?
iocore/net/TLSSNISupport.cc
Outdated
| SNIConfig::scoped_config params; | ||
| if (const auto &actions = params->get({servername, std::strlen(servername)}); !actions.first) { | ||
| SSLNetVConnection *ssl_vc{dynamic_cast<SSLNetVConnection *>(this)}; | ||
| ink_assert(ssl_vc != nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment why we assume the dynamic_cast should always "work".
| SECTION("The config matches an SNI for someport:8080") | ||
| { | ||
| auto const &actions{params.get({"someport.com", std::strlen("someport.com")}, 8080)}; | ||
| REQUIRE(actions.first); | ||
| REQUIRE(actions.first->size() == 1); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well add the other extreme too, the 65535 end.
| - fqdn: someport.com:1-433 | ||
| - fqdn: someport.com:8080-65535 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a distinguishing attribute under each of these to make sure that each range is matching to the expected set of attributes. Maybe use http2 since that's a simple on/off value?
| @@ -0,0 +1,67 @@ | |||
| /** @file | |||
| Catch based unit tests for YamlSNIConfig | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe:
/** @file
Catch main initialization for iocore/net unit tests.
*/| - client-request: | ||
| method: "GET" | ||
| version: "1.1" | ||
| url: example.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably make these a path:
url: /a/path/conn_refused| - client-request: | ||
| method: "GET" | ||
| version: "1.1" | ||
| url: example.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a path:
url: /a/path/conn_accepted
bneradt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
Let's add the ability to specify a single port without doing a range.
98ee429 to
57eb510
Compare
57eb510 to
a650c9d
Compare
Fix the `make check` failure with the following output by changing to .gold which meets our license exclusion regex rules: Printing headers for text files without a valid license header... ===================================================== == File: ./tests/gold_tests/records/gold/renamed_records.out ===================================================== ``` ┌■ 8 Renamed records: └┬──» #1 : proxy.config.output.logfile -> proxy.config.output.logfile.name ├──» #2 : proxy.config.exec_thread.autoconfig -> proxy.config.exec_thread.autoconfig.enabled ├──» #3 : proxy.config.hostdb -> proxy.config.hostdb.enabled ├──» #4 : proxy.config.tunnel.prewarm -> proxy.config.tunnel.prewarm.enabled ├──» #5 : proxy.config.ssl.origin_session_cache -> proxy.config.ssl.origin_session_cache.enabled ├──» #6 : proxy.config.ssl.session_cache -> proxy.config.ssl.session_cache.value ├──» #7 : proxy.config.ssl.TLSv1_3 -> proxy.config.ssl.TLSv1_3.enabled └──» #8 : proxy.config.ssl.client.TLSv1_3 -> proxy.config.ssl.client.TLSv1_3.enabled ```
Fix the `make check` failure with the following output by changing to .gold which meets our license exclusion regex rules: Printing headers for text files without a valid license header... ===================================================== == File: ./tests/gold_tests/records/gold/renamed_records.out ===================================================== ``` ┌■ 8 Renamed records: └┬──» #1 : proxy.config.output.logfile -> proxy.config.output.logfile.name ├──» #2 : proxy.config.exec_thread.autoconfig -> proxy.config.exec_thread.autoconfig.enabled ├──» #3 : proxy.config.hostdb -> proxy.config.hostdb.enabled ├──» #4 : proxy.config.tunnel.prewarm -> proxy.config.tunnel.prewarm.enabled ├──» #5 : proxy.config.ssl.origin_session_cache -> proxy.config.ssl.origin_session_cache.enabled ├──» #6 : proxy.config.ssl.session_cache -> proxy.config.ssl.session_cache.value ├──» #7 : proxy.config.ssl.TLSv1_3 -> proxy.config.ssl.TLSv1_3.enabled └──» #8 : proxy.config.ssl.client.TLSv1_3 -> proxy.config.ssl.client.TLSv1_3.enabled ```
357fd92 to
57bd86f
Compare
This groups together all the classes with SNI support under a common class, so that we can downcast TLSSNISupport objects to that base class.
This reverts commit 4f8130b.
This is to allow TLSSNISupport to get the local inbound port for matching SNIs.
725e273 to
76dcee7
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community. |
ATS seems to not be able to keep up with this. Killing ATS after the
dropped messages also triggers ASan to report the following leak:
=================================================================
==37422==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 19 byte(s) in 2 object(s) allocated from:
#0 0xffff956a57b0 in malloc (/lib64/libasan.so.8+0xc57b0) (BuildId: 3109905b64795755dad05d7bb29ad23633a06660)
#1 0x9218e4 in ats_malloc(unsigned long) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/tscore/ink_memory.cc:65
#2 0xc215d4 in Http2ConnectionState::rcv_headers_frame(Http2Frame const&) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2ConnectionState.cc:421
#3 0xc2d5d0 in Http2ConnectionState::rcv_frame(Http2Frame const*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2ConnectionState.cc:1392
#4 0xc1841c in Http2CommonSession::do_complete_frame_read() /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2CommonSession.cc:325
#5 0xc19434 in Http2CommonSession::do_process_frame_read(int, VIO*, bool) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2CommonSession.cc:387
#6 0xc16dec in Http2CommonSession::state_start_frame_read(int, void*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2CommonSession.cc:237
#7 0xc6819c in Http2ServerSession::main_event_handler(int, void*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2ServerSession.cc:184
#8 0x8a436c in Continuation::handleEvent(int, void*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/include/iocore/eventsystem/Continuation.h:228
#9 0x1233998 in EThread::process_event(Event*, int) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/UnixEThread.cc:162
#10 0x12346c4 in EThread::execute_regular() /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/UnixEThread.cc:269
apache#11 0x1234ffc in EThread::execute() /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/UnixEThread.cc:348
apache#12 0x1231824 in spawn_thread_internal /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/Thread.cc:68
apache#13 0xffff94470580 in start_thread (/lib64/libc.so.6+0x90580) (BuildId: 9a495e6bf2a1c83898b8251394ab94c8ad2d15d4)
apache#14 0xffff944dfc48 in thread_start (/lib64/libc.so.6+0xffc48) (BuildId: 9a495e6bf2a1c83898b8251394ab94c8ad2d15d4)
ATS seems to not be able to keep up with this. Killing ATS after the
dropped messages also triggers ASan to report the following leak:
=================================================================
==37422==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 19 byte(s) in 2 object(s) allocated from:
#0 0xffff956a57b0 in malloc (/lib64/libasan.so.8+0xc57b0) (BuildId: 3109905b64795755dad05d7bb29ad23633a06660)
#1 0x9218e4 in ats_malloc(unsigned long) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/tscore/ink_memory.cc:65
#2 0xc215d4 in Http2ConnectionState::rcv_headers_frame(Http2Frame const&) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2ConnectionState.cc:421
#3 0xc2d5d0 in Http2ConnectionState::rcv_frame(Http2Frame const*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2ConnectionState.cc:1392
#4 0xc1841c in Http2CommonSession::do_complete_frame_read() /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2CommonSession.cc:325
#5 0xc19434 in Http2CommonSession::do_process_frame_read(int, VIO*, bool) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2CommonSession.cc:387
#6 0xc16dec in Http2CommonSession::state_start_frame_read(int, void*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2CommonSession.cc:237
#7 0xc6819c in Http2ServerSession::main_event_handler(int, void*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2ServerSession.cc:184
#8 0x8a436c in Continuation::handleEvent(int, void*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/include/iocore/eventsystem/Continuation.h:228
#9 0x1233998 in EThread::process_event(Event*, int) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/UnixEThread.cc:162
#10 0x12346c4 in EThread::execute_regular() /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/UnixEThread.cc:269
apache#11 0x1234ffc in EThread::execute() /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/UnixEThread.cc:348
apache#12 0x1231824 in spawn_thread_internal /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/Thread.cc:68
apache#13 0xffff94470580 in start_thread (/lib64/libc.so.6+0x90580) (BuildId: 9a495e6bf2a1c83898b8251394ab94c8ad2d15d4)
apache#14 0xffff944dfc48 in thread_start (/lib64/libc.so.6+0xffc48) (BuildId: 9a495e6bf2a1c83898b8251394ab94c8ad2d15d4)
ATS seems to not be able to keep up with this. Killing ATS after the
dropped messages also triggers ASan to report the following leak:
=================================================================
==37422==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 19 byte(s) in 2 object(s) allocated from:
#0 0xffff956a57b0 in malloc (/lib64/libasan.so.8+0xc57b0) (BuildId: 3109905b64795755dad05d7bb29ad23633a06660)
#1 0x9218e4 in ats_malloc(unsigned long) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/tscore/ink_memory.cc:65
#2 0xc215d4 in Http2ConnectionState::rcv_headers_frame(Http2Frame const&) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2ConnectionState.cc:421
#3 0xc2d5d0 in Http2ConnectionState::rcv_frame(Http2Frame const*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2ConnectionState.cc:1392
#4 0xc1841c in Http2CommonSession::do_complete_frame_read() /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2CommonSession.cc:325
#5 0xc19434 in Http2CommonSession::do_process_frame_read(int, VIO*, bool) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2CommonSession.cc:387
#6 0xc16dec in Http2CommonSession::state_start_frame_read(int, void*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2CommonSession.cc:237
#7 0xc6819c in Http2ServerSession::main_event_handler(int, void*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2ServerSession.cc:184
#8 0x8a436c in Continuation::handleEvent(int, void*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/include/iocore/eventsystem/Continuation.h:228
#9 0x1233998 in EThread::process_event(Event*, int) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/UnixEThread.cc:162
#10 0x12346c4 in EThread::execute_regular() /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/UnixEThread.cc:269
apache#11 0x1234ffc in EThread::execute() /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/UnixEThread.cc:348
apache#12 0x1231824 in spawn_thread_internal /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/Thread.cc:68
apache#13 0xffff94470580 in start_thread (/lib64/libc.so.6+0x90580) (BuildId: 9a495e6bf2a1c83898b8251394ab94c8ad2d15d4)
apache#14 0xffff944dfc48 in thread_start (/lib64/libc.so.6+0xffc48) (BuildId: 9a495e6bf2a1c83898b8251394ab94c8ad2d15d4)
ATS seems to not be able to keep up with this. Killing ATS after the
dropped messages also triggers ASan to report the following leak:
=================================================================
==37422==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 19 byte(s) in 2 object(s) allocated from:
#0 0xffff956a57b0 in malloc (/lib64/libasan.so.8+0xc57b0) (BuildId: 3109905b64795755dad05d7bb29ad23633a06660)
#1 0x9218e4 in ats_malloc(unsigned long) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/tscore/ink_memory.cc:65
#2 0xc215d4 in Http2ConnectionState::rcv_headers_frame(Http2Frame const&) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2ConnectionState.cc:421
#3 0xc2d5d0 in Http2ConnectionState::rcv_frame(Http2Frame const*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2ConnectionState.cc:1392
#4 0xc1841c in Http2CommonSession::do_complete_frame_read() /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2CommonSession.cc:325
#5 0xc19434 in Http2CommonSession::do_process_frame_read(int, VIO*, bool) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2CommonSession.cc:387
#6 0xc16dec in Http2CommonSession::state_start_frame_read(int, void*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2CommonSession.cc:237
#7 0xc6819c in Http2ServerSession::main_event_handler(int, void*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/proxy/http2/Http2ServerSession.cc:184
#8 0x8a436c in Continuation::handleEvent(int, void*) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/include/iocore/eventsystem/Continuation.h:228
#9 0x1233998 in EThread::process_event(Event*, int) /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/UnixEThread.cc:162
#10 0x12346c4 in EThread::execute_regular() /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/UnixEThread.cc:269
apache#11 0x1234ffc in EThread::execute() /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/UnixEThread.cc:348
apache#12 0x1231824 in spawn_thread_internal /home/bneradt/src/ts_asf_master_fix_grpc_memory_leak/src/iocore/eventsystem/Thread.cc:68
apache#13 0xffff94470580 in start_thread (/lib64/libc.so.6+0x90580) (BuildId: 9a495e6bf2a1c83898b8251394ab94c8ad2d15d4)
apache#14 0xffff944dfc48 in thread_start (/lib64/libc.so.6+0xffc48) (BuildId: 9a495e6bf2a1c83898b8251394ab94c8ad2d15d4)
ASan reports a leak concerning the ImageMagick library for plugins that
link against it. The leak is associated with the ImageMagick library
itself as commenting everything out from the ATS plugin, leaving a bare
TSPluginInit, still results in the leak report. This patch suppresses
the leak report for the library we do not own and for a leak that has
not been seen to be any larger than the initialization bytes associated
with the library.
Here's the leak report this suppression file addresses:
=================================================================
==18362==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 96 byte(s) in 1 object(s) allocated from:
#0 0xffff9cf05218 in calloc (/lib64/libasan.so.8+0xc5218) (BuildId: f2ca9839b9f761d63a77efcab29bcdd4b221f3a9)
#1 0xffff8db8273c (<unknown module>)
#2 0xffff8db81108 (<unknown module>)
#3 0xffff8db811d0 (<unknown module>)
#4 0xffff9d53fee8 in call_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:74
#5 0xffff9d53fee8 in call_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:26
#6 0xffff9d540008 in _dl_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:121
#7 0xffff9d53c68c in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:211
#8 0xffff9d5461c0 in dl_open_worker /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-open.c:829
#9 0xffff9d53c614 in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:237
#10 0xffff9d5465fc in _dl_open /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-open.c:905
apache#11 0xffff9bbfbef4 in dlopen_doit (/lib64/libc.so.6+0x8bef4) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#12 0xffff9d53c614 in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:237
apache#13 0xffff9d53c73c in _dl_catch_error /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:256
apache#14 0xffff9bbfb924 in _dlerror_run (/lib64/libc.so.6+0x8b924) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#15 0xffff9bbfbfec in dlopen@GLIBC_2.17 (/lib64/libc.so.6+0x8bfec) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#16 0xffff9cea7bc4 in __interceptor_dlopen.part.0 (/lib64/libasan.so.8+0x67bc4) (BuildId: f2ca9839b9f761d63a77efcab29bcdd4b221f3a9)
apache#17 0xfdcc88 in plugin_dso_load(char const*, void*&, void*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/proxy/Plugin.cc:104
apache#18 0x8bdab4 in try_loading_plugin /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1019
apache#19 0x8be954 in verify_plugin_helper /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1078
apache#20 0x8beac8 in cmd_verify_global_plugin /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1097
apache#21 0x8bf354 in cmd_mode /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1270
apache#22 0x8c57e0 in main /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:2122
apache#23 0xffff9bba09d8 in __libc_start_call_main (/lib64/libc.so.6+0x309d8) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#24 0xffff9bba0aac in __libc_start_main@@GLIBC_2.34 (/lib64/libc.so.6+0x30aac) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#25 0x89346c in _start (/home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/build/src/traffic_server/traffic_server+0x89346c) (BuildId: d86c4e46554f342afeb32ab378ad7f99940d848a)
Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0xffff9cf057b0 in malloc (/lib64/libasan.so.8+0xc57b0) (BuildId: f2ca9839b9f761d63a77efcab29bcdd4b221f3a9)
#1 0xffff8db826f4 (<unknown module>)
#2 0xffff8db96758 (<unknown module>)
#3 0xffff8db811b0 (<unknown module>)
#4 0xffff9d53fee8 in call_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:74
#5 0xffff9d53fee8 in call_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:26
#6 0xffff9d540008 in _dl_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:121
#7 0xffff9d53c68c in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:211
#8 0xffff9d5461c0 in dl_open_worker /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-open.c:829
#9 0xffff9d53c614 in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:237
#10 0xffff9d5465fc in _dl_open /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-open.c:905
apache#11 0xffff9bbfbef4 in dlopen_doit (/lib64/libc.so.6+0x8bef4) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#12 0xffff9d53c614 in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:237
apache#13 0xffff9d53c73c in _dl_catch_error /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:256
apache#14 0xffff9bbfb924 in _dlerror_run (/lib64/libc.so.6+0x8b924) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#15 0xffff9bbfbfec in dlopen@GLIBC_2.17 (/lib64/libc.so.6+0x8bfec) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#16 0xffff9cea7bc4 in __interceptor_dlopen.part.0 (/lib64/libasan.so.8+0x67bc4) (BuildId: f2ca9839b9f761d63a77efcab29bcdd4b221f3a9)
apache#17 0xfdcc88 in plugin_dso_load(char const*, void*&, void*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/proxy/Plugin.cc:104
apache#18 0x8bdab4 in try_loading_plugin /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1019
apache#19 0x8be954 in verify_plugin_helper /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1078
apache#20 0x8beac8 in cmd_verify_global_plugin /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1097
apache#21 0x8bf354 in cmd_mode /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1270
apache#22 0x8c57e0 in main /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:2122
apache#23 0xffff9bba09d8 in __libc_start_call_main (/lib64/libc.so.6+0x309d8) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#24 0xffff9bba0aac in __libc_start_main@@GLIBC_2.34 (/lib64/libc.so.6+0x30aac) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#25 0x89346c in _start (/home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/build/src/traffic_server/traffic_server+0x89346c) (BuildId: d86c4e46554f342afeb32ab378ad7f99940d848a)
SUMMARY: AddressSanitizer: 104 byte(s) leaked in 2 allocation(s).
ASan reports a leak concerning the ImageMagick library for plugins that
link against it. The leak is associated with the ImageMagick library
itself as commenting everything out from the ATS plugin, leaving a bare
TSPluginInit, still results in the leak report. This patch suppresses
the leak report for the library we do not own and for a leak that has
not been seen to be any larger than the initialization bytes associated
with the library.
Here's the leak report this suppression file addresses:
=================================================================
==18362==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 96 byte(s) in 1 object(s) allocated from:
#0 0xffff9cf05218 in calloc (/lib64/libasan.so.8+0xc5218) (BuildId: f2ca9839b9f761d63a77efcab29bcdd4b221f3a9)
#1 0xffff8db8273c (<unknown module>)
#2 0xffff8db81108 (<unknown module>)
#3 0xffff8db811d0 (<unknown module>)
#4 0xffff9d53fee8 in call_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:74
#5 0xffff9d53fee8 in call_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:26
#6 0xffff9d540008 in _dl_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:121
#7 0xffff9d53c68c in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:211
#8 0xffff9d5461c0 in dl_open_worker /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-open.c:829
#9 0xffff9d53c614 in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:237
#10 0xffff9d5465fc in _dl_open /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-open.c:905
apache#11 0xffff9bbfbef4 in dlopen_doit (/lib64/libc.so.6+0x8bef4) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#12 0xffff9d53c614 in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:237
apache#13 0xffff9d53c73c in _dl_catch_error /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:256
apache#14 0xffff9bbfb924 in _dlerror_run (/lib64/libc.so.6+0x8b924) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#15 0xffff9bbfbfec in dlopen@GLIBC_2.17 (/lib64/libc.so.6+0x8bfec) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#16 0xffff9cea7bc4 in __interceptor_dlopen.part.0 (/lib64/libasan.so.8+0x67bc4) (BuildId: f2ca9839b9f761d63a77efcab29bcdd4b221f3a9)
apache#17 0xfdcc88 in plugin_dso_load(char const*, void*&, void*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/proxy/Plugin.cc:104
apache#18 0x8bdab4 in try_loading_plugin /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1019
apache#19 0x8be954 in verify_plugin_helper /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1078
apache#20 0x8beac8 in cmd_verify_global_plugin /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1097
apache#21 0x8bf354 in cmd_mode /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1270
apache#22 0x8c57e0 in main /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:2122
apache#23 0xffff9bba09d8 in __libc_start_call_main (/lib64/libc.so.6+0x309d8) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#24 0xffff9bba0aac in __libc_start_main@@GLIBC_2.34 (/lib64/libc.so.6+0x30aac) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#25 0x89346c in _start (/home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/build/src/traffic_server/traffic_server+0x89346c) (BuildId: d86c4e46554f342afeb32ab378ad7f99940d848a)
Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0xffff9cf057b0 in malloc (/lib64/libasan.so.8+0xc57b0) (BuildId: f2ca9839b9f761d63a77efcab29bcdd4b221f3a9)
#1 0xffff8db826f4 (<unknown module>)
#2 0xffff8db96758 (<unknown module>)
#3 0xffff8db811b0 (<unknown module>)
#4 0xffff9d53fee8 in call_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:74
#5 0xffff9d53fee8 in call_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:26
#6 0xffff9d540008 in _dl_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:121
#7 0xffff9d53c68c in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:211
#8 0xffff9d5461c0 in dl_open_worker /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-open.c:829
#9 0xffff9d53c614 in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:237
#10 0xffff9d5465fc in _dl_open /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-open.c:905
apache#11 0xffff9bbfbef4 in dlopen_doit (/lib64/libc.so.6+0x8bef4) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#12 0xffff9d53c614 in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:237
apache#13 0xffff9d53c73c in _dl_catch_error /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:256
apache#14 0xffff9bbfb924 in _dlerror_run (/lib64/libc.so.6+0x8b924) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#15 0xffff9bbfbfec in dlopen@GLIBC_2.17 (/lib64/libc.so.6+0x8bfec) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#16 0xffff9cea7bc4 in __interceptor_dlopen.part.0 (/lib64/libasan.so.8+0x67bc4) (BuildId: f2ca9839b9f761d63a77efcab29bcdd4b221f3a9)
apache#17 0xfdcc88 in plugin_dso_load(char const*, void*&, void*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/proxy/Plugin.cc:104
apache#18 0x8bdab4 in try_loading_plugin /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1019
apache#19 0x8be954 in verify_plugin_helper /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1078
apache#20 0x8beac8 in cmd_verify_global_plugin /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1097
apache#21 0x8bf354 in cmd_mode /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1270
apache#22 0x8c57e0 in main /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:2122
apache#23 0xffff9bba09d8 in __libc_start_call_main (/lib64/libc.so.6+0x309d8) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#24 0xffff9bba0aac in __libc_start_main@@GLIBC_2.34 (/lib64/libc.so.6+0x30aac) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#25 0x89346c in _start (/home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/build/src/traffic_server/traffic_server+0x89346c) (BuildId: d86c4e46554f342afeb32ab378ad7f99940d848a)
SUMMARY: AddressSanitizer: 104 byte(s) leaked in 2 allocation(s).
ASan reports a leak concerning the ImageMagick library for plugins that
link against it. The leak is associated with the ImageMagick library
itself as commenting everything out from the ATS plugin, leaving a bare
TSPluginInit, still results in the leak report. This patch suppresses
the leak report for the library we do not own and for a leak that has
not been seen to be any larger than the initialization bytes associated
with the library.
Here's the leak report this suppression file addresses:
=================================================================
==18362==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 96 byte(s) in 1 object(s) allocated from:
#0 0xffff9cf05218 in calloc (/lib64/libasan.so.8+0xc5218) (BuildId: f2ca9839b9f761d63a77efcab29bcdd4b221f3a9)
#1 0xffff8db8273c (<unknown module>)
#2 0xffff8db81108 (<unknown module>)
#3 0xffff8db811d0 (<unknown module>)
#4 0xffff9d53fee8 in call_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:74
#5 0xffff9d53fee8 in call_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:26
#6 0xffff9d540008 in _dl_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:121
#7 0xffff9d53c68c in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:211
#8 0xffff9d5461c0 in dl_open_worker /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-open.c:829
#9 0xffff9d53c614 in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:237
#10 0xffff9d5465fc in _dl_open /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-open.c:905
apache#11 0xffff9bbfbef4 in dlopen_doit (/lib64/libc.so.6+0x8bef4) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#12 0xffff9d53c614 in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:237
apache#13 0xffff9d53c73c in _dl_catch_error /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:256
apache#14 0xffff9bbfb924 in _dlerror_run (/lib64/libc.so.6+0x8b924) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#15 0xffff9bbfbfec in dlopen@GLIBC_2.17 (/lib64/libc.so.6+0x8bfec) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#16 0xffff9cea7bc4 in __interceptor_dlopen.part.0 (/lib64/libasan.so.8+0x67bc4) (BuildId: f2ca9839b9f761d63a77efcab29bcdd4b221f3a9)
apache#17 0xfdcc88 in plugin_dso_load(char const*, void*&, void*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/proxy/Plugin.cc:104
apache#18 0x8bdab4 in try_loading_plugin /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1019
apache#19 0x8be954 in verify_plugin_helper /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1078
apache#20 0x8beac8 in cmd_verify_global_plugin /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1097
apache#21 0x8bf354 in cmd_mode /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1270
apache#22 0x8c57e0 in main /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:2122
apache#23 0xffff9bba09d8 in __libc_start_call_main (/lib64/libc.so.6+0x309d8) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#24 0xffff9bba0aac in __libc_start_main@@GLIBC_2.34 (/lib64/libc.so.6+0x30aac) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#25 0x89346c in _start (/home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/build/src/traffic_server/traffic_server+0x89346c) (BuildId: d86c4e46554f342afeb32ab378ad7f99940d848a)
Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0xffff9cf057b0 in malloc (/lib64/libasan.so.8+0xc57b0) (BuildId: f2ca9839b9f761d63a77efcab29bcdd4b221f3a9)
#1 0xffff8db826f4 (<unknown module>)
#2 0xffff8db96758 (<unknown module>)
#3 0xffff8db811b0 (<unknown module>)
#4 0xffff9d53fee8 in call_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:74
#5 0xffff9d53fee8 in call_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:26
#6 0xffff9d540008 in _dl_init /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-init.c:121
#7 0xffff9d53c68c in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:211
#8 0xffff9d5461c0 in dl_open_worker /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-open.c:829
#9 0xffff9d53c614 in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:237
#10 0xffff9d5465fc in _dl_open /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-open.c:905
apache#11 0xffff9bbfbef4 in dlopen_doit (/lib64/libc.so.6+0x8bef4) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#12 0xffff9d53c614 in __GI__dl_catch_exception /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:237
apache#13 0xffff9d53c73c in _dl_catch_error /usr/src/debug/glibc-2.38-17.fc39.aarch64/elf/dl-catch.c:256
apache#14 0xffff9bbfb924 in _dlerror_run (/lib64/libc.so.6+0x8b924) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#15 0xffff9bbfbfec in dlopen@GLIBC_2.17 (/lib64/libc.so.6+0x8bfec) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#16 0xffff9cea7bc4 in __interceptor_dlopen.part.0 (/lib64/libasan.so.8+0x67bc4) (BuildId: f2ca9839b9f761d63a77efcab29bcdd4b221f3a9)
apache#17 0xfdcc88 in plugin_dso_load(char const*, void*&, void*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/proxy/Plugin.cc:104
apache#18 0x8bdab4 in try_loading_plugin /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1019
apache#19 0x8be954 in verify_plugin_helper /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1078
apache#20 0x8beac8 in cmd_verify_global_plugin /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1097
apache#21 0x8bf354 in cmd_mode /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:1270
apache#22 0x8c57e0 in main /home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/src/traffic_server/traffic_server.cc:2122
apache#23 0xffff9bba09d8 in __libc_start_call_main (/lib64/libc.so.6+0x309d8) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#24 0xffff9bba0aac in __libc_start_main@@GLIBC_2.34 (/lib64/libc.so.6+0x30aac) (BuildId: 4b1e6ff6c35f7fc7bd309e5e5a1f981e2515e4f0)
apache#25 0x89346c in _start (/home/bneradt/src/ts_asf_master_address_asan_unit_test_issues/build/src/traffic_server/traffic_server+0x89346c) (BuildId: d86c4e46554f342afeb32ab378ad7f99940d848a)
SUMMARY: AddressSanitizer: 104 byte(s) leaked in 2 allocation(s).
(cherry picked from commit a2a5cbe)
ASan reported a use-after-free in Do_upstream_rsp_body. This adds
clearing the Continuation's data of the State member upon destruction
because any use of it will be a use after free by definition.
```
=================================================================
==764533==ERROR: AddressSanitizer: heap-use-after-free on address 0x62d006090610 at pc 0x7f5702f4d0d2 bp 0x7f5833a15ca0 sp 0x7f5833a15c90
READ of size 8 at 0x62d006090610 thread T24 ([ET_NET 22])
#0 0x7f5702f4d0d1 in operator() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/plugins/experimental/txn_box/plugin/src/Machinery.cc:2579
#1 0x7f5702f4d0d1 in _FUN /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/plugins/experimental/txn_box/plugin/src/Machinery.cc:2591
#2 0x1251b2a in INKContInternal::handle_event(int, void*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/api/InkContInternal.cc:153
#3 0x116b304 in Continuation::handleEvent(int, void*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/include/iocore/eventsystem/Continuation.h:228
#4 0x116b304 in Continuation::handleEvent(int, void*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/include/iocore/eventsystem/Continuation.h:224
#5 0x116b304 in EThread::process_event(Event*, int) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:162
#6 0x116d132 in EThread::process_queue(Queue<Event, Event::Link_link>*, int*, int*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:197
#7 0x116e07f in EThread::execute_regular() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:255
#8 0x116f7d8 in EThread::execute() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:348
#9 0x116f7d8 in EThread::execute() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:326
#10 0x11684e7 in spawn_thread_internal /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/Thread.cc:75
apache#11 0x7f58493031c9 in start_thread (/lib64/libpthread.so.0+0x81c9) (BuildId: e08f397aa6b7de799209cd5bc35aabe0496678f1)
apache#12 0x7f5848f6fe72 in __clone (/lib64/libc.so.6+0x39e72) (BuildId: 574d156ec0c828321a4038189fc1cfe74d0bb2ec)
0x62d006090610 is located 528 bytes inside of 32752-byte region [0x62d006090400,0x62d0060983f0)
freed by thread T24 ([ET_NET 22]) here:
#0 0x7f584aa05170 in __interceptor_free.part.0 (/lib64/libasan.so.8+0xdc170) (BuildId: 71dbf393857c775be459ab5583ba7b5fcbd9c884)
#1 0x7f5849b71665 in swoc::_1_5_12::MemArena::Block::operator delete(void*) _sdk/release_posix-x86_64_gcc_12/libswoc_1.5.12/include/swoc/MemArena.h:646
#2 0x7f5849b71665 in swoc::_1_5_12::MemArena::~MemArena() _scm/libswoc/code/src/MemArena.cc:276
previously allocated by thread T24 ([ET_NET 22]) here:
#0 0x7f584aa0662f in malloc (/lib64/libasan.so.8+0xdd62f) (BuildId: 71dbf393857c775be459ab5583ba7b5fcbd9c884)
#1 0x7f5849b718ab in swoc::_1_5_12::MemArena::make_block(unsigned long) _scm/libswoc/code/src/MemArena.cc:99
Thread T24 ([ET_NET 22]) created by T0 ([TS_MAIN]) here:
#0 0x7f584a971ea5 in __interceptor_pthread_create (/lib64/libasan.so.8+0x48ea5) (BuildId: 71dbf393857c775be459ab5583ba7b5fcbd9c884)
#1 0x1168c0c in ink_thread_create /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/include/tscore/ink_thread.h:129
#2 0x1168c0c in Thread::start(char const*, void*, unsigned long, std::function<void ()> const&) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/Thread.cc:92
#3 0x117a904 in EventProcessor::spawn_event_threads(int, int, unsigned long) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEventProcessor.cc:467
#4 0x117b75a in EventProcessor::start(int, unsigned long) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEventProcessor.cc:548
#5 0x56dc74 in main /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/traffic_server/traffic_server.cc:2104
#6 0x7f5848f70d84 in __libc_start_main (/lib64/libc.so.6+0x3ad84) (BuildId: 574d156ec0c828321a4038189fc1cfe74d0bb2ec)
SUMMARY: AddressSanitizer: heap-use-after-free /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/plugins/experimental/txn_box/plugin/src/Machinery.cc:2579 in operator()
Shadow bytes around the buggy address:
0x62d006090380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x62d006090400: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090480: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090500: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090580: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x62d006090600: fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090680: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090780: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090800: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090880: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==764533==ABORTING
```
ASan reported a use-after-free in Do_upstream_rsp_body. This adds
clearing the Continuation's data of the State member upon destruction
because any use of it will be a use after free by definition.
```
=================================================================
==764533==ERROR: AddressSanitizer: heap-use-after-free on address 0x62d006090610 at pc 0x7f5702f4d0d2 bp 0x7f5833a15ca0 sp 0x7f5833a15c90
READ of size 8 at 0x62d006090610 thread T24 ([ET_NET 22])
#0 0x7f5702f4d0d1 in operator() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/plugins/experimental/txn_box/plugin/src/Machinery.cc:2579
#1 0x7f5702f4d0d1 in _FUN /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/plugins/experimental/txn_box/plugin/src/Machinery.cc:2591
#2 0x1251b2a in INKContInternal::handle_event(int, void*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/api/InkContInternal.cc:153
#3 0x116b304 in Continuation::handleEvent(int, void*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/include/iocore/eventsystem/Continuation.h:228
#4 0x116b304 in Continuation::handleEvent(int, void*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/include/iocore/eventsystem/Continuation.h:224
#5 0x116b304 in EThread::process_event(Event*, int) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:162
#6 0x116d132 in EThread::process_queue(Queue<Event, Event::Link_link>*, int*, int*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:197
#7 0x116e07f in EThread::execute_regular() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:255
#8 0x116f7d8 in EThread::execute() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:348
#9 0x116f7d8 in EThread::execute() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:326
#10 0x11684e7 in spawn_thread_internal /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/Thread.cc:75
apache#11 0x7f58493031c9 in start_thread (/lib64/libpthread.so.0+0x81c9) (BuildId: e08f397aa6b7de799209cd5bc35aabe0496678f1)
apache#12 0x7f5848f6fe72 in __clone (/lib64/libc.so.6+0x39e72) (BuildId: 574d156ec0c828321a4038189fc1cfe74d0bb2ec)
0x62d006090610 is located 528 bytes inside of 32752-byte region [0x62d006090400,0x62d0060983f0)
freed by thread T24 ([ET_NET 22]) here:
#0 0x7f584aa05170 in __interceptor_free.part.0 (/lib64/libasan.so.8+0xdc170) (BuildId: 71dbf393857c775be459ab5583ba7b5fcbd9c884)
#1 0x7f5849b71665 in swoc::_1_5_12::MemArena::Block::operator delete(void*) _sdk/release_posix-x86_64_gcc_12/libswoc_1.5.12/include/swoc/MemArena.h:646
#2 0x7f5849b71665 in swoc::_1_5_12::MemArena::~MemArena() _scm/libswoc/code/src/MemArena.cc:276
previously allocated by thread T24 ([ET_NET 22]) here:
#0 0x7f584aa0662f in malloc (/lib64/libasan.so.8+0xdd62f) (BuildId: 71dbf393857c775be459ab5583ba7b5fcbd9c884)
#1 0x7f5849b718ab in swoc::_1_5_12::MemArena::make_block(unsigned long) _scm/libswoc/code/src/MemArena.cc:99
Thread T24 ([ET_NET 22]) created by T0 ([TS_MAIN]) here:
#0 0x7f584a971ea5 in __interceptor_pthread_create (/lib64/libasan.so.8+0x48ea5) (BuildId: 71dbf393857c775be459ab5583ba7b5fcbd9c884)
#1 0x1168c0c in ink_thread_create /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/include/tscore/ink_thread.h:129
#2 0x1168c0c in Thread::start(char const*, void*, unsigned long, std::function<void ()> const&) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/Thread.cc:92
#3 0x117a904 in EventProcessor::spawn_event_threads(int, int, unsigned long) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEventProcessor.cc:467
#4 0x117b75a in EventProcessor::start(int, unsigned long) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEventProcessor.cc:548
#5 0x56dc74 in main /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/traffic_server/traffic_server.cc:2104
#6 0x7f5848f70d84 in __libc_start_main (/lib64/libc.so.6+0x3ad84) (BuildId: 574d156ec0c828321a4038189fc1cfe74d0bb2ec)
SUMMARY: AddressSanitizer: heap-use-after-free /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/plugins/experimental/txn_box/plugin/src/Machinery.cc:2579 in operator()
Shadow bytes around the buggy address:
0x62d006090380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x62d006090400: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090480: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090500: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090580: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x62d006090600: fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090680: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090780: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090800: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090880: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==764533==ABORTING
```
ASan reported a use-after-free in Do_upstream_rsp_body. This adds
clearing the Continuation's data of the State member upon destruction
because any use of it will be a use after free by definition.
```
=================================================================
==764533==ERROR: AddressSanitizer: heap-use-after-free on address 0x62d006090610 at pc 0x7f5702f4d0d2 bp 0x7f5833a15ca0 sp 0x7f5833a15c90
READ of size 8 at 0x62d006090610 thread T24 ([ET_NET 22])
#0 0x7f5702f4d0d1 in operator() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/plugins/experimental/txn_box/plugin/src/Machinery.cc:2579
#1 0x7f5702f4d0d1 in _FUN /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/plugins/experimental/txn_box/plugin/src/Machinery.cc:2591
#2 0x1251b2a in INKContInternal::handle_event(int, void*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/api/InkContInternal.cc:153
#3 0x116b304 in Continuation::handleEvent(int, void*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/include/iocore/eventsystem/Continuation.h:228
#4 0x116b304 in Continuation::handleEvent(int, void*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/include/iocore/eventsystem/Continuation.h:224
#5 0x116b304 in EThread::process_event(Event*, int) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:162
#6 0x116d132 in EThread::process_queue(Queue<Event, Event::Link_link>*, int*, int*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:197
#7 0x116e07f in EThread::execute_regular() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:255
#8 0x116f7d8 in EThread::execute() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:348
#9 0x116f7d8 in EThread::execute() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:326
#10 0x11684e7 in spawn_thread_internal /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/Thread.cc:75
apache#11 0x7f58493031c9 in start_thread (/lib64/libpthread.so.0+0x81c9) (BuildId: e08f397aa6b7de799209cd5bc35aabe0496678f1)
apache#12 0x7f5848f6fe72 in __clone (/lib64/libc.so.6+0x39e72) (BuildId: 574d156ec0c828321a4038189fc1cfe74d0bb2ec)
0x62d006090610 is located 528 bytes inside of 32752-byte region [0x62d006090400,0x62d0060983f0)
freed by thread T24 ([ET_NET 22]) here:
#0 0x7f584aa05170 in __interceptor_free.part.0 (/lib64/libasan.so.8+0xdc170) (BuildId: 71dbf393857c775be459ab5583ba7b5fcbd9c884)
#1 0x7f5849b71665 in swoc::_1_5_12::MemArena::Block::operator delete(void*) _sdk/release_posix-x86_64_gcc_12/libswoc_1.5.12/include/swoc/MemArena.h:646
#2 0x7f5849b71665 in swoc::_1_5_12::MemArena::~MemArena() _scm/libswoc/code/src/MemArena.cc:276
previously allocated by thread T24 ([ET_NET 22]) here:
#0 0x7f584aa0662f in malloc (/lib64/libasan.so.8+0xdd62f) (BuildId: 71dbf393857c775be459ab5583ba7b5fcbd9c884)
#1 0x7f5849b718ab in swoc::_1_5_12::MemArena::make_block(unsigned long) _scm/libswoc/code/src/MemArena.cc:99
Thread T24 ([ET_NET 22]) created by T0 ([TS_MAIN]) here:
#0 0x7f584a971ea5 in __interceptor_pthread_create (/lib64/libasan.so.8+0x48ea5) (BuildId: 71dbf393857c775be459ab5583ba7b5fcbd9c884)
#1 0x1168c0c in ink_thread_create /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/include/tscore/ink_thread.h:129
#2 0x1168c0c in Thread::start(char const*, void*, unsigned long, std::function<void ()> const&) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/Thread.cc:92
#3 0x117a904 in EventProcessor::spawn_event_threads(int, int, unsigned long) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEventProcessor.cc:467
#4 0x117b75a in EventProcessor::start(int, unsigned long) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEventProcessor.cc:548
#5 0x56dc74 in main /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/traffic_server/traffic_server.cc:2104
#6 0x7f5848f70d84 in __libc_start_main (/lib64/libc.so.6+0x3ad84) (BuildId: 574d156ec0c828321a4038189fc1cfe74d0bb2ec)
SUMMARY: AddressSanitizer: heap-use-after-free /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/plugins/experimental/txn_box/plugin/src/Machinery.cc:2579 in operator()
Shadow bytes around the buggy address:
0x62d006090380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x62d006090400: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090480: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090500: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090580: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x62d006090600: fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090680: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090780: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090800: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090880: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==764533==ABORTING
```
ASan reported a use-after-free in Do_upstream_rsp_body. This adds
clearing the Continuation's data of the State member upon destruction
because any use of it will be a use after free by definition.
```
=================================================================
==764533==ERROR: AddressSanitizer: heap-use-after-free on address 0x62d006090610 at pc 0x7f5702f4d0d2 bp 0x7f5833a15ca0 sp 0x7f5833a15c90
READ of size 8 at 0x62d006090610 thread T24 ([ET_NET 22])
#0 0x7f5702f4d0d1 in operator() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/plugins/experimental/txn_box/plugin/src/Machinery.cc:2579
#1 0x7f5702f4d0d1 in _FUN /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/plugins/experimental/txn_box/plugin/src/Machinery.cc:2591
#2 0x1251b2a in INKContInternal::handle_event(int, void*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/api/InkContInternal.cc:153
#3 0x116b304 in Continuation::handleEvent(int, void*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/include/iocore/eventsystem/Continuation.h:228
#4 0x116b304 in Continuation::handleEvent(int, void*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/include/iocore/eventsystem/Continuation.h:224
#5 0x116b304 in EThread::process_event(Event*, int) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:162
#6 0x116d132 in EThread::process_queue(Queue<Event, Event::Link_link>*, int*, int*) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:197
#7 0x116e07f in EThread::execute_regular() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:255
#8 0x116f7d8 in EThread::execute() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:348
#9 0x116f7d8 in EThread::execute() /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEThread.cc:326
#10 0x11684e7 in spawn_thread_internal /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/Thread.cc:75
apache#11 0x7f58493031c9 in start_thread (/lib64/libpthread.so.0+0x81c9) (BuildId: e08f397aa6b7de799209cd5bc35aabe0496678f1)
apache#12 0x7f5848f6fe72 in __clone (/lib64/libc.so.6+0x39e72) (BuildId: 574d156ec0c828321a4038189fc1cfe74d0bb2ec)
0x62d006090610 is located 528 bytes inside of 32752-byte region [0x62d006090400,0x62d0060983f0)
freed by thread T24 ([ET_NET 22]) here:
#0 0x7f584aa05170 in __interceptor_free.part.0 (/lib64/libasan.so.8+0xdc170) (BuildId: 71dbf393857c775be459ab5583ba7b5fcbd9c884)
#1 0x7f5849b71665 in swoc::_1_5_12::MemArena::Block::operator delete(void*) _sdk/release_posix-x86_64_gcc_12/libswoc_1.5.12/include/swoc/MemArena.h:646
#2 0x7f5849b71665 in swoc::_1_5_12::MemArena::~MemArena() _scm/libswoc/code/src/MemArena.cc:276
previously allocated by thread T24 ([ET_NET 22]) here:
#0 0x7f584aa0662f in malloc (/lib64/libasan.so.8+0xdd62f) (BuildId: 71dbf393857c775be459ab5583ba7b5fcbd9c884)
#1 0x7f5849b718ab in swoc::_1_5_12::MemArena::make_block(unsigned long) _scm/libswoc/code/src/MemArena.cc:99
Thread T24 ([ET_NET 22]) created by T0 ([TS_MAIN]) here:
#0 0x7f584a971ea5 in __interceptor_pthread_create (/lib64/libasan.so.8+0x48ea5) (BuildId: 71dbf393857c775be459ab5583ba7b5fcbd9c884)
#1 0x1168c0c in ink_thread_create /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/include/tscore/ink_thread.h:129
#2 0x1168c0c in Thread::start(char const*, void*, unsigned long, std::function<void ()> const&) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/Thread.cc:92
#3 0x117a904 in EventProcessor::spawn_event_threads(int, int, unsigned long) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEventProcessor.cc:467
#4 0x117b75a in EventProcessor::start(int, unsigned long) /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/iocore/eventsystem/UnixEventProcessor.cc:548
#5 0x56dc74 in main /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/src/traffic_server/traffic_server.cc:2104
#6 0x7f5848f70d84 in __libc_start_main (/lib64/libc.so.6+0x3ad84) (BuildId: 574d156ec0c828321a4038189fc1cfe74d0bb2ec)
SUMMARY: AddressSanitizer: heap-use-after-free /sd/workspace/src/git.ouryahoo.com/Edge/build/_scm/trafficserver10.0_asan/plugins/experimental/txn_box/plugin/src/Machinery.cc:2579 in operator()
Shadow bytes around the buggy address:
0x62d006090380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x62d006090400: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090480: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090500: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090580: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x62d006090600: fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090680: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090780: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090800: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x62d006090880: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==764533==ABORTING
```
(cherry picked from commit 69e1c94)
Add a destructor to the Stripe class to properly free the directory
memory allocated in _init_directory(). The memory was allocated via
ats_memalign or ats_alloc_hugepage but never freed when Stripe objects
were destroyed. A new private member tracks whether hugepages were used
so the destructor can call the appropriate free function. This was
discovered via an infrequent ASAN failure in the
cache_disk_replacement_stability regression test, which reported a ~27GB
leak from 24 StripeSM objects that went out of scope without releasing
their directory buffers.
```
=================================================================
==5207==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 29272965120 byte(s) in 24 object(s) allocated from:
#0 0x7f8b9cd1669c in __interceptor_posix_memalign (/lib64/libasan.so.6+0xb569c)
#1 0xa69d99 in ats_memalign(unsigned long, unsigned long) ../src/tscore/ink_memory.cc:108
#2 0xfd96e2 in Stripe::_init_directory(unsigned long, int, int) ../src/iocore/cache/Stripe.cc:159
#3 0xfd905f in Stripe::Stripe(CacheDisk*, long, long, int, int) ../src/iocore/cache/Stripe.cc:97
#4 0xfdc7ef in StripeSM::StripeSM(CacheDisk*, long, long, int, int) ../src/iocore/cache/StripeSM.cc:120
#5 0xff8c81 in std::_MakeUniq<StripeSM>::__single_object std::make_unique<StripeSM, CacheDisk*, long, int>(CacheDisk*&&, long&&, int&&) (/tmp/ats-quiche/bin/traffic_server+0xff8c81)
#6 0xff4797 in RegressionTest_cache_disk_replacement_stability(RegressionTest*, int, int*) ../src/iocore/cache/CacheTest.cc:458
#7 0xa4c994 in start_test ../src/tscore/Regression.cc:83
#8 0xa4cd6c in RegressionTest::run(char const*, int) ../src/tscore/Regression.cc:106
#9 0xa1a2a8 in mainEvent ../src/traffic_server/traffic_server.cc:1570
#10 0x9fd61a in Continuation::handleEvent(int, void*) ../include/iocore/eventsystem/Continuation.h:228
apache#11 0x13373e7 in EThread::process_event(Event*, int, long) ../src/iocore/eventsystem/UnixEThread.cc:171
apache#12 0x133809c in EThread::execute_regular() ../src/iocore/eventsystem/UnixEThread.cc:288
apache#13 0x1338a7b in EThread::execute() ../src/iocore/eventsystem/UnixEThread.cc:383
apache#14 0x13356e8 in spawn_thread_internal ../src/iocore/eventsystem/Thread.cc:75
apache#15 0x7f8b9abeb1c9 in start_thread (/lib64/libpthread.so.0+0x81c9)
```
No description provided.