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

ep-engine crashes with assertion when on 32-bit machine more then 2Gig data size is reached

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0-developer-preview-4
    • Fix Version/s: None
    • Component/s: couchbase-bucket
    • Security Level: Public
    • Labels:
      None
    • Triage:
      Untriaged

      Description

      I have amd64 kernel but 32-bit userspace. So I can easily have 32-bit processes using full 4g of 32-bit address space. But setting bucket size to 3G and loading data I got memcached into state where it continuously fails with assertion:

      Thread debugging using libthread_db enabled]
      Core was generated by `/root/src/altoros/moxi/repo20/install/bin/memcached.orig -u root -X /root/src/a'.
      Program terminated with signal 6, Aborted.
      #0 0xf7717430 in __kernel_vsyscall ()
      (gdb) bt
      #0 0xf7717430 in __kernel_vsyscall ()
      #1 0xf7528941 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
      #2 0xf752bd72 in *__GI_abort () at abort.c:92
      #3 0xf7521b58 in *_GI__assert_fail (assertion=0xf3ab362c "stats.currentSize.get() < ((size_t)1<<(sizeof(size_t)*8-1))", file=0xf3abfb93 "objectregistry.cc", line=55,
      function=0xf3abfc20 "static void ObjectRegistry::onCreateBlob(Blob*)") at assert.c:81
      #4 0xf3a1adc9 in ObjectRegistry::onCreateBlob (blob=0x1f5ec618) at objectregistry.cc:55
      #5 0xf39b085d in Blob (this=<optimized out>, len=1024) at item.hh:116
      #6 New (len=1024) at item.hh:60

      My guess is that some variables are signed there and 32-bit.

      ep-engine should not allow that. And/or ns_server should not allow that either.

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

        Activity

        Hide
        peter peter added a comment -

        Can you update the affects and fixed version and if you know this is a current or next sprint item, the sprint status as well? Thank you.

        Show
        peter peter added a comment - Can you update the affects and fixed version and if you know this is a current or next sprint item, the sprint status as well? Thank you.
        Hide
        ingenthr Matt Ingenthron added a comment -

        This was reported just now by another user using 2.0.0 on a 32-bit system.

        Show
        ingenthr Matt Ingenthron added a comment - This was reported just now by another user using 2.0.0 on a 32-bit system.
        Hide
        trond Trond Norbye added a comment -

        In 2015 most people are using an operating system capable of running 64 bit binaries if they want to create a database bigger than 2GB. It is simply not worth the extra effort to look through the entire codebase to ensure that we uint64_t everywhere we use size_t and it may grow over 32 bit)

        Show
        trond Trond Norbye added a comment - In 2015 most people are using an operating system capable of running 64 bit binaries if they want to create a database bigger than 2GB. It is simply not worth the extra effort to look through the entire codebase to ensure that we uint64_t everywhere we use size_t and it may grow over 32 bit)

          People

          • Assignee:
            trond Trond Norbye
            Reporter:
            alkondratenko Aleksey Kondratenko (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes