Segmentation fault in HttpTunnel::chain_abort_all about gzip,HttpTunnel
- Dominant language
- C++
- Stars
- 2k
- Forks
- 874
- Avg merge
- 6d 15h
- Merged PRs (30d)
- 46
Description
1.coredump
Since we modified some of the code, the number of lines of code may not correspond.(version:6.2.1)
```
#0 0x0000000000000000 in ?? ()
#1 0x00000000005d8242 in HttpTunnel::chain_abort_all (this=0x2adf29698b08, p=0x2adf29698e28) at HttpTunnel.cc:1444
#2 0x0000000000589f5e in HttpSM::tunnel_handler_ua (this=0x2adf296977e0, event=3, c=0x2adf29698c28) at HttpSM.cc:3236
#3 0x00000000005db71d in HttpTunnel::consumer_handler (this=0x2adf29698b08, event=3, c=0x2adf29698c28) at HttpTunnel.cc:1376
#4 0x00000000005dc87d in HttpTunnel::main_handler (this=0x2adf29698b08, event=, data=)
at HttpTunnel.cc:1627
#5 0x0000000000724ce7 in handleEvent (event=, nh=0x2adee5f71cf0, vc=0x2ae040006700)
at ../../iocore/eventsystem/I_Continuation.h:153
#6 write_signal_and_update (event=, nh=0x2adee5f71cf0, vc=0x2ae040006700) at UnixNetVConnection.cc:181
#7 write_signal_done (event=, nh=0x2adee5f71cf0, vc=0x2ae040006700) at UnixNetVConnection.cc:223
#8 0x0000000000725740 in write_signal_error (nh=0x2adee5f71cf0, vc=0x2ae040006700, thread=0x2adee5f6e010) at UnixNetVConnection.cc:242
#9 write_to_net_io (nh=0x2adee5f71cf0, vc=0x2ae040006700, thread=0x2adee5f6e010) at UnixNetVConnection.cc:544
#10 0x0000000000716f4c in NetHandler::mainNetEvent (this=0x2adee5f71cf0, event=, e=) at UnixNet.cc:530
#11 0x0000000000743e8d in handleEvent (this=0x2adee5f6e010, e=0x11ec580, calling_code=5) at I_Continuation.h:153
#12 EThread::process_event (this=0x2adee5f6e010, e=0x11ec580, calling_code=5) at UnixEThread.cc:148
#13 0x00000000007447d9 in EThread::execute (this=0x2adee5f6e010) at UnixEThread.cc:275
#14 0x00000000007432ca in spawn_thread_internal (a=0x1178980) at Thread.cc:86
#15 0x000000355c6079d1 in start_thread () from /lib64/libpthread.so.0
#16 0x000000355bee8b6d in clone () from /lib64/libc.so.6
```
2. environment
```
client: with Accept-Encoding:gzip header
ats: version:6.2.1,open gzip plugin,now is compress
os: not support gzip function
c--ats--os
```
In our version, ats caches the original and compressed versions.

3.Required condition
- gdb traffic_server, make a break in HttpSM::perform_transform_cache_write_action(include add cache_write_t consumer) function.
- The client requests a compressed(gzip) file and closes the connection in advance.
- When determining that the client connection is closed. continue gdb traffic_server, first will notice you Broken PIPE,then it will be coredump at above.
Contributor guide
Assessment
This issue has not been assessed yet.