apache / apache/trafficserver

ATS crashes when reloading parent.config

Open
#13,496 2 comments 0 reactions 1 assignee Claimed by @bryancall View on GitHub
Bug Crash Parent Proxy Support
Dominant language
C++
Stars
2k
Forks
874
Avg merge
6d 15h
Merged PRs (30d)
46

Description

# Happened
A crash occurred while using ATS9.2.11
```
Thread 1562, [ET_NET 57]:
0 0x0000557bbf45a498 crash_logger_invoke(int, siginfo_t*, void*) + 0x88
1 0x00007fb9728d1520 __sigaction + 0x50
2 0x0000557bbf53abd2 HttpTransact::handle_request_keep_alive_headers(HttpTransact::State*, HTTPVersion, HTTPHdr*) + 0x32
3 0x0000557bbf53f039 HttpTransact::build_request(HttpTransact::State*, HTTPHdr*, HTTPHdr*, HTTPVersion) + 0xb9
4 0x0000557bbf51e584 HttpTransact::HandleCacheOpenReadHit(HttpTransact::State*) + 0x834
5 0x0000557bbf4f9941 HttpSM::call_transact_and_set_next_state(void (*)(HttpTransact::State*)) + 0x201
6 0x0000557bbf4d7cf2 HttpSM::state_api_callout(int, void*) + 0x592
7 0x0000557bbf4d3eec HttpSM::state_api_callback(int, void*) + 0xec
8 0x0000557bbf47a2fb TSHttpTxnReenable + 0x18b
9 0x00007fb96f625226 0x0 + 0x18b
```
It occurred at the moment parent.config was reloaded.

# My investigation
Based on the code and this stack trace, I suspect the issue is occurring at position [HttpTransact.cc#L6889](https://github.com/apache/trafficserver/blob/9.2.11/proxy/http/HttpTransact.cc#L6889).
`build_request` is called after the null check for [HttpTransact.cc#L2931](https://github.com/apache/trafficserver/blob/fdf5fb223c5eef92991ceb28a53cb8add956914b/proxy/http/HttpTransact.cc#L2931), but it appears there is no subsequent null check.

I would like to know the following
- Is it possible for execution to reach point [HttpTransact.cc#L6889](https://github.com/apache/trafficserver/blob/9.2.11/proxy/http/HttpTransact.cc#L6889) with `s->current.server` being null?
- Are there any other possible causes?

Any help would be appreciated

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.