[DOCS-16220] Mention the server will crash if it cannot log Created: 22/Jun/23  Updated: 13/Nov/23  Resolved: 19/Jul/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: 7.0.0
Fix Version/s: 7.0.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Improvement Priority: Major - P3
Reporter: Kevin Arhelger Assignee: Kanchana Sekhar
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive DOCS-16220_slack_conversation.zip    
Participants:
Days since reply: 29 weeks, 2 days ago

 Description   

https://www.mongodb.com/docs/manual/reference/log-messages/

If mongod cannot write to the log file, it will immediately exit.
This behavior is unexpected by some users and should be documented.

This seems related, but slightly distinct from the audit guarantee https://www.mongodb.com/docs/manual/core/auditing/#audit-guarantee

Example crash message written to stderr when the volume containing the log file is full.

code
{"t":

{"$date":"2023-06-20T16:41:02.026-05:00"}

,"s":"F", "c":"CONTROL", "id":4522200, "ctx":"JournalFlusher","msg":"Writing to log file failed, aborting application","attr":{"files":["/Volumes/Logs/mongod.log"]}}
BACKTRACE: {"backtrace":[

{"a":"105DB4FB8","b":"102FF8000","o":"2DBCFB8","s":"_ZN5mongo18stack_trace_detail12_GLOBAL__N_119printStackTraceImplERKNS1_7OptionsEPNS_14StackTraceSinkE","C":"mongo::stack_trace_detail::(anonymous namespace)::printStackTraceImpl(mongo::stack_trace_detail::(anonymous namespace)::Options const&, mongo::StackTraceSink*)","s+":"A8"}

,

{"a":"105DB5EC4","b":"102FF8000","o":"2DBDEC4","s":"_ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE","C":"mongo::printStackTrace(std::__1::basic_ostream<char, std::__1::char_traits<char>>&)","s+":"40"}

,

{"a":"105D804B4","b":"102FF8000","o":"2D884B4","s":"_ZN5mongo5logv214FileRotateSink7consumeERKN5boost3log12v2s_mt_posix11record_viewERKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEE","C":"mongo::logv2::FileRotateSink::consume(boost::log::v2s_mt_posix::record_view const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)","s+":"888"}

,

{"a":"105D9A2E4","b":"102FF8000","o":"2DA22E4","s":"_ZN5mongo5logv216CompositeBackendIJNS0_14FileRotateSinkENS0_10RamLogSinkES3_NS0_14UserAssertSinkEEE10consumeAllIJLm0ELm1ELm2ELm3EEEEvRKN5boost3log12v2s_mt_posix11record_viewERKNSt3__112basic_stringIcNSD_11char_traitsIcEENSD_9allocatorIcEEEENSD_16integer_sequenceImJXspT_EEEE","C":"void mongo::logv2::CompositeBackend<mongo::logv2::FileRotateSink, mongo::logv2::RamLogSink, mongo::logv2::RamLogSink, mongo::logv2::UserAssertSink>::consumeAll<0ul, 1ul, 2ul, 3ul>(boost::log::v2s_mt_posix::record_view const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>)","s+":"58"}

,
code



 Comments   
Comment by Kanchana Sekhar [ 17/Jul/23 ]

PR: https://github.com/10gen/docs-mongodb-internal/pull/3990

Comment by Kevin Arhelger [ 23/Jun/23 ]

nicholas.cottrell@mongodb.com,

I believe this affects all supported versions.

Comment by Nic Cottrell [ 23/Jun/23 ]

This affects servers 5.0+ doesn't it? (Not just 7.x)

Generated at Thu Feb 08 08:14:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.