Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
7.0.3
-
None
-
1
Description
Exceptions may be thrown while writing the mutation log (access log).
void MutationLog::updateInitialBlock() {
|
if (readOnly) {
|
throw std::logic_error("MutationLog::updateInitialBlock: Not valid on "
|
"a read-only log");
|
}
|
if (!isOpen()) {
|
throw std::logic_error("MutationLog::updateInitialBlock: Not valid on "
|
"a closed log");
|
}
|
needWriteAccess();
|
|
std::vector<uint8_t> buf(MIN_LOG_HEADER_SIZE);
|
memcpy(buf.data(), &headerBlock, sizeof(headerBlock));
|
|
ssize_t byteswritten = pwrite(file, buf.data(), buf.size(), 0);
|
if (byteswritten != ssize_t(buf.size())) {
|
throw WriteException("Failed to update header block");
|
}
|
}
|
These have been seen to go uncaught and crash memcached
[ns_server:info,2022-06-12T02:00:01.761Z,babysitter_of_ns_1@cb.local:<0.129.0>:ns_port_server:log:221]memcached<0.129.0>: 2022-06-12T02:00:01.559986+00:00 CRITICAL *** Fatal error encountered during exception handling ***
|
memcached<0.129.0>: 2022-06-12T02:00:01.562845+00:00 CRITICAL Caught unhandled std::exception-derived exception. what(): Failed to update header block
|
memcached<0.129.0>: terminate called after throwing an instance of 'MutationLog::WriteException'
|
memcached<0.129.0>: what(): Failed to update header block
|
|
[ns_server:info,2022-06-12T02:00:02.002Z,babysitter_of_ns_1@cb.local:<0.129.0>:ns_port_server:log:221]memcached<0.129.0>: 2022-06-12T02:00:01.848051+00:00 CRITICAL Breakpad caught a crash (Couchbase version 7.0.3-7031). Writing crash dump to /opt/couchbase/var/lib/couchbase/crash/6320c9de-0d65-49b7-3d99c785-adaed8c2.dmp before terminating.
|
...
|
Investigate catching and more cleanly handling this.
Attachments
Issue Links
- relates to
-
MB-55939 KV-Engine crashes if AccessScanner task fails to write access.log due to disk being full
- Closed