Content-Type: multipart/mixed; boundary="===============3938189848497886022==" MIME-Version: 1.0 From: Harris, James R Subject: Re: [SPDK] SEGFAULT when calling spdk_nvme_qpair_process_completions Date: Tue, 08 Jan 2019 13:56:42 +0000 Message-ID: <88DA0F56-9EF1-4CCC-8EB7-AE68DA541B7F@intel.com> List-ID: To: spdk@lists.01.org --===============3938189848497886022== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Aleix, We will need reproduction steps if an issue is filed in GitHub. Do you hav= e a smaller reproduction vehicle that you can share? Without seeing the co= de for the layer you have on top of the NVMe driver, it will be difficult t= o debug. A few questions: 1) Can you describe the threading model for your program? 2) How are you allocating (and freeing) queues in your program? 3) What does qpair->ctrlr equal when this crash occurs? Meaning is it NULL= , some garbage value, something else? Thanks, -Jim =EF=BB=BFOn 1/8/19, 2:51 PM, "SPDK on behalf of Luse, Paul E" wrote: Hi Aleix, = Thanks, nothing comes to mind off the top of my head - would you mind f= illing an issue at https://github.com/spdk/spdk/issues for this? That will= both make sure we get all the info needed to reproduce and get it reviewed= in our weekly issue scrub forum. Especially if you're using the spdk vagr= ant scripts this should be reproducible. Well, unless someone else has a = quick suggestion or idea here on the mail list... = = Thx Paul = = = -----Original Message----- From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of aleix sanc= his ram=C3=ADrez Sent: Tuesday, January 8, 2019 5:28 AM To: spdk(a)lists.01.org Subject: [SPDK] SEGFAULT when calling spdk_nvme_qpair_process_completio= ns = Hi. I'm currently developing a layer on top of the spdk nvme driver. I'= m getting a segfault when calling spdk_nvme_qpair_process_completions, but only on some specific drive reads. gdb shows that at nvme_qpair.c:3= 95, when trying to access qpair->ctrlr this triggers a segmentation fault, = so i guess the controller state is not valid. This error seems to be consis= tent between executions of the program, but appears in different times in d= ifferent access patterns. What could cause this to happen? = I'm developing in the vagrant image given by spdk, so not on real hardw= are. = gdb Backtrace = Thread 2 "taspdk_merge_so" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff5301700 (LWP 6036)] spdk_nvme_qpair_process= _completions (qpair=3D0x2000009ffef8, max_completions=3D0) at nvme_qpair.c:395 395 if (qpair->ctrlr->is_failed) { (gdb) bt #0 spdk_nvme_qpair_process_completions (qpair=3D0x2000009ffef8, max_completions=3D0) at nvme_qpair.c:395 #1 0x00007ffff73b210d in taspdk_poll_queues (data=3D0x0) at taspdk.c:9 #2 0x00007ffff64d6822 in PollingAPI::handleServices() () from /home/vagrant/ompss-2/nanos6/installation//lib/libnanos6-optimized.so.0= .0.0 #3 0x00007ffff64daf44 in LeaderThread::body() () from /home/vagrant/ompss-2/nanos6/installation//lib/libnanos6-optimized.so.0= .0.0 #4 0x00007ffff653eb8f in kernel_level_thread_body_wrapper(void*) [clon= e .lto_priv.221] () from /home/vagrant/ompss-2/nanos6/installation//lib/libnanos6-optimized.so.0= .0.0 #5 0x00007ffff6f6d6db in start_thread (arg=3D0x7ffff5301700) at pthread_create.c:463 #6 0x00007ffff6c9688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 = _______________________________________________ SPDK mailing list SPDK(a)lists.01.org https://lists.01.org/mailman/listinfo/spdk _______________________________________________ SPDK mailing list SPDK(a)lists.01.org https://lists.01.org/mailman/listinfo/spdk = --===============3938189848497886022==--