title: How can I find which thread caused SEGV in coredump with rust-lldb?
body: <p>I am using cargo test, and I find some test occasionally fails.</p>
  <pre><code>error: test failed, to rerun pass '-p tests --test failpoints'
  
  Caused by:
    process didn't exit successfully: `/Users/calvin/tidb-engine-ext/target/debug/deps/failpoints-44d88b8bf264f28d test_snap` (signal: 11, SIGSEGV: invalid memory reference)
  </code></pre>
  <p>However, when I use lldb, I find all threads are stopped with signal <code>SIGSTOP</code>, so it must because cargo eats SIGSEGV, and ends up with SIGSTOP.</p>
  <p>My question is how can we get what actually causes this SIGSEGV?</p>
  <pre><code>Process 0 stopped
  * thread #1: tid = 0x0000, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #2: tid = 0x0001, 0x00007fff205b3602 libsystem_pthread.dylib`_pthread_create + 574, stop reason = signal SIGSTOP
    thread #3: tid = 0x0002, 0x00007fff2057f53a libsystem_kernel.dylib`__psynch_mutexwait + 10, stop reason = signal SIGSTOP
    thread #4: tid = 0x0003, 0x00007fff2057f53a libsystem_kernel.dylib`__psynch_mutexwait + 10, stop reason = signal SIGSTOP
    thread #5: tid = 0x0004, 0x00007fff2057f53a libsystem_kernel.dylib`__psynch_mutexwait + 10, stop reason = signal SIGSTOP
    thread #6: tid = 0x0005, 0x00007fff2057f53a libsystem_kernel.dylib`__psynch_mutexwait + 10, stop reason = signal SIGSTOP
    thread #7: tid = 0x0006, 0x0000000000800000, stop reason = signal SIGSTOP
    thread #8: tid = 0x0007, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #9: tid = 0x0008, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #10: tid = 0x0009, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #11: tid = 0x000a, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #12: tid = 0x000b, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #13: tid = 0x000c, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #14: tid = 0x000d, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #15: tid = 0x000e, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #16: tid = 0x000f, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #17: tid = 0x0010, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #18: tid = 0x0011, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #19: tid = 0x0012, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #20: tid = 0x0013, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #21: tid = 0x0014, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #22: tid = 0x0015, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #23: tid = 0x0016, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #24: tid = 0x0017, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #25: tid = 0x0018, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #26: tid = 0x0019, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #27: tid = 0x001a, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #28: tid = 0x001b, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #29: tid = 0x001c, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #30: tid = 0x001d, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #31: tid = 0x001e, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #32: tid = 0x001f, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #33: tid = 0x0020, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #34: tid = 0x0021, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #35: tid = 0x0022, 0x00007fff2057fc22 libsystem_kernel.dylib`__semwait_signal + 10, stop reason = signal SIGSTOP
    thread #36: tid = 0x0023, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #37: tid = 0x0024, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #38: tid = 0x0025, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #39: tid = 0x0026, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #40: tid = 0x0027, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #41: tid = 0x0028, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #42: tid = 0x0029, 0x00007fff2057f53a libsystem_kernel.dylib`__psynch_mutexwait + 10, stop reason = signal SIGSTOP
    thread #43: tid = 0x002a, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #44: tid = 0x002b, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #45: tid = 0x002c, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #46: tid = 0x002d, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #47: tid = 0x002e, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #48: tid = 0x002f, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #49: tid = 0x0030, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #50: tid = 0x0031, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #51: tid = 0x0032, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #52: tid = 0x0033, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #53: tid = 0x0034, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #54: tid = 0x0035, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #55: tid = 0x0036, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #56: tid = 0x0037, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #57: tid = 0x0038, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #58: tid = 0x0039, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #59: tid = 0x003a, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #60: tid = 0x003b, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #61: tid = 0x003c, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #62: tid = 0x003d, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #63: tid = 0x003e, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #64: tid = 0x003f, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #65: tid = 0x0040, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #66: tid = 0x0041, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #67: tid = 0x0042, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #68: tid = 0x0043, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #69: tid = 0x0044, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #70: tid = 0x0045, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #71: tid = 0x0046, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #72: tid = 0x0047, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #73: tid = 0x0048, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #74: tid = 0x0049, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #75: tid = 0x004a, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #76: tid = 0x004b, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #77: tid = 0x004c, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #78: tid = 0x004d, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #79: tid = 0x004e, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #80: tid = 0x004f, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #81: tid = 0x0050, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #82: tid = 0x0051, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #83: tid = 0x0052, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #84: tid = 0x0053, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #85: tid = 0x0054, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #86: tid = 0x0055, 0x00007fff2057f53a libsystem_kernel.dylib`__psynch_mutexwait + 10, stop reason = signal SIGSTOP
    thread #87: tid = 0x0056, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #88: tid = 0x0057, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #89: tid = 0x0058, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #90: tid = 0x0059, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #91: tid = 0x005a, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #92: tid = 0x005b, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #93: tid = 0x005c, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #94: tid = 0x005d, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #95: tid = 0x005e, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #96: tid = 0x005f, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #97: tid = 0x0060, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #98: tid = 0x0061, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #99: tid = 0x0062, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #100: tid = 0x0063, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #101: tid = 0x0064, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #102: tid = 0x0065, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #103: tid = 0x0066, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #104: tid = 0x0067, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #105: tid = 0x0068, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #106: tid = 0x0069, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
    thread #107: tid = 0x006a, 0x00007fff2057fd4e libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP
  </code></pre>