masaori335 opened a new pull request, #12313: URL: https://github.com/apache/trafficserver/pull/12313
We found that #12193 made below crash. ``` #0 0x0000561ef3087a14 in PendingAction::operator= (this=0x7ff5e541eac8, action=<optimized out>) at /include/tscore/PendingAction.h:109 #1 HttpSM::state_cache_open_write (this=0x7ff5e541c000, event=1108, data=0x7ff5e541e8f0) at /src/proxy/http/HttpSM.cc:2435 #2 0x0000561ef3072903 in HttpSM::main_handler (this=0x7ff5e541c000, event=1108, data=0x7ff5e541e8f0) at /src/proxy/http/HttpSM.cc:2656 #3 0x0000561ef304b325 in HttpCacheSM::state_cache_open_write (this=<optimized out>, event=<optimized out>, data=<optimized out>) at /include/iocore/eventsystem/Continuation.h:236 #4 0x0000561ef3207ab5 in Continuation::handleEvent (this=<optimized out>, event=1108, data=0x7ffa2b19b400) at /include/iocore/eventsystem/Continuation.h:236 #5 CacheVC::callcont (this=0x7ffa2b19b400, event=1108) at /src/iocore/cache/P_CacheInternal.h:262 #6 0x0000561ef32176ce in CacheVC::openWriteStartDone (this=0x7ffa2b19b400, event=<optimized out>, e=<optimized out>) at /src/iocore/cache/CacheWrite.cc:1497 #7 0x0000561ef3218885 in Continuation::handleEvent (this=0x7ffa2b19b400, event=3900, data=0x0) at /include/iocore/eventsystem/Continuation.h:236 #8 Cache::open_write (this=0x7ffa344ff000, cont=0x7ff5e541e878, key=0x7ff5e541e968, info=0x0, apin_in_cache=0, type=CACHE_FRAG_TYPE_HTTP, hostname=0x0, host_len=0) at /src/iocore/cache/CacheWrite.cc:1744 #9 0x0000561ef304b570 in CacheProcessor::open_write (cont=0x7ff5e541e878, key=0x7ff5e541e958, old_info=0x0, type=CACHE_FRAG_TYPE_HTTP, this=<optimized out>, pin_in_cache=<optimized out>) at /src/iocore/cache/Cache.cc:1993 #10 HttpCacheSM::open_write (this=0x7ff5e541e878, key=0x7ff5e541e958, url=<optimized out>, request=<optimized out>, old_info=<optimized out>, pin_in_cache=<optimized out>, retry=<optimized out>, allow_multiple=<optimized out>) at /src/proxy/http/HttpCacheSM.cc:430 #11 0x0000561ef304b058 in HttpCacheSM::state_cache_open_write (this=0x7ff5e541e878, event=2, data=0x7ff99fa01b40) at /src/proxy/http/HttpCacheSM.cc:295 #12 0x0000561ef333d795 in Continuation::handleEvent (this=<optimized out>, event=2, data=0x7ff99fa01b40) at /include/iocore/eventsystem/Continuation.h:236 #13 EThread::process_event (this=0x7ffa42e0af80, e=0x7ff99fa01b40, calling_code=2) at /src/iocore/eventsystem/UnixEThread.cc:162 #14 0x0000561ef333e08d in EThread::execute_regular (this=0x7ffa42e0af80) at /src/iocore/eventsystem/UnixEThread.cc:269 #15 0x0000561ef333e854 in EThread::execute (this=0x7ffa42e0af80) at /src/iocore/eventsystem/UnixEThread.cc:348 #16 0x0000561ef333c6c7 in spawn_thread_internal (a=0x7ffa496894a0) at /src/iocore/eventsystem/Thread.cc:75 #17 0x00007ffa49a897e2 in start_thread () from /lib64/libc.so.6 #18 0x00007ffa49b0e800 in clone3 () from /lib64/libc.so.6 ``` The root cause is the `_read_retry_event` is returned to `HttpSM` from `HttpCacheSM` directly. The pointer stored in the , `HttpSM::pending_action` becomes invalid when `HttpCacheSM` handles or cancel the event. To avoid the crash, return `captive_action` from `HttpCacheSM` like other scheduled events do. -- 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. To unsubscribe, e-mail: github-unsubscr...@trafficserver.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org