Storage Performance Development Kit (SPDK)
 help / color / mirror / Atom feed
From: Harris, James R <james.r.harris at intel.com>
To: spdk@lists.01.org
Subject: Re: [SPDK] SEGFAULT when calling spdk_nvme_qpair_process_completions
Date: Tue, 08 Jan 2019 13:56:42 +0000	[thread overview]
Message-ID: <88DA0F56-9EF1-4CCC-8EB7-AE68DA541B7F@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3512 bytes --]

Hi Aleix,

We will need reproduction steps if an issue is filed in GitHub.  Do you have a smaller reproduction vehicle that you can share?  Without seeing the code for the layer you have on top of the NVMe driver, it will be difficult to 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


On 1/8/19, 2:51 PM, "SPDK on behalf of Luse, Paul E" <spdk-bounces(a)lists.01.org on behalf of paul.e.luse(a)intel.com> wrote:

    Hi Aleix,
    
    Thanks, nothing comes to mind off the top of my head - would you mind filling 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 vagrant 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 sanchis ramírez
    Sent: Tuesday, January 8, 2019 5:28 AM
    To: spdk(a)lists.01.org
    Subject: [SPDK] SEGFAULT when calling spdk_nvme_qpair_process_completions
    
    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:395, 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 consistent between executions of the program, but appears in different times in different access patterns. What could cause this to happen?
    
    I'm developing in the vagrant image given by spdk, so not on real hardware.
    
    gdb Backtrace
    
    Thread 2 "taspdk_merge_so" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7ffff5301700 (LWP 6036)] spdk_nvme_qpair_process_completions (qpair=0x2000009ffef8,
    max_completions=0) at nvme_qpair.c:395
    395             if (qpair->ctrlr->is_failed) {
    (gdb) bt
    #0  spdk_nvme_qpair_process_completions (qpair=0x2000009ffef8,
    max_completions=0) at nvme_qpair.c:395
    #1  0x00007ffff73b210d in taspdk_poll_queues (data=0x0) 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*) [clone .lto_priv.221] () from
    /home/vagrant/ompss-2/nanos6/installation//lib/libnanos6-optimized.so.0.0.0
    #5  0x00007ffff6f6d6db in start_thread (arg=0x7ffff5301700) 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
    


             reply	other threads:[~2019-01-08 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 13:56 Harris, James R [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-01-08 13:50 [SPDK] SEGFAULT when calling spdk_nvme_qpair_process_completions Luse, Paul E
2019-01-08 12:27 

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=88DA0F56-9EF1-4CCC-8EB7-AE68DA541B7F@intel.com \
    --to=spdk@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox