ywkaras opened a new issue #7823:
URL: https://github.com/apache/trafficserver/issues/7823


   Here is the test:  
https://github.com/ywkaras/trafficserver/commit/2190eebaae18400a5720adb12c380df0606af468
   
   Here is the stack trace:
   ```
   #0  0x00007fcadc976207 in raise () from /lib64/libc.so.6
   #1  0x00007fcadc9778f8 in abort () from /lib64/libc.so.6
   #2  0x00007fcadef2268f in ink_abort (message_format=0x7fcadef8fa40 "%s:%d: 
failed assertion `%s`") at ink_error.cc:99
   #3  0x00007fcadef1e287 in _ink_assert (expression=0xa34dda "result->port != 
0", file=0xa34a30 "NextHopConsistentHash.cc", line=403) at ink_assert.cc:37
   #4  0x00000000007dfd5a in NextHopConsistentHash::findNextHop 
(this=0x2f31f30, txnp=0x7fcad334b3d0, ih=0x0, now=0) at 
NextHopConsistentHash.cc:403
   #5  0x0000000000749599 in findParent (s=0x7fcad334b4d8) at 
HttpTransact.cc:197
   #6  0x000000000074bb00 in find_server_and_update_current_info 
(s=0x7fcad334b4d8) at HttpTransact.cc:611
   #7  0x0000000000759745 in HttpTransact::LookupSkipOpenServer 
(s=0x7fcad334b4d8) at HttpTransact.cc:2216
   #8  0x0000000000733836 in HttpSM::call_transact_and_set_next_state 
(this=0x7fcad334b3d0, f=0x0) at HttpSM.cc:7331
   #9  0x0000000000717a4b in HttpSM::handle_api_return (this=0x7fcad334b3d0) at 
HttpSM.cc:1691
   #10 0x000000000073d6d2 in HttpSM::do_api_callout (this=0x7fcad334b3d0) at 
HttpSM.cc:436
   #11 0x0000000000733a7e in HttpSM::set_next_state (this=0x7fcad334b3d0) at 
HttpSM.cc:7373
   #12 0x00000000007339f5 in HttpSM::call_transact_and_set_next_state 
(this=0x7fcad334b3d0, f=0x0) at HttpSM.cc:7339
   #13 0x0000000000717a4b in HttpSM::handle_api_return (this=0x7fcad334b3d0) at 
HttpSM.cc:1691
   #14 0x000000000073d6d2 in HttpSM::do_api_callout (this=0x7fcad334b3d0) at 
HttpSM.cc:436
   #15 0x0000000000733a7e in HttpSM::set_next_state (this=0x7fcad334b3d0) at 
HttpSM.cc:7373
   #16 0x00000000007339f5 in HttpSM::call_transact_and_set_next_state 
(this=0x7fcad334b3d0, f=0x0) at HttpSM.cc:7339
   #17 0x000000000071b75d in HttpSM::state_hostdb_lookup (this=0x7fcad334b3d0, 
event=500, data=0x7fcac803bf80) at HttpSM.cc:2348
   #18 0x000000000071d875 in HttpSM::main_handler (this=0x7fcad334b3d0, 
event=500, data=0x7fcac803bf80) at HttpSM.cc:2701
   #19 0x000000000067a5ad in Continuation::handleEvent (this=0x7fcad334b3d0, 
event=500, data=0x7fcac803bf80) at 
/Users/wkaras/REPOS/TS2/iocore/eventsystem/I_Continuation.h:219
   #20 0x0000000000888010 in reply_to_cont (cont=0x7fcad334b3d0, 
r=0x7fcac803bf80, is_srv=false) at HostDB.cc:503
   #21 0x000000000088d3a9 in HostDBContinuation::dnsEvent (this=0x7fcad998b5e0, 
event=600, e=0x7fcad31c4a00) at HostDB.cc:1366
   #22 0x000000000067a5ad in Continuation::handleEvent (this=0x7fcad998b5e0, 
event=600, data=0x7fcad31c4a00) at 
/Users/wkaras/REPOS/TS2/iocore/eventsystem/I_Continuation.h:219
   #23 0x00000000008a6771 in DNSEntry::postOneEvent (this=0x7fcad3229800) at 
DNS.cc:1449
   #24 0x000000000067a5ad in Continuation::handleEvent (this=0x7fcad3229800, 
event=1, data=0x2e932e0) at 
/Users/wkaras/REPOS/TS2/iocore/eventsystem/I_Continuation.h:219
   #25 0x00000000009e83d1 in EThread::process_event (this=0x7fcadb1d8010, 
e=0x2e932e0, calling_code=1) at UnixEThread.cc:164
   #26 0x00000000009e85f9 in EThread::process_queue (this=0x7fcadb1d8010, 
NegativeQueue=0x7fcada7fcde0, ev_count=0x7fcada7fcdd8, nq_count=0x7fcada7fcddc) 
at UnixEThread.cc:199
   #27 0x00000000009e8899 in EThread::execute_regular (this=0x7fcadb1d8010) at 
UnixEThread.cc:259
   #28 0x00000000009e8cbf in EThread::execute (this=0x7fcadb1d8010) at 
UnixEThread.cc:364
   #29 0x00000000009e74c0 in spawn_thread_internal (a=0x2e7d3b0) at Thread.cc:92
   #30 0x00007fcadd737dd5 in start_thread () from /lib64/libpthread.so.0
   #31 0x00007fcadca3eb3d in clone () from /lib64/libc.so.6
   ```
   
   Here is the debug trace output:  
https://gist.github.com/ywkaras/012c1e7563a41f0290ab7a79008cebed
   
   Since the assert is `result->port != 0`, perhaps these lines from the debug 
trace are related:
   ```
   [May 12 18:49:21.510] traffic_server DEBUG: <NextHopSelectionStrategy.cc:52 
(NextHopSelectionStrategy)> (next_hop) Using a selection strategy of type 
NH_CONSISTENT_HASH, max_retriers: 2
   [May 12 18:49:21.510] traffic_server DEBUG: <NextHopSelectionStrategy.cc:61 
(Init)> (next_hop) calling Init()
   [May 12 18:49:21.512] traffic_server DEBUG: <NextHopHealthStatus.cc:37 
(insert)> (next_hop) inserting foo0:0 into host_map
   [May 12 18:49:21.512] traffic_server DEBUG: <NextHopHealthStatus.cc:37 
(insert)> (next_hop) inserting foo0:61002 into host_map
   [May 12 18:49:21.512] traffic_server DEBUG: <NextHopHealthStatus.cc:37 
(insert)> (next_hop) inserting foo1:0 into host_map
   ...
   ```
   records.config:
   ```
   CONFIG proxy.config.http.wait_for_cache INT 1
   CONFIG proxy.config.http.server_ports STRING 61038 61039:ipv6
   CONFIG proxy.config.diags.debug.enabled INT 1
   CONFIG proxy.config.diags.debug.tags STRING 
http|dns|parent|next_hop|host_statuses|hostdb
   CONFIG proxy.config.dns.nameservers STRING 127.0.0.1:61001
   CONFIG proxy.config.dns.resolv_conf STRING NULL
   CONFIG proxy.config.http.cache.http INT 0
   CONFIG proxy.config.http.uncacheable_requests_bypass_parent INT 0
   CONFIG proxy.config.http.no_dns_just_forward_to_parent INT 0
   CONFIG proxy.config.http.parent_proxy.mark_down_hostdb INT 0
   CONFIG proxy.config.http.parent_proxy.self_detect INT 0
   ```
   remap.config:
   ```
   map http://dummy.com http://foo_org:61034 @strategy=the-strategy
   ```
   strategies.yaml:
   ```
   groups:
     - &g1
       - host: foo0
         protocol:
           - scheme: http
           - port: 61002
         weight: 1.0
       - host: foo1
         protocol:
           - scheme: http
           - port: 61006
         weight: 1.0
       - host: foo2
         protocol:
           - scheme: http
           - port: 61010
         weight: 1.0
       - host: foo3
         protocol:
           - scheme: http
           - port: 61014
         weight: 1.0
       - host: foo4
         protocol:
           - scheme: http
           - port: 61018
         weight: 1.0
       - host: foo5
         protocol:
           - scheme: http
           - port: 61022
         weight: 1.0
       - host: foo6
         protocol:
           - scheme: http
           - port: 61026
         weight: 1.0
       - host: foo7
         protocol:
           - scheme: http
           - port: 61030
         weight: 1.0
   
   strategies:
     - strategy: the-strategy
       policy: consistent_hash
       hash_key: path
       go_direct: false
       parent_is_proxy: true
       ignore_self_detect: true
       groups:
         - *g1
       scheme: http
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to