Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-18586

fdb_open gets stuck on initial_lock on Raspberry Pi

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Trivial
    • 4.5.0, 5.0.0
    • 4.5.0
    • forestdb
    • None
    • Untriaged
    • No

    Description

      Hitting this issue with most of the forestdb tests. It looks like on a Raspbery Pi (For whatever reason) the `initial_lock` is locked from the start of main:

      1
       will@pi3  /home/will/usb/couchbase/couchbase/build/forestdb/tests/functional   gdb ./compact_functional_test                                                                                                                   20:57:35
      2
      GNU gdb (Raspbian 7.7.1+dfsg-5) 7.7.1
      3
      Copyright (C) 2014 Free Software Foundation, Inc.
      4
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      5
      This is free software: you are free to change and redistribute it.
      6
      There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
      7
      and "show warranty" for details.
      8
      This GDB was configured as "arm-linux-gnueabihf".
      9
      Type "show configuration" for configuration details.
      10
      For bug reporting instructions, please see:
      11
      <http://www.gnu.org/software/gdb/bugs/>.
      12
      Find the GDB manual and other documentation resources online at:
      13
      <http://www.gnu.org/software/gdb/documentation/>.
      14
      For help, type "help".
      15
      Type "apropos word" to search for commands related to "word"...
      16
      Reading symbols from ./compact_functional_test...done.
      17
      (gdb) b main
      18
      Breakpoint 1 at 0x12678: file /home/will/usb/couchbase/couchbase/forestdb/tests/functional/compact_functional_test.cc, line 3284.
      19
      (gdb) run
      20
      Starting program: /home/will/usb/couchbase/couchbase/build/forestdb/tests/functional/compact_functional_test
      21
      [Thread debugging using libthread_db enabled]
      22
      Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
      23
       
      24
      Breakpoint 1, main () at /home/will/usb/couchbase/couchbase/forestdb/tests/functional/compact_functional_test.cc:3284
      25
      3284    int main(){
      26
      (gdb) p initial_lock
      27
      $1 = 1
      28
      (gdb)
      

      By comparison on my macbook;

      1
      (lldb) b main
      2
      Breakpoint 1: where = compact_functional_test`main + 4 at compact_functional_test.cc:3287, address = 0x0000000100012794
      3
      (lldb) run
      4
      Process 22002 launched: './compact_functional_test' (x86_64)
      5
      Process 22002 stopped
      6
      * thread #1: tid = 0x126a47c, 0x0000000100012794 compact_functional_test`main + 4 at compact_functional_test.cc:3287, queue = 'com.apple.main-thread, stop reason = breakpoint 1.1
      7
          frame #0: 0x0000000100012794 compact_functional_test` main  + 4 at compact_functional_test.cc:3287
      8
         3284	int main(){
      9
         3285	    int i;
      10
         3286
      11
      -> 3287	    compact_deleted_doc_test();
      12
         3288	    compact_upto_test(false); // single kv instance in file
      13
         3289	    compact_upto_test(true); // multiple kv instance in file
      14
         3290	    wal_delete_compact_upto_test();
      15
      (lldb) p initial_lock
      16
      (OSSpinLock) $0 = 0
      

      Edit:

      Seems to be an initialisation issue. I manually set the spinlock to 0 when inside the spinlock loop and it continued on fine.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            will.gardner Will Gardner (Inactive)
            will.gardner Will Gardner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty