Skip to content

SM magic assert on callback with EVENT_INTERVAL #6859

@sudheerv

Description

@sudheerv

Looks like an HttpSM assert failure when delaying do_http_server_open() - rescheduled due to ProxyTransaction and netvc not being on the same thread (ProxyTransaction::adjust_thread() logic).

Weird thing is that when I check the magic for HttpSM in the Continuation's handleEvent dispatcher, it seems to be valid.

(gdb) bt
#0  0x00002ac802788207 in raise () from /lib64/libc.so.6
#1  0x00002ac8027898f8 in abort () from /lib64/libc.so.6
#2  0x00002ac7ffe4835b in ink_abort (message_format=message_format@entry=0x2ac7ffec52a7 "%s:%d: failed assertion `%s`") at ink_error.cc:99
#3  0x00002ac7ffe45045 in _ink_assert (expression=expression@entry=0x7de8f0 "magic == HTTP_SM_MAGIC_ALIVE", file=file@entry=0x7de2f6 "HttpSM.cc", line=line@entry=2701) at ink_assert.cc:37
#4  0x000000000055069a in HttpSM::main_handler (this=<optimized out>, event=<optimized out>, data=<optimized out>) at HttpSM.cc:2701
#5  0x00000000007bb7c0 in handleEvent (data=0x2ac846a9a7c0, event=2, this=0x2ac8926a4420) at I_Continuation.h:193
#6  EThread::process_event (this=this@entry=0x2ac806513000, e=e@entry=0x2ac846a9a7c0, calling_code=2) at UnixEThread.cc:127
#7  0x00000000007bc834 in EThread::execute_regular (this=this@entry=0x2ac806513000) at UnixEThread.cc:236
#8  0x00000000007bcc62 in EThread::execute (this=0x2ac806513000) at UnixEThread.cc:327
#9  0x00000000007bafe9 in spawn_thread_internal (a=0x2ac803d63c40) at Thread.cc:92
#10 0x00002ac801a9edd5 in start_thread () from /lib64/libpthread.so.0
#11 0x00002ac80284fead in clone () from /lib64/libc.so.6
(gdb) f 5
#5  0x00000000007bb7c0 in handleEvent (data=0x2ac846a9a7c0, event=2, this=0x2ac8926a4420) at I_Continuation.h:193
193	I_Continuation.h: No such file or directory.
(gdb) p event
$21 = 2
(gdb) p *this
$22 = {<force_VFPT_to_top> = {_vptr.force_VFPT_to_top = 0x7e0110 <vtable for HttpSM+24>}, handler = (int (Continuation::*)(Continuation * const, int, void *)) 0x550670 <HttpSM::main_handler(int, void*)>, mutex = {
    m_ptr = 0x2ac8a11439b0}, link = {<SLink<Continuation>> = {next = 0x0}, prev = 0x0}, control_flags = {raw_flags = 0}, thread_affinity = 0x2ac805406000}
(gdb) p ((HttpSM*)0x2ac8926a4420)->magic
$23 = 65261
(gdb) p ((HttpSM*)0x2ac8926a4420)->default_handler
$24 = (int (HttpSM::*)(HttpSM * const, int, void *)) 0x555bd0 <HttpSM::state_http_server_open(int, void*)>
(gdb) 
(gdb) p ((HttpSM*)0x2ac8926a4420)->t_state.m_magic
$26 = HttpTransact::HTTP_TRANSACT_MAGIC_ALIVE

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions