[SPDK] Re: Print backtrace in SPDK
Yang, Ziye <ziye.yang at intel.com>
| Newsgroups | dev.linux.lists.spdk |
|---|---|
| Message-ID | <BN6PR11MB408187BEF8594BC9558B7ECCFF560@BN6PR11MB4081.namprd11.prod.outlook.com> |
Hi Wenhua, Which applications are you using from SPDK? 1 SPDK NVMe-oF target in target side? 2 SPDK NVMe perf or others? For nvmf_tcp_close_qpair will be called in the following possible cases (not all listed) for TCP transport. But it will be called by spdk_nvmf_qpair_disconnect as the entry. 1 qpair is not in polling group spdk_nvmf_qpair_disconnect nvmf_transport_qpair_fini 2 spdk_nvmf_qpair_disconnect .... _nvmf_qpair_destroy nvmf_transport_qpair_fini .. nvmf_tcp_close_qpair 3 spdk_nvmf_qpair_disconnect .... _nvmf_qpair_destroy _nvmf_ctrlr_free_from_qpair _nvmf_transport_qpair_fini .. nvmf_tcp_close_qpair spdk_nvmf_qpair_disconnect is called by nvmf_tcp_qpair_disconnect in tcp.c. nvmf_tcp_qpair_disconnect is called in the following cases: (1) _pdu_write_done (if there is error for write); (2) nvmf_tcp_qpair_handle_timeout.( No response from initiator in 30s if targets sends c2h_term_req) (3) nvmf_tcp_capsule_cmd_hdr_handle. (Cannot get tcp req) (4) nvmf_tcp_sock_cb. TCP PDU related handling issue. Also in lib/nvmf/ctrlr.c Target side has a timer poller: nvmf_ctrlr_keep_alive_poll. If there is no keep alive command sent from host, it will call spdk_nvmf_qpair_disconnect in related polling group assoicated with the controller. Best Regards Ziye Yang -----Original Message----- From: Wenhua Liu <liuw(a)vmware.com> Sent: Saturday, August 22, 2020 3:15 PM To: Storage Performance Development Kit <spdk(a)lists.01.org> Subject: [SPDK] Print backtrace in SPDK Hi, Does anyone know if there is a function in SPDK that prints the backtrace? I run into a “Connection Reset by Peer” issue on host side when testing NVMe/TCP. I identified it’s because some queue pairs are closed unexpectedly by calling nvmf_tcp_close_qpair, but I could not figure out how/why this function is called. I thought if the backtrace can be printed when calling this function, it might be helpful to me to find the root cause. Thanks, -Wenhua _______________________________________________ SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org