apache / trafficserver

Apache Traffic Server™ is a fast, scalable and extensible HTTP/1.1 and HTTP/2 compliant caching proxy server.
https://trafficserver.apache.org/
Apache License 2.0
1.81k stars 804 forks source link

Assert failure on HttpServerSession:: get_server_ip() #3544

Closed masaori335 closed 6 years ago

masaori335 commented 6 years ago

I intermittently got this crash with running h2spec against master branch. Still not sure which test is triggering this crash.

2018-04-27 11:49:01.010009+0900 traffic_server[29577:7570015] Fatal: HttpServerSession.h:136: failed assertion `server_vc != nullptr`
Process 29577 stopped
* thread #6, name = '[ET_NET 4]', stop reason = signal SIGABRT
...
(lldb) bt
* thread #6, name = '[ET_NET 4]', stop reason = signal SIGABRT                                                                                                                                          [4/3848]
  * frame #0: 0x00007fff741d1b6e libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff7439c080 libsystem_pthread.dylib`pthread_kill + 333
    frame #2: 0x00007fff7412d1ae libsystem_c.dylib`abort + 127
    frame #3: 0x0000000000035da0 libtsutil.8.dylib`ink_abort(char const*, ...) + 368
    frame #4: 0x0000000000032e9f libtsutil.8.dylib`_ink_assert + 47
    frame #5: 0x000000010015464d traffic_server`HttpServerSession::get_server_ip() const + 77
    frame #6: 0x0000000100164395 traffic_server`ServerSessionPool::IPHashing::key(HttpServerSession const*) + 21
    frame #7: 0x0000000100161fe1 traffic_server`TSHashTable<ServerSessionPool::IPHashing>::find(sockaddr const*) + 113
    frame #8: 0x0000000100161976 traffic_server`ServerSessionPool::acquireSession(sockaddr const*, ats::CryptoHash const&, TSServerSessionSharingMatchType, HttpSM*, HttpServerSession*&) + 470
    frame #9: 0x0000000100162c37 traffic_server`HttpSessionManager::acquire_session(Continuation*, sockaddr const*, char const*, ProxyClientTransaction*, HttpSM*) + 1143
    frame #10: 0x000000010013aec7 traffic_server`HttpSM::do_http_server_open(bool) + 4231
    frame #11: 0x00000001001592da traffic_server`HttpSM::set_next_state() + 4122
    frame #12: 0x0000000100137102 traffic_server`HttpSM::call_transact_and_set_next_state(void (*)(HttpTransact::State*)) + 482
    frame #13: 0x000000010013f407 traffic_server`HttpSM::handle_api_return() + 279
    frame #14: 0x0000000100133bec traffic_server`HttpSM::do_api_callout() + 60
    frame #15: 0x000000010015833a traffic_server`HttpSM::set_next_state() + 122
    frame #16: 0x0000000100137102 traffic_server`HttpSM::call_transact_and_set_next_state(void (*)(HttpTransact::State*)) + 482
    frame #17: 0x0000000100158860 traffic_server`HttpSM::set_next_state() + 1440
    frame #18: 0x0000000100137102 traffic_server`HttpSM::call_transact_and_set_next_state(void (*)(HttpTransact::State*)) + 482
    frame #19: 0x000000010013f407 traffic_server`HttpSM::handle_api_return() + 279
    frame #20: 0x0000000100133bec traffic_server`HttpSM::do_api_callout() + 60
    frame #21: 0x000000010014abaf traffic_server`HttpSM::setup_cache_lookup_complete_api() + 31
    frame #22: 0x000000010014ab73 traffic_server`HttpSM::state_cache_open_read(int, void*) + 1923
    frame #23: 0x0000000100133695 traffic_server`HttpSM::main_handler(int, void*) + 1013
    frame #24: 0x000000010001d260 traffic_server`Continuation::handleEvent(int, void*) + 112
    frame #25: 0x000000010011afd0 traffic_server`HttpCacheSM::state_cache_open_read(int, void*) + 816
    frame #26: 0x000000010001d260 traffic_server`Continuation::handleEvent(int, void*) + 112
    frame #27: 0x00000001002cf306 traffic_server`Cache::open_read(Continuation*, ats::CryptoHash const*, HTTPHdr*, OverridableHttpConfigParams*, CacheFragType, char const*, int) + 1590
    frame #28: 0x00000001002b11c9 traffic_server`CacheProcessor::open_read(Continuation*, HttpCacheKey const*, HTTPHdr*, OverridableHttpConfigParams*, long, CacheFragType) + 121
    frame #29: 0x000000010011b426 traffic_server`HttpCacheSM::do_cache_open_read(HttpCacheKey const&) + 278
    frame #30: 0x000000010011beb9 traffic_server`HttpCacheSM::open_read(HttpCacheKey const*, URL*, HTTPHdr*, OverridableHttpConfigParams*, long) + 265
    frame #31: 0x0000000100153f3a traffic_server`HttpSM::do_cache_lookup_and_read() + 794
    frame #32: 0x0000000100159124 traffic_server`HttpSM::set_next_state() + 3684
    frame #33: 0x0000000100137102 traffic_server`HttpSM::call_transact_and_set_next_state(void (*)(HttpTransact::State*)) + 482
    frame #34: 0x000000010013f407 traffic_server`HttpSM::handle_api_return() + 279
    frame #35: 0x0000000100133bec traffic_server`HttpSM::do_api_callout() + 60
    frame #36: 0x000000010015833a traffic_server`HttpSM::set_next_state() + 122
    frame #37: 0x0000000100137102 traffic_server`HttpSM::call_transact_and_set_next_state(void (*)(HttpTransact::State*)) + 482
    frame #38: 0x00000001001584b4 traffic_server`HttpSM::set_next_state() + 500
    frame #39: 0x0000000100137102 traffic_server`HttpSM::call_transact_and_set_next_state(void (*)(HttpTransact::State*)) + 482
    frame #40: 0x000000010013f407 traffic_server`HttpSM::handle_api_return() + 279
    frame #41: 0x0000000100133bec traffic_server`HttpSM::do_api_callout() + 60
    frame #42: 0x000000010015833a traffic_server`HttpSM::set_next_state() + 122
    frame #43: 0x0000000100137102 traffic_server`HttpSM::call_transact_and_set_next_state(void (*)(HttpTransact::State*)) + 482
    frame #44: 0x000000010013f407 traffic_server`HttpSM::handle_api_return() + 279
    frame #45: 0x0000000100133bec traffic_server`HttpSM::do_api_callout() + 60
    frame #46: 0x000000010015833a traffic_server`HttpSM::set_next_state() + 122
    frame #47: 0x0000000100137102 traffic_server`HttpSM::call_transact_and_set_next_state(void (*)(HttpTransact::State*)) + 482
    frame #48: 0x0000000100135d9c traffic_server`HttpSM::state_read_client_request_header(int, void*) + 4876
    frame #49: 0x00000001001335a8 traffic_server`HttpSM::main_handler(int, void*) + 776
    frame #50: 0x000000010001d260 traffic_server`Continuation::handleEvent(int, void*) + 112
    frame #51: 0x00000001001cb8f3 traffic_server`Http2Stream::update_read_request(long long, bool, bool) + 1603
    frame #52: 0x00000001001cbc12 traffic_server`Http2Stream::send_request(Http2ConnectionState&) + 306
    frame #53: 0x00000001001c346f traffic_server`rcv_headers_frame(Http2ConnectionState&, Http2Frame const&) + 2527
    frame #54: 0x00000001001ba43a traffic_server`Http2ConnectionState::main_event_handler(int, void*) + 1466
    frame #55: 0x000000010001d260 traffic_server`Continuation::handleEvent(int, void*) + 112
    frame #56: 0x00000001001b72ec traffic_server`send_connection_event(Continuation*, int, void*) + 108
    frame #57: 0x00000001001b90bd traffic_server`Http2ClientSession::do_complete_frame_read() + 173
    frame #58: 0x00000001001b8625 traffic_server`Http2ClientSession::state_process_frame_read(int, VIO*, bool) + 501
    frame #59: 0x00000001001b8420 traffic_server`Http2ClientSession::state_start_frame_read(int, void*) + 448
    frame #60: 0x00000001001b6828 traffic_server`Http2ClientSession::main_event_handler(int, void*) + 440
    frame #61: 0x000000010001d260 traffic_server`Continuation::handleEvent(int, void*) + 112
    frame #62: 0x000000010035b3a8 traffic_server`read_signal_and_update(int, UnixNetVConnection*) + 88
    frame #63: 0x000000010035b33b traffic_server`UnixNetVConnection::readSignalAndUpdate(int) + 27
    frame #64: 0x00000001003195eb traffic_server`SSLNetVConnection::net_read_io(NetHandler*, EThread*) + 2859
    frame #65: 0x000000010034a3de traffic_server`NetHandler::process_ready_list() + 174
    frame #66: 0x000000010034ad6f traffic_server`NetHandler::waitForActivity(long long) + 2111
    frame #67: 0x0000000100381ac9 traffic_server`EThread::execute_regular() + 1337
    frame #68: 0x0000000100381f4a traffic_server`EThread::execute() + 250
    frame #69: 0x00000001003800c4 traffic_server`spawn_thread_internal(void*) + 100
    frame #70: 0x00007fff74399661 libsystem_pthread.dylib`_pthread_body + 340
    frame #71: 0x00007fff7439950d libsystem_pthread.dylib`_pthread_start + 377
    frame #72: 0x00007fff74398bf9 libsystem_pthread.dylib`thread_start + 13
masaori335 commented 6 years ago

Duplicated #3936