Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-71608

Segmentation fault: in mongo::LockManager::lock

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0, 6.0.5
    • Affects Version/s: 6.0.2, 6.0.3
    • Component/s: None
    • Server Development Platform
    • Fully Compatible
    • ALL
    • v6.0
    • Hide

      Build and run MongoDB 6.0.2 or 6.0.3 on FreeBSD amd64 or aarch64 and it segfaults after startup.

      I'm maintaining ports of MongoDB 4.2 to 5.0 on FreeBSD and they run fine.

      Attached the mongodb60.log. It is very well repeatable. Also got reports from others on the internet.

      Show
      Build and run MongoDB 6.0.2 or 6.0.3 on FreeBSD amd64 or aarch64 and it segfaults after startup. I'm maintaining ports of MongoDB 4.2 to 5.0 on FreeBSD and they run fine. Attached the mongodb60.log . It is very well repeatable. Also got reports from others on the internet.

      After startup of MongoDB 6.0 the server gets a segmentation fault.

      Thread 1 received signal SIGSEGV, Segmentation fault.
      Address not mapped to object.
      absl::lts_20210324::container_internal::raw_hash_set<absl::lts_20210324::container_internal::NodeHashMapPolicy<mongo::ResourceId, mongo::PartitionedLockHead*>, absl::lts_20210324::hash_internal::Hash<mongo::ResourceId>, std::__1::equal_to<mongo::ResourceId>, std::__1::allocator<std::__1::pair<mongo::ResourceId const, mongo::PartitionedLockHead*> > >::find<mongo::ResourceId> (this=0x47dd6c90, key=..., hash=<optimized out>) at src/third_party/abseil-cpp-master/abseil-cpp/absl/container/internal/raw_hash_set.h:1372
      1372    src/third_party/abseil-cpp-master/abseil-cpp/absl/container/internal/raw_hash_set.h: No such file or directory.
      (gdb) bt
      #0  absl::lts_20210324::container_internal::raw_hash_set<absl::lts_20210324::container_internal::NodeHashMapPolicy<mongo::ResourceId, mongo::PartitionedLockHead*>, absl::lts_20210324::hash_internal::Hash<mongo::ResourceId>, std::__1::equal_to<mongo::ResourceId>, std::__1::allocator<std::__1::pair<mongo::ResourceId const, mongo::PartitionedLockHead*> > >::find<mongo::ResourceId> (
          this=0x47dd6c90, key=..., hash=<optimized out>)
          at src/third_party/abseil-cpp-master/abseil-cpp/absl/container/internal/raw_hash_set.h:1372
      #1  absl::lts_20210324::container_internal::raw_hash_set<absl::lts_20210324::container_internal::NodeHashMapPolicy<mongo::ResourceId, mongo::PartitionedLockHead*>, absl::lts_20210324::hash_internal::Hash<mongo::ResourceId>, std::__1::equal_to<mongo::ResourceId>, std::__1::allocator<std::__1::pair<mongo::ResourceId const, mongo::PartitionedLockHead*> > >::find<mongo::ResourceId> (
          this=0x47dd6c90, key=...)
          at src/third_party/abseil-cpp-master/abseil-cpp/absl/container/internal/raw_hash_set.h:1386
      #2  mongo::LockHead::migratePartitionedLockHeads (
          this=this@entry=0x4865b300)
          at src/mongo/db/concurrency/lock_manager.cpp:390
      #3  0x0000000004699794 in mongo::LockManager::lock (
          this=0x48722c60, resId=..., request=0x481126f0, 
          mode=<optimized out>)
          at src/mongo/db/concurrency/lock_manager.cpp:527
      #4  0x00000000046a0140 in mongo::LockerImpl::_lockBegin (
          this=0x48016d00, opCtx=0x4864cc00, resId=..., 
          mode=1219626888)
          at src/mongo/db/concurrency/lock_state.cpp:910
      #5  0x00000000046a22cc in mongo::LockerImpl::lock (
      --Type <RET> for more, q to quit, c to continue without paging--    this=0x48016d00, opCtx=0x4864cc00, resId=..., 
          mode=mongo::MODE_X, deadline=...)
          at src/mongo/db/concurrency/lock_state.cpp:546
      #6  0x00000000046978a8 in mongo::Lock::DBLock::DBLock (
          this=0xffffffffe860, opCtx=0x4864cc00, db=..., 
          mode=<optimized out>, deadline=..., 
          skipGlobalAndRSTLLocks=false)
          at src/mongo/db/concurrency/d_concurrency.cpp:226
      #7  0x0000000003fe8964 in mongo::AutoGetDb::AutoGetDb (
          this=0xffffffffe848, opCtx=0x48b20788, dbName=..., 
          mode=mongo::MODE_X, deadline=..., secondaryDbNames=...)
          at src/mongo/db/catalog_raii.cpp:171
      #8  0x0000000002c0d204 in mongo::(anonymous namespace)::logStartup (opCtx=0x4864cc00) at src/mongo/db/mongod_main.cpp:277
      #9  mongo::(anonymous namespace)::_initAndListen (
          serviceContext=<optimized out>, listenPort=<optimized out>)
          at src/mongo/db/mongod_main.cpp:677
      #10 0x0000000002c0b3fc in mongo::(anonymous namespace)::initAndListen (service=0x0, listenPort=<optimized out>)
          at src/mongo/db/mongod_main.cpp:850
      #11 0x0000000002c06270 in mongo::mongod_main (argc=3, 
          argv=<optimized out>) at src/mongo/db/mongod_main.cpp:1548
      #12 0x0000000002c05bc4 in main (argc=0, argv=0x48b20788)
          at src/mongo/db/mongod.cpp:47
      (gdb)

        1. mongod.log
          18 kB
        2. mongodb60.log
          10 kB
        3. truss.log
          641 kB

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            ronald-lists@klop.ws R K
            Votes:
            3 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: