Skip to content

ssl_read_from_net assert failure for null buffer block #6849

Description

@sudheerv

Noticing the below crash in prod on our first attempt to test 9.0

(gdb) bt
#0  0x00002aaec7fe24ad in vfprintf () from /lib64/libc.so.6
#1  0x00002aaec7fed287 in fprintf () from /lib64/libc.so.6
#2  0x00002aaec569011d in fatal_va(const char *, const char *, typedef __va_list_tag __va_list_tag *) (hdr=hdr@entry=0x2aaec570dafd "Fatal: ", fmt=fmt@entry=0x2aaec570d2a7 "%s:%d: failed assertion `%s`", ap=ap@entry=0x2aaed9104858) at ink_error.cc:47
#3  0x00002aaec5690356 in ink_abort (message_format=message_format@entry=0x2aaec570d2a7 "%s:%d: failed assertion `%s`") at ink_error.cc:96
#4  0x00002aaec568d045 in _ink_assert (expression=expression@entry=0x8210bd "current_block != nullptr", file=file@entry=0x820e40 "SSLNetVConnection.cc", line=line@entry=271) at ink_assert.cc:37
#5  0x0000000000742dc3 in ssl_read_from_net (ret=<synthetic pointer>, lthread=<optimized out>, sslvc=0x2aaf5f602340) at SSLNetVConnection.cc:271
#6  SSLNetVConnection::net_read_io (this=0x2aaf5f602340, nh=0x2aaecd809d80, lthread=<optimized out>) at SSLNetVConnection.cc:662
#7  0x0000000000761b48 in NetHandler::process_ready_list (this=this@entry=0x2aaecd809d80) at UnixNet.cc:412
#8  0x0000000000761e3d in NetHandler::waitForActivity (this=0x2aaecd809d80, timeout=<optimized out>) at UnixNet.cc:547
#9  0x00000000007c02fa in EThread::execute_regular (this=this@entry=0x2aaecd806000) at UnixEThread.cc:266
#10 0x00000000007c05c2 in EThread::execute (this=0x2aaecd806000) at UnixEThread.cc:327
#11 0x00000000007be969 in spawn_thread_internal (a=0x2aaec9565180) at Thread.cc:92
#12 0x00002aaec72e6dd5 in start_thread () from /lib64/libpthread.so.0
#13 0x00002aaec8097ead in clone () from /lib64/libc.so.6
(gdb) 
(gdb) p (*(IOBufferBlock *) 0x2aaf619e0880).next.m_ptr 
$15 = (IOBufferBlock *) 0x2aaf2a5ad480
(gdb) p (*(*(IOBufferBlock *) 0x2aaf619e0880).next.m_ptr)
$12 = {
  <RefCountObj> = {
    <ForceVFPTToTop> = {
      _vptr.ForceVFPTToTop = 0x7c5b68 <vtable for IOBufferBlock+16>
    }, 
    members of RefCountObj: 
    m_refcount = 1
  }, 
  members of IOBufferBlock: 
  _start = 0x0, 
  _end = 0x0, 
  _buf_end = 0x3532254332353215 <Address 0x3532254332353215 out of bounds>, 
  _location = 0x7e0a20 "memory/IOBuffer/HttpSM.cc:5840", 
  data = {
    m_ptr = 0x2aaed5736d80
  }, 
  next = {
    m_ptr = 0x0
  }
}
(gdb) p (*(*(IOBufferBlock *) 0x2aaf619e0880).next.m_ptr)._start
$17 = 0x0
(gdb) p (*(*(IOBufferBlock *) 0x2aaf619e0880).next.m_ptr)._buf_end
$18 = 0x3532254332353215 <Address 0x3532254332353215 out of bounds>
(gdb) p (*(*(IOBufferBlock *) 0x2aaf619e0880).next.m_ptr)._end
$13 = 0x0
(gdb) 
(gdb) p (*(*(IOBufferBlock *) 0x2aaf619e0880).next.m_ptr).next.m_ptr
$11 = (IOBufferBlock *) 0x0
(gdb) 

(gdb) p *(*(IOBufferBlock *) 0x2aaf619e0880).next.m_ptr.data.m_ptr
$4 = {
  <RefCountObj> = {
    <ForceVFPTToTop> = {
      _vptr.ForceVFPTToTop = 0x7c5b40 <vtable for IOBufferData+16>
    }, 
    members of RefCountObj: 
    m_refcount = 1
  }, 
  members of IOBufferData: 
  _size_index = 3833167203381096996, 
  _mem_type = DEFAULT_ALLOC, 
  _data = 0x0, 
  _location = 0x7e0a20 "memory/IOBuffer/HttpSM.cc:5840"
}


(gdb) p *(*(IOBufferBlock *) 0x2aaf619e0880).data.m_ptr
$5 = {
  <RefCountObj> = {
    <ForceVFPTToTop> = {
      _vptr.ForceVFPTToTop = 0x7c5b40 <vtable for IOBufferData+16>
    }, 
    members of RefCountObj: 
    m_refcount = 2
  }, 
  members of IOBufferData: 
  _size_index = 5, 
  _mem_type = DEFAULT_ALLOC, 
  _data = 0x2aaf60059000 "fZEERBbg3lcGkSgSxwSEiO8Ho; sl=\"v=1&sGsuF\"; lidc=\"b=OB50:s=O:r=O:g=2299:u=15:i=1591116679:t=1591203079:v=1:sig=AQE4cHsiP5eLt8aPshPpFX0rbvF3arjp\"\r\nHost: www.linkedin.com\r\nUser-Agent: Mozilla/5.0 (iPhone"..., 
  _location = 0x81cc70 "memory/IOBuffer/ProtocolProbeSessionAccept.cc:59"
}



Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions