Repository navigation
Closed
Labels
Description
Strategies yaml config got loaded but seeing crash after sending curl request. I tested with 9.0.x and 9.1.x branches and crashed on both. I tried multiple "hash_key:path" and "hash_key:hostname" in yaml.
Please find the configuration and logs below.
cat remap.config
map /nexthop-test/ http://httpbin.org/ @strategy=nexthop-test-strategy
cat strategies.yaml
hosts:
- &nexthop-test-host
host: test-host.xyz.com
protocol:
- scheme: http
port: 80
- scheme: https
port: 443
groups:
- &nexthop-test-group
- <<: *nexthop-test-host
weight: 1.5
strategies:
- strategy: 'nexthop-test-strategy'
policy: consistent_hash
hash_key: path
go_direct: false
groups:
- *nexthop-test-group
scheme: http
failover:
ring_mode: alternate_ring
response_codes:
- 404
markdown_codes:
- 503
health_check:
- passive
Curl
curl -vvv -o /dev/null http://localhost/nexthop-test/get
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to localhost port 80 (#0)
* Trying ::1...
* Connected to localhost (::1) port 80 (#0)
> GET /nexthop-test/get HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost
> Accept: */*
>
0 0 0 0 0 0 0 0 --:--:-- 0:00:34 --:--:-- 0* Empty reply from server
0 0 0 0 0 0 0 0 --:--:-- 0:00:34 --:--:-- 0
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server
Stack trace
traffic_server: received signal 11 (Segmentation fault)
traffic_server - STACK TRACE:
/opt/ats/bin/traffic_server(crash_logger_invoke(int, siginfo_t*, void*)+0x94)[0x55edd0cc3524]
/lib64/libpthread.so.0(+0xf630)[0x7f8c4352f630]
/opt/ats/lib/trafficserver/libtscore.so.9(ATSConsistentHash::lookup(char const*, std::__1::__map_iterator<std::__1::__tree_iterator<std::__1::__value_type<unsigned long, ATSConsistentHashNode*>, std::__1::__tree_node<std::__1::__value_type<unsigned long, ATSConsistentHashNode*>, void*>*, long> >*, bool*, ATSHash64*)+0xf3)[0x7f8c44a177d3]
/opt/ats/bin/traffic_server(NextHopConsistentHash::findNextHop(tsapi_httptxn*, void*, long)+0x87f)[0x55edd0dc7e3f]
/opt/ats/bin/traffic_server(+0x254617)[0x55edd0d93617]
/opt/ats/bin/traffic_server(+0x2387be)[0x55edd0d777be]
/opt/ats/bin/traffic_server(HttpTransact::handle_response_from_parent(HttpTransact::State*)+0xbaa)[0x55edd0d85f0a]
/opt/ats/bin/traffic_server(HttpTransact::HandleResponse(HttpTransact::State*)+0x4a5)[0x55edd0d7adc5]
/opt/ats/bin/traffic_server(HttpSM::handle_server_setup_error(int, void*)+0x3a1)[0x55edd0d52491]
/opt/ats/bin/traffic_server(HttpSM::state_read_server_response_header(int, void*)+0x540)[0x55edd0d51e90]
/opt/ats/bin/traffic_server(HttpSM::main_handler(int, void*)+0x1ac)[0x55edd0d4099c]
/opt/ats/bin/traffic_server(+0x409883)[0x55edd0f48883]
/opt/ats/bin/traffic_server(UnixNetVConnection::net_read_io(NetHandler*, EThread*)+0xa94)[0x55edd0f47574]
/opt/ats/bin/traffic_server(NetHandler::process_ready_list()+0xa3)[0x55edd0f38793]
/opt/ats/bin/traffic_server(NetHandler::waitForActivity(long)+0x54e)[0x55edd0f38e6e]
/opt/ats/bin/traffic_server(non-virtual thunk to NetHandler::waitForActivity(long)+0xd)[0x55edd0f38f3d]
/opt/ats/bin/traffic_server(EThread::execute_regular()+0x55f)[0x55edd0f68dff]
/opt/ats/bin/traffic_server(EThread::execute()+0x179)[0x55edd0f69079]
/opt/ats/bin/traffic_server(+0x428556)[0x55edd0f67556]
/lib64/libpthread.so.0(+0x7ea5)[0x7f8c43527ea5]
/lib64/libc.so.6(clone+0x6d)[0x7f8c42d288dd]
Segmentation fault
Activity
jrushford commentedon Sep 17, 2021
@meeramn I've tried your exact configuration and curl command on 9.1.x. I've tried the config and am unable to duplicate the crash. I've tried different failure scenarios with the parent, unreachable, trafficserver shutdown, etc and am not able to duplicate the crash. Everything is working as expected.
jrushford commentedon Sep 17, 2021
@meeramn I can re-create the crash when I'm running trafficserver on macOS. I cannot duplicate it on a linux build with devtoolset-9
randall commentedon Sep 20, 2021
We build with llvm 12, so maybe a difference in how gcc/llvm handles things.
Full stack of crashed thread:
Fixes issue apache#8329 crash in NextHopConsistentHash where when the…
Fixes issue apache#8329 crash in NextHopConsistentHash where when the…
Fixes issue apache#8329 crash in NextHopConsistentHash where when the…
Fixes issue apache#8329 crash in NextHopConsistentHash where when the…
Fixes issue apache#8329 crash in NextHopConsistentHash where when the…
Fixes issue apache#8329 crash in NextHopConsistentHash where when the…
Fixes issue #8329 crash in NextHopConsistentHash where when the only (#…
Fixes issue #8329 crash in NextHopConsistentHash where when the only (#…
Merge remote-tracking branch 'asf/9.2.x' into 9.2.x
Merging in from ASF 9.2.x (apache#628)