Valgrind Error Details

back to process details
back to processes overview
Executable./memcached
PID14776
PPID14773
Unique ID0x0
TextInvalid write of size 1
Auxiliary Address 0x24d05c2a is 11,557,930 bytes inside a block of size 25,165,824 alloc'd
Suppression{
   <insert_a_suppression_name_here>
   Memcheck:Addr1
   fun:memcpy@GLIBC_2.2.5
   fun:__copy_m<unsigned char>
   fun:__copy_move_a<false, unsigned char const*, unsigned char*>
   fun:__copy_move_a2<false, unsigned char const*, unsigned char*>
   fun:copy<unsigned char const*, unsigned char*>
   fun:_ZN22MutationCommandContext15allocateNewItemEv
   fun:_ZN22MutationCommandContext4stepEv
   fun:_ZN23SteppableCommandContext5driveEv
   fun:add_set_replace_executor
   fun:_ZL12set_executorR6Cookie
   fun:operator()
   fun:execute_request_packet
   fun:_Z19mcbp_execute_packetR6Cookie
   fun:_ZL12conn_executeR14McbpConnection
   fun:_ZN14McbpConnection17runStateMachineryEv
   fun:_ZN14McbpConnection12runEventLoopEs
   fun:_Z14run_event_loopP10Connections
   fun:_Z13event_handlerisPv
   fun:event_process_active_single_queue.isra.26
   fun:event_base_loop
   fun:_ZL15worker_libeventPv
   fun:run
   fun:_ZL20platform_thread_wrapPv
   fun:start_thread
   fun:clone
}

Stacktrace

Object/usr/local/lib/valgrind/vgpreload_memcheck-amd64-linux.so
Functionmemcpy@GLIBC_2.2.5
File/Line/tmp/deploy/valgrind-3.12.0/memcheck/../shared/vg_replace_strmem.c:1017
CodeSource code not available

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Function__copy_m
File/Line/usr/include/c++/5/bits/stl_algobase.h:384
Code
0374         {
0375 #if __cplusplus >= 201103L
0376     using __assignable = conditional<_IsMove,
0377              is_move_assignable<_Tp>,
0378              is_copy_assignable<_Tp>>;
0379     // trivial types can have deleted assignment
0380     static_assert__assignable::type::value, "type is not assignable" );
0381 #endif
0382     const ptrdiff_t _Num = __last - __first;
0383     if (_Num)
0384       __builtin_memmove(__result, __first, sizeof(_Tp* _Num);
0385     return __result + _Num;
0386   }
0387     };
0388 
0389   template<bool _IsMove, typename _II, typename _OI>

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Function__copy_move_a
File/Line/usr/include/c++/5/bits/stl_algobase.h:402
Code
0392     {
0393       typedef typename iterator_traits<_II>::value_type _ValueTypeI;
0394       typedef typename iterator_traits<_OI>::value_type _ValueTypeO;
0395       typedef typename iterator_traits<_II>::iterator_category _Category;
0396       const bool __simple = (__is_trivial(_ValueTypeI)
0397                        && __is_pointer<_II>::__value
0398                        && __is_pointer<_OI>::__value
0399            && __are_same<_ValueTypeI, _ValueTypeO>::__value);
0400 
0401       return std::__copy_move<_IsMove, __simple,
0402                         _Category>::__copy_m(__first, __last, __result);
0403     }
0404 
0405   // Helpers for streambuf iterators (either istream or ostream).
0406   // NB: avoid including <iosfwd>, relatively large.
0407   template<typename _CharT>

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Function__copy_move_a2
File/Line/usr/include/c++/5/bits/stl_algobase.h:440
Code
0430             _CharT*>::__type
0431     __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >,
0432        istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*);
0433 
0434   template<bool _IsMove, typename _II, typename _OI>
0435     inline _OI
0436     __copy_move_a2(_II __first, _II __last, _OI __result)
0437     {
0438       return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first),
0439                std::__niter_base(__last),
0440                std::__niter_base(__result)));
0441     }
0442 
0443   /**
0444    *  @brief Copies the range [first,last) into result.
0445    *  @ingroup mutating_algorithms

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Functioncopy
File/Line/usr/include/c++/5/bits/stl_algobase.h:472
Code
0462     copy(_II __first, _II __last, _OI __result)
0463     {
0464       // concept requirements
0465       __glibcxx_function_requires(_InputIteratorConcept<_II>)
0466       __glibcxx_function_requires(_OutputIteratorConcept<_OI,
0467       typename iterator_traits<_II>::value_type>)
0468       __glibcxx_requires_valid_range(__first, __last);
0469 
0470       return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
0471         (std::__miter_base(__first), std::__miter_base(__last),
0472          __result));
0473     }
0474 
0475 #if __cplusplus >= 201103L
0476   /**
0477    *  @brief Moves the range [first,last) into result.

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
FunctionMutationCommandContext::allocateNewItem()
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/protocol/mcbp/mutation_context.cc:214
Code
204 
205     auto* root = reinterpret_cast<uint8_t*>(newitem_info.value[0].iov_base);
206     if (xattr_size > 0) {
207         // Preserve the xattrs
208         auto* ex = reinterpret_cast<uint8_t*>(existing_info.value[0].iov_base);
209         std::copy(ex, ex + xattr_size, root);
210         root += xattr_size;
211     }
212 
213     // Copy the user supplied value over
214     std::copy(value.buf, value.buf + value.len, root);
215     state = State::StoreItem;
216 
217     return ENGINE_SUCCESS;
218 }
219 

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
FunctionMutationCommandContext::step()
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/protocol/mcbp/mutation_context.cc:57
Code
047     ENGINE_ERROR_CODE ret;
048     do {
049         switch (state) {
050         case State::ValidateInput:
051             ret = validateInput();
052             break;
053         case State::GetExistingItemToPreserveXattr:
054             ret = getExistingItemToPreserveXattr();
055             break;
056         case State::AllocateNewItem:
057             ret = allocateNewItem();
058             break;
059         case State::StoreItem:
060             ret = storeItem();
061             break;
062         case State::SendResponse:

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
FunctionSteppableCommandContext::drive()
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/protocol/mcbp/steppable_command_context.cc:33
Code
23     cookie.logCommand();
24 }
25 
26 void SteppableCommandContext::drive() {
27     ENGINE_ERROR_CODE ret = connection.getAiostat();
28     connection.setAiostat(ENGINE_SUCCESS);
29     connection.setEwouldblock(false);
30 
31     if (ret == ENGINE_SUCCESS) {
32         try {
33             ret = step();
34         catch (const cb::engine_error& error) {
35             if (error.code() != cb::engine_errc::would_block) {
36                 LOG_WARNING(&connection,
37                             "%u: SteppableCommandContext::drive() %s: %s",
38                             connection.getId(),

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Functionadd_set_replace_executor
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/mcbp_executors.cc:191
Code
181 static void process_bin_noop_response(McbpConnection* c) {
182     c->setState(McbpStateMachine::State::new_cmd);
183 }
184 
185 static void add_set_replace_executor(Cookie& cookie,
186                                      ENGINE_STORE_OPERATION store_op) {
187     cookie.obtainContext<MutationCommandContext>(
188                   cookie,
189                   cookie.getRequest(Cookie::PacketContent::Full),
190                   store_op)
191             .drive();
192 }
193 
194 static void add_executor(Cookie& cookie) {
195     add_set_replace_executor(cookie, OPERATION_ADD);
196 }

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Functionset_executor(Cookie&)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/mcbp_executors.cc:199
Code
189                   cookie.getRequest(Cookie::PacketContent::Full),
190                   store_op)
191             .drive();
192 }
193 
194 static void add_executor(Cookie& cookie) {
195     add_set_replace_executor(cookie, OPERATION_ADD);
196 }
197 
198 static void set_executor(Cookie& cookie) {
199     add_set_replace_executor(cookie, OPERATION_SET);
200 }
201 
202 static void replace_executor(Cookie& cookie) {
203     add_set_replace_executor(cookie, OPERATION_REPLACE);
204 }

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Functionoperator()
File/Line/usr/include/c++/5/functional:2267
Code
2257     }
2258       }
2259 
2260   template<typename _Res, typename... _ArgTypes>
2261     _Res
2262     function<_Res(_ArgTypes...)>::
2263     operator()(_ArgTypes... __argsconst
2264     {
2265       if (_M_empty())
2266   __throw_bad_function_call();
2267       return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...);
2268     }
2269 
2270 #if __cpp_rtti
2271   template<typename _Res, typename... _ArgTypes>
2272     const type_info&

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Functionexecute_request_packet
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/mcbp_executors.cc:803
Code
793                        c->getId(), memcached_opcode_2_text(opcode), result);
794             audit_invalid_packet(cookie);
795             cookie.sendResponse(cb::mcbp::Status(result));
796             c->setWriteAndGo(McbpStateMachine::State::closing);
797             return;
798         }
799 
800         if (executor != nullptr) {
801             executor(c, const_cast<void*>(static_cast<const void*>(&request)));
802         else {
803             handlers[opcode](cookie);
804         }
805         return;
806     case cb::rbac::PrivilegeAccess::Stale:
807         if (c->remapErrorCode(ENGINE_AUTH_STALE== ENGINE_DISCONNECT) {
808             c->setState(McbpStateMachine::State::closing);

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Functionmcbp_execute_packet(Cookie&)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/mcbp_executors.cc:885
Code
875     return cb::mcbp::Status::Success;
876 }
877 
878 void mcbp_execute_packet(Cookie& cookie) {
879     const auto& header = cookie.getHeader();
880     if (header.isResponse()) {
881         execute_response_packet(cookie, header.getResponse());
882     else {
883         // We've already verified that the packet is a legal packet
884         // so it must be a request
885         execute_request_packet(cookie, header.getRequest());
886     }
887 }
888 
889 void try_read_mcbp_command(McbpConnection& c) {
890     auto input = c.read->rdata();

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Functionconn_execute(McbpConnection&)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/statemachine_mcbp.cc:372
Code
362     }
363 
364     if (!connection.isPacketAvailable()) {
365         throw std::logic_error(
366                 "conn_execute: Internal error.. the input packet is not "
367                 "completely in memory");
368     }
369 
370     connection.setEwouldblock(false);
371 
372     mcbp_execute_packet(connection.getCookieObject());
373 
374     if (connection.isEwouldblock()) {
375         connection.unregisterEvent();
376         return false;
377     }

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
FunctionMcbpConnection::runStateMachinery()
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/connection_mcbp.cc:783
Code
0773     if (isTraceEnabled()) {
0774         do {
0775             // @todo we should have a TRACE scope!!
0776             LOGGER(EXTENSION_LOG_NOTICE,
0777                    this,
0778                    "%u - Running task: (%s)",
0779                    getId(),
0780                    stateMachine.getCurrentStateName());
0781         while (stateMachine.execute());
0782     else {
0783         do {
0784             LOG_DEBUG(this,
0785                       "%u - Running task: (%s)",
0786                       getId(),
0787                       stateMachine.getCurrentStateName());
0788         while (stateMachine.execute());

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
FunctionMcbpConnection::runEventLoop(short)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/connection_mcbp.cc:952
Code
0942 
0943     return getState() != before;
0944 }
0945 
0946 void McbpConnection::runEventLoop(short which) {
0947     conn_loan_buffers(this);
0948     currentEvent = which;
0949     numEvents = max_reqs_per_event;
0950 
0951     try {
0952         runStateMachinery();
0953     catch (const std::exception& e) {
0954         LOG_WARNING(this,
0955                     "%d: exception occurred in runloop - closing connection: %s",
0956                     getId(), e.what());
0957         setState(McbpStateMachine::State::closing);

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Functionrun_event_loop(Connection*, short)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/connections.cc:159
Code
149         }
150 
151         if (!done) {
152             usleep(500);
153         }
154     while (!done);
155 }
156 
157 void run_event_loop(Connection* c, short which) {
158     const auto start = ProcessClock::now();
159     c->runEventLoop(which);
160     const auto stop = ProcessClock::now();
161 
162     using namespace std::chrono;
163     const auto ns = duration_cast<nanoseconds>(stop - start);
164     c->addCpuTime(ns);

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Functionevent_handler(int, short, void*)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/memcached.cc:1051
Code
1041             if (!mcbp->reapplyEventmask()) {
1042                 c->initiateShutdown();
1043             }
1044         else {
1045             LOG_NOTICE(c, "%u: Shutting down idle client %s", c->getId(),
1046                        c->getDescription().c_str());
1047             c->initiateShutdown();
1048         }
1049     }
1050 
1051     run_event_loop(c, which);
1052 
1053     if (memcached_shutdown) {
1054         // Someone requested memcached to shut down. If we don't have
1055         // any connections bound to this thread we can just shut down
1056         int connected = signal_idle_clients(thr, -1true);

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/libevent_core.so.2.1.8
Functionevent_process_active_single_queue.isra.26
File/Line
CodeSource code not available

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/libevent_core.so.2.1.8
Functionevent_base_loop
File/Line
CodeSource code not available

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/kv_engine/memcached
Functionworker_libevent(void*)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/daemon/thread.cc:232
Code
222 
223     /* Any per-thread setup can happen here; thread_init() will block until
224      * all threads have finished initializing.
225      */
226 
227     cb_mutex_enter(&init_lock);
228     init_count++;
229     cb_cond_signal(&init_cond);
230     cb_mutex_exit(&init_lock);
231 
232     event_base_loop(me->base, 0);
233 
234     // Event loop exited; cleanup before thread exits.
235     ERR_remove_state(0);
236 }
237 

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/platform/libplatform_so.so.0.1.0
Functionrun
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/platform/src/cb_pthreads.cc:59
Code
049                 throw std::logic_error("name exceeds 15 characters");
050             }
051         }
052     }
053 
054     void run() {
055         PHOSPHOR_INSTANCE.registerThread(name);
056         if (!name.empty()) {
057             cb_set_thread_name(name.c_str());
058         }
059         func(argument);
060         PHOSPHOR_INSTANCE.deregisterThread();
061     }
062 
063 private:
064     cb_thread_main_func func;

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/platform/libplatform_so.so.0.1.0
Functionplatform_thread_wrap(void*)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/platform/src/cb_pthreads.cc:72
Code
062 
063 private:
064     cb_thread_main_func func;
065     std::string name;
066     void* argument;
067 };
068 
069 static void *platform_thread_wrap(void *arg)
070 {
071     std::unique_ptr<CouchbaseThread> context(reinterpret_cast<CouchbaseThread*>(arg));
072     context->run();
073     return NULL;
074 }
075 
076 int cb_create_thread(cb_thread_t *id,
077                      cb_thread_main_func func,

Object/lib/x86_64-linux-gnu/libpthread-2.23.so
Functionstart_thread
File/Line/build/glibc-9tT8Do/glibc-2.23/nptl/pthread_create.c:333
CodeSource code not available

Object/lib/x86_64-linux-gnu/libc-2.23.so
Functionclone
File/Line/build/glibc-9tT8Do/glibc-2.23/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:109
CodeSource code not available

Auxiliary Details

Address 0x24d05c2a is 11,557,930 bytes inside a block of size 25,165,824 alloc'd

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/libjemalloc.so.2
Functionje_malloc
File/Line/home/couchbase/jenkins/workspace/cbdeps-platform-build/deps/packages/build/jemalloc/jemalloc-prefix/src/jemalloc/src/jemalloc.c:1625
CodeSource code not available

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/platform/libplatform_so.so.0.1.0
Functioncb_malloc
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/platform/src/cb_malloc.cc:60
Code
050 #define throwspec throw()
051 #endif
052 
053 // Macros to form the name of the memory allocation function to use based on
054 // the compile-time selected malloc library's prefix ('je_', 'tc_', '')
055 #define CONCAT(A, BA ## B
056 #define CONCAT2(A, BCONCAT(A, B)
057 #define MEM_ALLOC(nameCONCAT2(MALLOC_PREFIX, name)
058 
059 PLATFORM_PUBLIC_API void* cb_malloc(size_t sizethrowspec {
060     void* ptr = MEM_ALLOC(malloc)(size);
061     cb_invoke_new_hook(ptr, size);
062     return ptr;
063 }
064 
065 PLATFORM_PUBLIC_API void* cb_calloc(size_t nmemb, size_t sizethrowspec {

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/libcouchstore.so
Functiondb_write_buf_compressed
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/couchstore/src/couch_file_write.cc:133
Code
123 
124     return 0;
125 }
126 
127 couchstore_error_t db_write_buf_compressed(tree_file *file, const sized_buf *buf, cs_off_t *pos, size_t *disk_size)
128 {
129     couchstore_error_t errcode = COUCHSTORE_SUCCESS;
130     sized_buf to_write;
131     size_t max_size = snappy::MaxCompressedLength(buf->size);
132 
133     char* compressbuf = static_cast<char *>(cb_malloc(max_size));
134     to_write.buf = compressbuf;
135     to_write.size = max_size;
136     error_unless(to_write.buf, COUCHSTORE_ERROR_ALLOC_FAIL);
137 
138     snappy::RawCompress(buf->buf, buf->size, to_write.buf, &to_write.size);

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/libcouchstore.so
Functionwrite_doc
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/couchstore/src/couch_save.cc:65
Code
055     memcpy(dst, docinfo->rev_meta.buf, docinfo->rev_meta.size);
056     dst += docinfo->rev_meta.size;
057     return dst - start;
058 }
059 
060 static couchstore_error_t write_doc(Db *db, const Doc *doc, uint64_t *bp,
061                                     size_t* disk_size, couchstore_save_options writeopts)
062 {
063     couchstore_error_t errcode;
064     if (writeopts & COMPRESS_DOC_BODIES) {
065         errcode = db_write_buf_compressed(&db->file, &doc->data, (cs_off_t *bp, disk_size);
066     else {
067         errcode = static_cast<couchstore_error_t>(db_write_buf(&db->file, &doc->data, (cs_off_t *bp, disk_size));
068     }
069 
070     return errcode;

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/libcouchstore.so
Functionadd_doc_to_update_list
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/couchstore/src/couch_save.cc:304
Code
294     error_unless(seqterm->buf, COUCHSTORE_ERROR_ALLOC_FAIL);
295     encode_raw48(seq, (raw_48*)seqterm->buf);
296 
297     if (doc) {
298         size_t disk_size;
299 
300         // Don't compress a doc unless the meta flag is set
301         if (!(info->content_meta & COUCH_DOC_IS_COMPRESSED)) {
302             options &= ~COMPRESS_DOC_BODIES;
303         }
304         errcode = write_doc(db, doc, &updated.bp, &disk_size, options);
305 
306         if (errcode != COUCHSTORE_SUCCESS) {
307             return errcode;
308         }
309         updated.size = disk_size;

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/libcouchstore.so
Functioncouchstore_save_documents
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/couchstore/src/couch_save.cc:388
Code
378 
379         if (docs) {
380             curdoc = docs[ii];
381         else {
382             curdoc = NULL;
383         }
384 
385         errcode = add_doc_to_update_list(db, curdoc, infos[ii], fb,
386                                          &seqklist[ii], &idklist[ii],
387                                          &seqvlist[ii], &idvlist[ii],
388                                          seq, options);
389         if (errcode != COUCHSTORE_SUCCESS) {
390             break;
391         }
392     }
393 

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/ep.so
FunctionCouchKVStore::saveDocs(unsigned short, unsigned long, std::vector<_doc*, std::allocator<_doc*> > const&, std::vector<_docinfo*, std::allocator<_docinfo*> >&, KVStatsCtx&, Item const*)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/engines/ep/src/couch-kvstore/couch-kvstore.cc:1930
Code
1920                                       0,
1921                                       readDocInfos,
1922                                       &kvctx);
1923 
1924             auto cs_begin = ProcessClock::now();
1925             uint64_t flags = COMPRESS_DOC_BODIES | COUCHSTORE_SEQUENCE_AS_IS;
1926             errCode = couchstore_save_documents(db.getDb(),
1927                                                 docs.data(),
1928                                                 docinfos.data(),
1929                                                 (unsigned)docs.size(),
1930                                                 flags);
1931             st.saveDocsHisto.add(
1932                     std::chrono::duration_cast<std::chrono::microseconds>(
1933                             ProcessClock::now() - cs_begin));
1934             if (errCode != COUCHSTORE_SUCCESS) {
1935                 logger.log(EXTENSION_LOG_WARNING,

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/ep.so
FunctionCouchKVStore::commit2couchstore(Item const*)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/engines/ep/src/couch-kvstore/couch-kvstore.cc:1830
Code
1820                     + std::to_string(vbucket2flush") and pendingReqsQ["
1821                     + std::to_string(i"] (which is "
1822                     + std::to_string(req->getVBucketId()) ")");
1823         }
1824     }
1825 
1826     kvstats_ctx kvctx(configuration);
1827     kvctx.vbucket = vbucket2flush;
1828     // flush all
1829     couchstore_error_t errCode = saveDocs(
1830             vbucket2flush, fileRev, docs, docinfos, kvctx, collectionsManifest);
1831 
1832     if (errCode) {
1833         success = false;
1834         logger.log(EXTENSION_LOG_WARNING,
1835                    "CouchKVStore::commit2couchstore: saveDocs error:%s, "

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/ep.so
FunctionCouchKVStore::commit(Item const*)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/engines/ep/src/couch-kvstore/couch-kvstore.cc:1150
Code
1140     return rv;
1141 }
1142 
1143 bool CouchKVStore::commit(const Item* collectionsManifest) {
1144     if (isReadOnly()) {
1145         throw std::logic_error("CouchKVStore::commit: Not valid on a read-only "
1146                         "object.");
1147     }
1148 
1149     if (intransaction) {
1150         if (commit2couchstore(collectionsManifest)) {
1151             intransaction = false;
1152         }
1153     }
1154 
1155     return !intransaction;

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/ep.so
FunctionEPBucket::commit(KVStore&, Item const*)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/engines/ep/src/ep_bucket.cc:445
Code
435     }
436 
437     return items_flushed;
438 }
439 
440 void EPBucket::commit(KVStore& kvstore, const Item* collectionsManifest) {
441     std::list<PersistenceCallback*>& pcbs = kvstore.getPersistenceCbList();
442     BlockTimer timer(&stats.diskCommitHisto, "disk_commit", stats.timingLog);
443     auto commit_start = ProcessClock::now();
444 
445     while (!kvstore.commit(collectionsManifest)) {
446         ++stats.commitFailed;
447         LOG(EXTENSION_LOG_WARNING,
448             "KVBucket::commit: kvstore.commit failed!!! Retry in 1 sec...");
449         sleep(1);
450     }

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/ep.so
FunctionEPBucket::flushVBucket(unsigned short)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/engines/ep/src/ep_bucket.cc:384
Code
374                     LOG(EXTENSION_LOG_INFO, "VBucket %" PRIu16 " created", vbid);
375                 }
376             }
377 
378             /* Perform an explicit commit to disk if the commit
379              * interval reaches zero and if there is a non-zero number
380              * of items to flush.
381              * Or if there is a manifest item
382              */
383             if (items_flushed > || sef.getCollectionsManifestItem()) {
384                 commit(*rwUnderlying, sef.getCollectionsManifestItem());
385 
386                 // Now the commit is complete, vBucket file must exist.
387                 if (vb->setBucketCreation(false)) {
388                     LOG(EXTENSION_LOG_INFO, "VBucket %" PRIu16 " created", vbid);
389                 }

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/ep.so
FunctionFlusher::flushVB()
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/engines/ep/src/flusher.cc:294
Code
284         hpVbs.pop();
285         if (store->flushVBucket(vbid== RETRY_FLUSH_VBUCKET) {
286             hpVbs.push(vbid);
287         }
288     else {
289         if (doHighPriority && --numHighPriority == 0) {
290             doHighPriority = false;
291         }
292         uint16_t vbid = lpVbs.front();
293         lpVbs.pop();
294         if (store->flushVBucket(vbid== RETRY_FLUSH_VBUCKET) {
295             lpVbs.push(vbid);
296         }
297     }
298 }

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/ep.so
FunctionFlusher::step(GlobalTask*)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/engines/ep/src/flusher.cc:203
Code
193     case State::Paused:
194     case State::Pausing:
195         if (currentState == State::Pausing) {
196             transitionState(State::Paused);
197         }
198         // Indefinitely put task to sleep..
199         task->snooze(INT_MAX);
200         return true;
201 
202     case State::Running:
203         flushVB();
204         if (_state == State::Running) {
205             double tosleep = computeMinSleepTime();
206             if (tosleep > 0) {
207                 task->snooze(tosleep);
208             }

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/install/lib/ep.so
FunctionExecutorThread::run()
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/engines/ep/src/executorthread.cc:122
Code
112             const auto curTaskDescr = currentTask->getDescription();
113             LOG(EXTENSION_LOG_DEBUG,
114                 "%s: Run task \"%.*s\" id %" PRIu64,
115                 getName().c_str(),
116                 int(curTaskDescr.size()),
117                 curTaskDescr.data(),
118                 uint64_t(currentTask->getId()));
119 
120             // Now Run the Task ....
121             currentTask->setState(TASK_RUNNING, TASK_SNOOZED);
122             bool again = currentTask->run();
123 
124             // Task done, log it ...
125             const ProcessClock::duration runtime(ProcessClock::now() -
126                                                  getTaskStart());
127             currentTask->getTaskable().logRunTime(currentTask->getTypeId(),

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/platform/libplatform_so.so.0.1.0
Functionrun
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/platform/src/cb_pthreads.cc:59
Code
049                 throw std::logic_error("name exceeds 15 characters");
050             }
051         }
052     }
053 
054     void run() {
055         PHOSPHOR_INSTANCE.registerThread(name);
056         if (!name.empty()) {
057             cb_set_thread_name(name.c_str());
058         }
059         func(argument);
060         PHOSPHOR_INSTANCE.deregisterThread();
061     }
062 
063 private:
064     cb_thread_main_func func;

Object/home/couchbase/jenkins/workspace/kv_engine-linux-master/build/platform/libplatform_so.so.0.1.0
Functionplatform_thread_wrap(void*)
File/Line/home/couchbase/jenkins/workspace/kv_engine-linux-master/platform/src/cb_pthreads.cc:72
Code
062 
063 private:
064     cb_thread_main_func func;
065     std::string name;
066     void* argument;
067 };
068 
069 static void *platform_thread_wrap(void *arg)
070 {
071     std::unique_ptr<CouchbaseThread> context(reinterpret_cast<CouchbaseThread*>(arg));
072     context->run();
073     return NULL;
074 }
075 
076 int cb_create_thread(cb_thread_t *id,
077                      cb_thread_main_func func,

Object/lib/x86_64-linux-gnu/libpthread-2.23.so
Functionstart_thread
File/Line/build/glibc-9tT8Do/glibc-2.23/nptl/pthread_create.c:333
CodeSource code not available

Object/lib/x86_64-linux-gnu/libc-2.23.so
Functionclone
File/Line/build/glibc-9tT8Do/glibc-2.23/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:109
CodeSource code not available