Permalink
Commits on Jun 23, 2017
  1. MB-24509: Prevent truncation of documents set with noreply

    A reference to the item was not retained for the time the downstream
    connection needs the data from the item. The upstream could then free
    the item midway through the downstream sending the data to Couchbase
    Server.
    
    This issue can be easily observed from a memcache client using the ASCII
    protocol:
    
    * Set+noreply a given key to a large (~20MB) document
    * Get the document - should match the set document
    * Set+noreply to the same key, again with a large document
    * Get it a second time - document is now likely to have a small chunk
      of the correct data (in testing ~131kb) and the rest is null bytes,
      padding the document to the correct size
    
    Change-Id: I6a316114aca3ee522d63f08bab17170f56a9d9e2
    Reviewed-on: http://review.couchbase.org/78763
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    jameseh96 committed with daverigby May 30, 2017
Commits on Jun 1, 2017
  1. Update log entry from failed writes

    Change-Id: Ic77f5b5b801280df2e558acbec4e6766c998ccaf
    Reviewed-on: http://review.couchbase.org/78889
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed Jun 1, 2017
Commits on May 25, 2017
  1. CBSE-3717: Remove logging for conn_set_state with available bytes

    This would be the common case for client facing connections
    when it is blocking waiting for the response from the memcached
    servers (and would cause the logs to grow pretty big)
    
    Change-Id: I87eef7cb4fd37ede2a7ac21d72776c4bb13089ee
    Reviewed-on: http://review.couchbase.org/78352
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed May 19, 2017
Commits on May 10, 2017
  1. CBSE-3717: __LINE__ should be formatted with %d

    The preprocessor macro __LINE__ is a number and not a textual
    string. It would cause the printf to access invalid memory.
    
    Change-Id: I8a85b567e54a71bffec486dc62cff56ebd67811b
    Reviewed-on: http://review.couchbase.org/77933
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed May 10, 2017
  2. CBSE-3717: Disable assertions for dropping connections with rbytes>0

    Disabling the assertion allows the connection to be closed and
    server to continue to operate.
    
    It does however _NOT_ solve the reason _why_ the connection
    isn't found in the list (The logging added in the previous
    patch may sched some light on that)
    
    Change-Id: Ie8ea56d2390a49ec674d7d03d58b910ca728f64c
    Reviewed-on: http://review.couchbase.org/77931
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed May 10, 2017
  3. CBSE-3717: Log when we're trying to suspend a connection with bytes a…

    …vailable
    
    Change-Id: Ib33d6b990a945fb4d2f812f3f624f984a2510bef
    Reviewed-on: http://review.couchbase.org/77928
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed May 10, 2017
Commits on Feb 21, 2017
  1. Remove typedef for evutil_socket_t

    We're currently building with libevent from cbdeps so we
    know the version of libevent being used.
    
    Change-Id: I2b42f786a113c00e7a9d322dd4a51368c0d9d4f0
    Reviewed-on: http://review.couchbase.org/74024
    Tested-by: Build Bot <build@couchbase.com>
    Well-Formed: Build Bot <build@couchbase.com>
    Reviewed-by: Daniel Owen <owend@couchbase.com>
    trondn committed Feb 21, 2017
Commits on Nov 16, 2016
  1. MB-21591: CVE reported by Talos

    Disallow packets where the sum of the different parts in the
    header don't match up.
    
    http://www.talosintelligence.com/reports/TALOS-2016-0219/
    http://www.talosintelligence.com/reports/TALOS-2016-0220/
    http://www.talosintelligence.com/reports/TALOS-2016-0221/
    
    Change-Id: Iab18dda4a49665a91e20c577649d2fab5a31b09d
    Reviewed-on: http://review.couchbase.org/69855
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed Nov 14, 2016
Commits on Sep 6, 2016
  1. MB-20792: Use cJSON_Free() to free allocations made by cJSON_Print

    Otherwise we can get mismatched malloc/free when using cbmalloc or
    another custom allocator.
    
    Change-Id: I30a3266aa70550400f3a0ce08d494ee71cbbbed5
    Reviewed-on: http://review.couchbase.org/67315
    Tested-by: Dave Rigby <daver@couchbase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    daverigby committed Aug 30, 2016
Commits on Jan 7, 2016
  1. MB-17253: Set VERSION to product version

    The build process tried to determine the version from GIT,
    which failed on some systems. Set it to PRODUCT_VERSION
    instead.
    
    Change-Id: I41261b8464602ba0760ee2cbc1a380eb49c0fbc0
    Reviewed-on: http://review.couchbase.org/58335
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed Jan 7, 2016
Commits on Oct 15, 2015
  1. MB-16524: Don't destroy configuation for allocation errors

    We're returning the error condition up the stack
    
    Change-Id: I66a27551f1e0a71b64b7e7dc51a469a0df177411
    Reviewed-on: http://review.couchbase.org/56144
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Jim Walker <jim@couchbase.com>
    trondn committed Oct 15, 2015
Commits on Oct 6, 2015
  1. MB-16435: OS X: Add correct rpath for vbuckettool & vbucketkeygen

    Add explicit runtime linker search paths to vbuckettool &
    vbucketkeygen so they can locate their runtime library dependancies
    without an external DYLD_LIBRARY_PATH being set (which is no longer
    possible from OS X 10.11 "El Capitan" onwards).
    
    Change-Id: I74bdaa24cad5d09fd6653ccca1e7278d29f8536b
    Reviewed-on: http://review.couchbase.org/55759
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    daverigby committed with trondn Oct 5, 2015
Commits on Jul 23, 2015
  1. Add build support for VS2015 Community edition

    Change-Id: Ibd667fdfe632b40a18ab0b0feb709301deb9631a
    Reviewed-on: http://review.couchbase.org/53552
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed with daverigby Jul 22, 2015
Commits on Jul 6, 2015
  1. MB-12763: large body length value causes moxi to restart

    Disconnect the client if it tries to send a packet bigger
    than 20MB, or a packet where the extlen/keylen is bigger
    than the entire packet.
    
    Change-Id: I60a5ac0e7e289009fee1f0dff9ff9aedf9bbe19d
    Reviewed-on: http://review.couchbase.org/52829
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed Jul 3, 2015
Commits on Jun 2, 2015
  1. Link with platform to get better assert

    Change-Id: I398b867001362b449bc82a20e2296e712c4136d7
    Reviewed-on: http://review.couchbase.org/51685
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed Jun 2, 2015
Commits on Apr 24, 2015
  1. MB-14649: Fix crash on WIN64 on some CPU's

    There is a bug in the MS runtime libs causing a crash on some
    CPUs. See:
    
    https://connect.microsoft.com/VisualStudio/feedbackdetail/view/981479/visual-studio-2013-c-runtime-illegal-instruction-if-avx-is-disabled
    
    Change-Id: I645edbd510f98b5d4c98d5c613010129f1f85408
    Reviewed-on: http://review.couchbase.org/50172
    Reviewed-by: Chris Hillery <ceej@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    trondn committed Apr 24, 2015
Commits on Apr 9, 2015
  1. MB-14288: Log if we're failing to allocate item

    Change-Id: I279ba28787faad8a7f96eae847bcbd7cbb01faec
    Reviewed-on: http://review.couchbase.org/49437
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Trond Norbye <trond.norbye@gmail.com>
    trondn committed Apr 9, 2015
  2. MB-14288: Don't crash for closed

    If we try to "force close" a connection we might
    end up trying to call "close" on it twice which
    cause one of the assertions to trigger. Just bail
    out the second time
    
    Change-Id: Id779b5bc539441ca1862e1e5e6bbdbf1f4ec4d6f
    Reviewed-on: http://review.couchbase.org/49436
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Trond Norbye <trond.norbye@gmail.com>
    trondn committed Apr 9, 2015
  3. Use cb_assert instead of assert

    Change-Id: If6b3170af815c324b26ff44bea3b950deed774fd
    Reviewed-on: http://review.couchbase.org/49431
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    trondn committed Apr 9, 2015
  4. MB-14288: Allow allocations > 1M

    This might very well be the root case for MB-13072 as well
    
    Change-Id: If634b87502747e81b3ef9e48d7e4d20bbeb817dd
    Reviewed-on: http://review.couchbase.org/49432
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    trondn committed Apr 9, 2015
Commits on Apr 1, 2015
  1. CBD-1518: Search for curl headers using correct variable

    Change-Id: I5a55659844c8526e7f5f3cdb05c0d7a419449d03
    Reviewed-on: http://review.couchbase.org/49017
    Reviewed-by: Chris Hillery <ceej@couchbase.com>
    Tested-by: Chris Hillery <ceej@couchbase.com>
    ceejatec committed Apr 1, 2015
Commits on Feb 2, 2015
  1. Revert "MB-13259: Globally set CMP0042 policy"

    This reverts commit 2ace65b.
    
    Change-Id: I530b5badd5536c92b973e4a71e6ccc156de5afdc
    Reviewed-on: http://review.couchbase.org/46237
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Tested-by: Trond Norbye <trond.norbye@gmail.com>
    trondn committed Feb 2, 2015
  2. MB-13259: Globally set CMP0042 policy

    Change-Id: If24bb8e44ccab44bdf223adec051d870c8d60364
    Reviewed-on: http://review.couchbase.org/46209
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    trondn committed Feb 2, 2015
Commits on Dec 4, 2014
  1. MB-9222: Document -r option

    Change-Id: Id14473124e3967ad893eda598a3a8656c950ad9d
    Reviewed-on: http://review.couchbase.org/43930
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    ceejatec committed Dec 4, 2014
Commits on Nov 20, 2014
  1. Remove unused variables

    Change-Id: I3b4f209c709cf963625144312316b3ee627410f0
    Reviewed-on: http://review.couchbase.org/43442
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed Nov 20, 2014
Commits on Nov 19, 2014
  1. Start using @rpath for MacOSX correctly

    Introduced in CMake 3 there is a new policy for dealing with
    rpath.
    
    Change-Id: I511da057eb794983617dec983a6a49114082bd28
    Reviewed-on: http://review.couchbase.org/43398
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed Nov 19, 2014
Commits on Nov 5, 2014
  1. Remove compile warnings on MacOSX with htonll

    Change-Id: I33e1ca3992a6c1eebbe8ea970b0d6dcc174b1ead
    Reviewed-on: http://review.couchbase.org/42835
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: Trond Norbye <trond.norbye@gmail.com>
    trondn committed Nov 5, 2014
  2. Remove compile warning

    variable ‘written’ set but not used [-Wunused-but-set-variable]
    
    Change-Id: I3916131e4fad6a7a96c9e46579056e2352496e79
    Reviewed-on: http://review.couchbase.org/42825
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: Trond Norbye <trond.norbye@gmail.com>
    trondn committed Nov 5, 2014
Commits on Aug 29, 2014
  1. MB-11804: Handle errors during connect in windows

    Handle WSAEINPROGRESS and WSAEWOULDBLOCK errors while connecting
    to a downstream connection
    
    Change-Id: Ie573a67a937ce2c7c3c27243ebabd721691c51fe
    Reviewed-on: http://review.couchbase.org/41065
    Tested-by: Sriram Ganesan <sriram@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    sriganes committed with trondn Aug 28, 2014
Commits on Jul 25, 2014
  1. MB-8601: Calmer error message when zero vbuckets in map.

    During moxi startup, moxi might be racing with cluster-mgr REST
    availability and moxi might temporarily receive an empty vBucketMap.
    
    Change-Id: I2c6f78dd75727ed55d7e0fe6e189a91ee890f5f0
    Reviewed-on: http://review.couchbase.org/39897
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>
    Reviewed-by: Bin Cui <bin.cui@gmail.com>
    steveyen committed with bcui6611 Jul 25, 2014
  2. MB-8601: More helpful warning on moxi racy startup.

    When packaged with Couchbase Server, the preeminent user of moxi
    nowadays, there might be a service startup race where the moxi process
    starts earlier than cluster-map REST service readiness.
    
    Instead of emitting ERROR message, use softer WARNING verbiage
    to try to enhance calm.
    
    Change-Id: Id5485e83483c336ac22cb1ce187c7dffbcf4f0e1
    Reviewed-on: http://review.couchbase.org/39895
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>
    steveyen committed Jul 25, 2014
  3. Include CheckFunctionExists to CMakeLists.txt.

    Without this change, a "cmake ." for me would error with...
    
        Unknown CMake command "CHECK_FUNCTION_EXISTS".
    
    Change-Id: Ic970d133eae2e8100a27ff0d2a9c3d79a9ef19a2
    Reviewed-on: http://review.couchbase.org/39818
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>
    steveyen committed Jul 24, 2014
Commits on Jul 24, 2014
  1. Add CMakeCache.txt to .gitignore.

    Change-Id: I165a3e2f17a50f9f21456a1690862db38b483c7e
    Reviewed-on: http://review.couchbase.org/39816
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Tested-by: Trond Norbye <trond.norbye@gmail.com>
    steveyen committed with trondn Jul 24, 2014
Commits on Jun 2, 2014
  1. MB-11202: Use SecureTransport for SSL on OS X

    As libcurl has been updated to use the native SSL library (see
    http://review.couchbase.org/#/c/37653/), update moxi (which also uses
    libcurl) to link against the relevent library depending on platform.
    
    Change-Id: I4109b55768b11333bfd3e122463caaab4f95ba86
    Reviewed-on: http://review.couchbase.org/37721
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Tested-by: Trond Norbye <trond.norbye@gmail.com>
    daverigby committed with trondn Jun 2, 2014
Commits on May 28, 2014
  1. MB-11202: Add OpenSSL libs to users of libcurl

    Moxi uses libcurl; which is now being built with OpenSSL
    support. Therefore also link in OpenSSL libraries.
    
    Change-Id: I3041566aaf715a207bb71f75253d4d11d4ee6eed
    Reviewed-on: http://review.couchbase.org/37654
    Reviewed-by: Chris Hillery <ceej@couchbase.com>
    Tested-by: Chris Hillery <ceej@couchbase.com>
    daverigby committed with ceejatec May 28, 2014