• Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication - Oplog and Recovery
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      A mongod 9.0.5 shard primary aborted with fatal assertion 12436504, "Attempted to reserve optime without a declared write intent", raised from LocalOplogInfo::getNextOpTimes. The node did not recover and stayed down until the test fixture tore the cluster down ~12 minutes later.

      Found in MongoDB CI for the mongosync (Cluster-to-Cluster Sync) project, in a suite that repeatedly kills and restarts mongos processes against a 2-shard cluster while a migration is running.

      Log

      {"t":{"$date":"2026-11-10T20:55:36.731+00:00"},"s":"F","c":"REPL","id":12436504,"svc":"S","ctx":"conn133",
       "msg":"Attempted to reserve optime without a declared write intent","attr":{"opCtx":1960282}}
      {"t":{"$date":"2026-11-10T20:55:36.731+00:00"},"s":"F","c":"ASSERT","id":23089,"svc":"S","ctx":"conn133",
       "msg":"Fatal assertion","attr":{"msgid":12436504,
        "location":"src/mongo/db/repl/local_oplog_info.cpp:141:52:
                   std::vector<OplogSlot> mongo::LocalOplogInfo::getNextOpTimes(OperationContext *, std::size_t, std::size_t)"}}
      

      A second thread (conn237) hit the same assertion 9 ms later.

      Stack

      From the BACKTRACE dump (upper frames only; the lower SBE frames in the dump appear mis-symbolized):

      mongo::fassert_detail::failed(mongo::fassert_detail::MsgId, mongo::WrappedStdSourceLocation)
      mongo::repl::logOp(mongo::OperationContext*, mongo::repl::MutableOplogEntry*)
      mongo::OpObserver::onOpMessage(mongo::OperationContext*, mongo::BSONObj const&)
      mongo::TransactionParticipant::performNoopWrite(mongo::OperationContext*, std::basic_string_view<char, ...>)
      

      So the no-op write issued by TransactionParticipant::performNoopWrite reaches logOp without a declared write intent, and the optime reservation fasserts.

      Environment

      • mongod 9.0.5-patch-6ae3d8619708df0007da8205, Amazon Linux 2023 arm64
      • Sharded cluster, 2 shards; the crashing node was the shard0 primary (port 20001)
      • Workload: mongosync Cluster-to-Cluster migration (9.0 -> 9.0) running jscore passthrough tests, with a background hook killing/restarting a random mongos roughly every 30s (TERMINATE and KILL alternating, ~17s down each time)

      Impact

      The primary aborts (exit code -6) and does not come back, so the shard has no primary for the rest of the run. Not known to be reachable outside a test environment, but it is an unconditional fassert on a normal no-op write path.

      Possibly related

      SERVER-139006 ("Don't register a write intent for an operation that has been killed") touches the same write-intent machinery; the connection has not been verified.

      Artifacts

      Evergreen task:
      https://spruce.mongodb.com/task/mongosync_amazon2023_arm64_ctc_multi_replicator_kill_mongos_pause_reverse_jscore_passthrough_v90_to_v90_lane2_ea79b3f3cc670d6b8b27e7fa3e49205de092c4cc_26_11_10_18_23_25

      Seen once so far. Tracked on the mongosync side as REP-8228.

            Assignee:
            Unassigned
            Reporter:
            Pavel Kozlov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: