Here "dead origin" means no origin server process running at localhost:80.
The expected result is that trafficserver returns 502.
However it crashes at 9.1.0 682f899 and the current latest commit in 9.1.x b8c9267.
The current master 40843a9 works as expected.
Also the common ancestor of master and 9.1.x 57a1854 works as expected.
# git merge-base master 9.1.x
57a1854100bc515c7ae4c2fe772cb55c936ab2bf
I tried git bisect using the following script to build and test trafficserver.
build-and-test.sh
#!/bin/bash
build() {
autoreconf -if
./configure
make -j
make install
}
stop_trafficserver() {
pids="$(jobs -p)"
[ -n "$pids" ] && kill $pids
}
run_test() {
trap 'stop_trafficserver' exit
cat <<'EOF' > /usr/local/etc/trafficserver/proxy.lua
function do_global_read_request()
ts.http.skip_remapping_set(1)
ts.client_request.set_url_scheme('http')
ts.client_request.set_url_host('localhost')
ts.client_request.set_url_port(80)
return 0
end
EOF
echo 'tslua.so /usr/local/etc/trafficserver/proxy.lua' > /usr/local/etc/trafficserver/plugin.config
/usr/local/bin/traffic_server &
sleep 2
curl -v localhost:8080
}
build
run_test
git bisect start 682f899871b5af5252d1c1105bf998239a2a8eb8 57a1854100bc515c7ae4c2fe772cb55c936ab2bf
git bisect run /path/to/build-and-test.sh
The first bad commit reported by git bisect is
Add dead server policy control and metric. Improve messages. (#8213) · apache/trafficserver@439ac46
439ac460f2f1bdcb24282a31c1bdebb249b694ce is the first bad commit
commit 439ac460f2f1bdcb24282a31c1bdebb249b694ce
Author: Brian Neradt <brian.neradt@gmail.com>
Date: Fri Aug 6 10:51:07 2021 -0500
Add dead server policy control and metric. Improve messages. (#8213)
(cherry picked from commit 01b91f348a919fa69ccd9727e39aae11bfca2a38)
Co-authored-by: Susan Hinrichs <shinrich@verizonmedia.com>
doc/admin-guide/files/records.config.en.rst | 11 +++++-
.../statistics/core/http-connection.en.rst | 4 ++
include/ts/apidefs.h.in | 1 +
mgmt/RecordsConfig.cc | 2 +
plugins/lua/ts_lua_http_config.c | 2 +
proxy/http/HttpConfig.cc | 6 +++
proxy/http/HttpConfig.h | 4 ++
proxy/http/HttpSM.cc | 24 ++++++++++--
proxy/http/HttpSM.h | 5 +++
proxy/http/HttpTransact.cc | 45 ++++++++++++++++------
src/shared/overridable_txn_vars.cc | 2 +
src/traffic_server/InkAPI.cc | 3 ++
src/traffic_server/InkAPITest.cc | 3 +-
src/tscore/BufferWriterFormat.cc | 8 +++-
14 files changed, 100 insertions(+), 20 deletions(-)
bisect run success
Here "dead origin" means no origin server process running at localhost:80.
The expected result is that trafficserver returns 502.
However it crashes at 9.1.0 682f899 and the current latest commit in 9.1.x b8c9267.
The current master 40843a9 works as expected.
Also the common ancestor of master and 9.1.x 57a1854 works as expected.
I tried
git bisectusing the following script to build and test trafficserver.build-and-test.shThe first bad commit reported by
git bisectisAdd dead server policy control and metric. Improve messages. (#8213) · apache/trafficserver@439ac46