Skip to content

H2 BAD_ACCESS at Mutex_lock under load #2207

Description

@maskit

I saw this crash twice. I was running five h2load processes with 100 streams per each.

* thread #6, name = '[ET_NET 11]', stop reason = EXC_BAD_ACCESS (code=1, address=0x50)
    frame #0: 0x0000000100021162 traffic_server`Mutex_lock(location=0x0000000003a05928, ahandler=0x0000000000000000, m=0x0000000000000000, t=0x0000000002404000) at I_Lock.h:409
   406 	  ProxyMutex *m, EThread *t)
   407 	{
   408 	  ink_assert(t != 0);
-> 409 	  if (m->thread_holding != t) {
   410 	    ink_mutex_acquire(&m->the_mutex);
   411 	    m->thread_holding = t;
   412 	    ink_assert(m->thread_holding);
(lldb) bt
* thread #6, name = '[ET_NET 11]', stop reason = EXC_BAD_ACCESS (code=1, address=0x50)
  * frame #0: 0x0000000100021162 traffic_server`Mutex_lock(location=0x0000000003a05928, ahandler=0x0000000000000000, m=0x0000000000000000, t=0x0000000002404000) at I_Lock.h:409
    frame #1: 0x00000001000512ee traffic_server`MutexLock::MutexLock(this=0x0000000003a05940, location=0x0000000003a05928, ahandler=0x0000000000000000, am=0x000000000279f120, t=0x0000000002404000) at I_Lock.h:507
    frame #2: 0x000000010003f1e5 traffic_server`MutexLock::MutexLock(this=0x0000000003a05940, location=0x0000000003a05928, ahandler=0x0000000000000000, am=0x000000000279f120, t=0x0000000002404000) at I_Lock.h:506
    frame #3: 0x00000001001a502f traffic_server`Http2ConnectionState::send_a_data_frame(this=0x0000000000cf9e58, stream=0x000000000279f100, payload_length=0x0000000003a05a28) at Http2ConnectionState.cc:1258
    frame #4: 0x00000001001a326a traffic_server`Http2ConnectionState::send_data_frames_depends_on_priority(this=0x0000000000cf9e58) at Http2ConnectionState.cc:1219
    frame #5: 0x00000001001a1401 traffic_server`Http2ConnectionState::main_event_handler(this=0x0000000000cf9e58, event=2254, edata=0x0000000002828380) at Http2ConnectionState.cc:880
    frame #6: 0x000000010001e0f0 traffic_server`Continuation::handleEvent(this=0x0000000000cf9e58, event=2254, data=0x0000000002828380) at I_Continuation.h:153
    frame #7: 0x000000010033da95 traffic_server`EThread::process_event(this=0x0000000002404000, e=0x0000000002828380, calling_code=2254) at UnixEThread.cc:122
    frame #8: 0x000000010033e1c9 traffic_server`EThread::execute(this=0x0000000002404000) at UnixEThread.cc:234
    frame #9: 0x000000010033ce2c traffic_server`spawn_thread_internal(a=0x00000000009070f0) at Thread.cc:91
    frame #10: 0x000000000075093b libsystem_pthread.dylib`_pthread_body + 180
    frame #11: 0x0000000000750887 libsystem_pthread.dylib`_pthread_start + 286
    frame #12: 0x000000000075008d libsystem_pthread.dylib`thread_start + 13
(lldb) p *stream
(Http2Stream) $8 = {
(snip)
  header_blocks_length = 12
  request_header_length = 12
  recv_end_stream = true
  send_end_stream = false
  sent_request_header = false
  response_header_done = true
  request_sent = false
  is_first_transaction_flag = false
(snip)
  trailing_header = false
  body_done = false
  chunked = false
  closed = true
  reentrancy_count = 0
  terminate_stream = true
  data_length = 0
  bytes_sent = 41940160
(snip)
  cross_thread_event = 0x0000000000000000
  active_timeout = 300000000000
  active_event = 0x0000000000000000
  inactive_timeout = 30000000000
  inactive_timeout_at = 0
  inactive_event = 0x0000000000000000
  read_event = 0x0000000000000000
  write_event = 0x0000000000000000
}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions