Bug 267668 - databases/mongodb60: 6.0.2 Segmentation fault
Summary: databases/mongodb60: 6.0.2 Segmentation fault
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ronald Klop
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-09 13:13 UTC by jason.d.jenkins
Modified: 2023-02-17 19:24 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jason.d.jenkins 2022-11-09 13:13:46 UTC
A couple of points:

After a fresh install (I have tried with precompiled package and built package from ports) mongod fails to start. See below for more details.

1. When starting mongod using service control, mongod fails to start with the following error:

Starting mongod.
/usr/local/etc/rc.d/mongod: WARNING: failed to start mongod

2. When starting mongod using the direct command, it fails to start as well (on the first attempt). The output is below:
mongod --dbpath /pools/db/mongod/6.0.2 --bind_ip_all

{"t":{"$date":"2022-11-09T06:14:07.732+00:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"-","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":17},"outgoing":{"minWireVersion":6,"maxWireVersion":17},"isInternalClient":true}}}
{"t":{"$date":"2022-11-09T06:14:07.734+00:00"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"-","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2022-11-09T06:14:07.735+00:00"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"thread1","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2022-11-09T06:14:07.736+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
{"t":{"$date":"2022-11-09T06:14:07.736+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2022-11-09T06:14:07.736+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"ShardSplitDonorService","namespace":"config.tenantSplitDonors"}}
{"t":{"$date":"2022-11-09T06:14:07.736+00:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"thread1","msg":"Multi threading initialized"}
{"t":{"$date":"2022-11-09T06:14:07.737+00:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":2484,"port":27017,"dbPath":".","architecture":"64-bit","host":"dart"}}
{"t":{"$date":"2022-11-09T06:14:07.737+00:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"6.0.2","gitVersion":"nogitversion","openSSLVersion":"OpenSSL 1.1.1o-freebsd  3 May 2022","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2022-11-09T06:14:07.737+00:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"FreeBSD","version":"FreeBSD 13.1-RELEASE-p3 GENERIC\n"}}}
{"t":{"$date":"2022-11-09T06:14:07.737+00:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"*"},"storage":{"dbPath":"."}}}}
{"t":{"$date":"2022-11-09T06:14:07.738+00:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=7608M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,remove=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=2000),statistics_log=(wait=0),json_output=(error,message),verbose=[recovery_progress:1,checkpoint_progress:1,compact_progress:1,backup:0,checkpoint:0,compact:0,evict:0,history_store:0,recovery:0,rts:0,salvage:0,tiered:0,timestamp:0,transaction:0,verify:0,log:0],"}}
{"t":{"$date":"2022-11-09T06:14:08.357+00:00"},"s":"I",  "c":"STORAGE",  "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":619}}
{"t":{"$date":"2022-11-09T06:14:08.357+00:00"},"s":"I",  "c":"RECOVERY", "id":23987,   "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}}
{"t":{"$date":"2022-11-09T06:14:08.366+00:00"},"s":"W",  "c":"CONTROL",  "id":22120,   "ctx":"initandlisten","msg":"Access control is not enabled for the database. Read and write access to data and configuration is unrestricted","tags":["startupWarnings"]}
{"t":{"$date":"2022-11-09T06:14:08.366+00:00"},"s":"W",  "c":"CONTROL",  "id":22138,   "ctx":"initandlisten","msg":"You are running this process as the root user, which is not recommended","tags":["startupWarnings"]}
{"t":{"$date":"2022-11-09T06:14:08.366+00:00"},"s":"I",  "c":"STORAGE",  "id":20320,   "ctx":"initandlisten","msg":"createCollection","attr":{"namespace":"admin.system.version","uuidDisposition":"provided","uuid":{"uuid":{"$uuid":"27d41cee-da5b-430c-a60e-f7b3121b3725"}},"options":{"uuid":{"$uuid":"27d41cee-da5b-430c-a60e-f7b3121b3725"}}}}
{"t":{"$date":"2022-11-09T06:14:08.372+00:00"},"s":"I",  "c":"INDEX",    "id":20345,   "ctx":"initandlisten","msg":"Index build: done building","attr":{"buildUUID":null,"collectionUUID":{"uuid":{"$uuid":"27d41cee-da5b-430c-a60e-f7b3121b3725"}},"namespace":"admin.system.version","index":"_id_","ident":"index-1-156332478393131353","collectionIdent":"collection-0-156332478393131353","commitTimestamp":null}}
{"t":{"$date":"2022-11-09T06:14:08.372+00:00"},"s":"I",  "c":"REPL",     "id":20459,   "ctx":"initandlisten","msg":"Setting featureCompatibilityVersion","attr":{"newVersion":"6.0"}}
{"t":{"$date":"2022-11-09T06:14:08.372+00:00"},"s":"I",  "c":"REPL",     "id":5853300, "ctx":"initandlisten","msg":"current featureCompatibilityVersion value","attr":{"featureCompatibilityVersion":"6.0","context":"setFCV"}}
{"t":{"$date":"2022-11-09T06:14:08.372+00:00"},"s":"I",  "c":"NETWORK",  "id":4915702, "ctx":"initandlisten","msg":"Updated wire specification","attr":{"oldSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":17},"outgoing":{"minWireVersion":6,"maxWireVersion":17},"isInternalClient":true},"newSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":17,"maxWireVersion":17},"outgoing":{"minWireVersion":17,"maxWireVersion":17},"isInternalClient":true}}}
{"t":{"$date":"2022-11-09T06:14:08.372+00:00"},"s":"I",  "c":"NETWORK",  "id":4915702, "ctx":"initandlisten","msg":"Updated wire specification","attr":{"oldSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":17,"maxWireVersion":17},"outgoing":{"minWireVersion":17,"maxWireVersion":17},"isInternalClient":true},"newSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":17,"maxWireVersion":17},"outgoing":{"minWireVersion":17,"maxWireVersion":17},"isInternalClient":true}}}
{"t":{"$date":"2022-11-09T06:14:08.372+00:00"},"s":"I",  "c":"REPL",     "id":5853300, "ctx":"initandlisten","msg":"current featureCompatibilityVersion value","attr":{"featureCompatibilityVersion":"6.0","context":"startup"}}
{"t":{"$date":"2022-11-09T06:14:08.372+00:00"},"s":"I",  "c":"STORAGE",  "id":5071100, "ctx":"initandlisten","msg":"Clearing temp directory"}
{"t":{"$date":"2022-11-09T06:14:08.372+00:00"},"s":"I",  "c":"CONTROL",  "id":20536,   "ctx":"initandlisten","msg":"Flow Control is enabled on this deployment"}
{"t":{"$date":"2022-11-09T06:14:08.372+00:00"},"s":"I",  "c":"FTDC",     "id":20625,   "ctx":"initandlisten","msg":"Initializing full-time diagnostic data capture","attr":{"dataDirectory":"./diagnostic.data"}}
{"t":{"$date":"2022-11-09T06:14:08.373+00:00"},"s":"F",  "c":"CONTROL",  "id":6384300, "ctx":"initandlisten","msg":"Writing fatal message","attr":{"message":"Invalid access at address: 0x0\n"}}
{"t":{"$date":"2022-11-09T06:14:08.373+00:00"},"s":"F",  "c":"CONTROL",  "id":6384300, "ctx":"initandlisten","msg":"Writing fatal message","attr":{"message":"Got signal: 11 (Segmentation fault).\n"}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"E",  "c":"CONTROL",  "id":31430,   "ctx":"initandlisten","msg":"Error collecting stack trace","attr":{"error":"unw_get_proc_name(7FFFFFFFF8A3): unspecified (general) error\nunw_get_proc_name(806310008): unspecified (general) error\nunw_get_proc_name(7FFFFFFFF8A3): unspecified (general) error\nunw_get_proc_name(806310008): unspecified (general) error\n"}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31380,   "ctx":"initandlisten","msg":"BACKTRACE","attr":{"bt":{"backtrace":[{"a":"6116D20","b":"1021000","o":"50F5D20","s":"_ZN5mongo15printStackTraceERNS_14StackTraceSinkE","C":"mongo::printStackTrace(mongo::StackTraceSink&)","s+":"130"},{"a":"61135D4","b":"1021000","o":"50F25D4","s":"abruptQuitWithAddrSignal","C":"signed char","s+":"184"},{"a":"8072E958E","b":"8072CF000","o":"1A58E","s":"_pthread_sigmask","s+":"54E"},{"a":"8072E8B3F","b":"8072CF000","o":"19B3F","s":"_pthread_setschedparam","s+":"82F"},{"a":"7FFFFFFFF8A3"},{"a":"4D6B84A","b":"1021000","o":"3D4A84A","s":"_ZN5mongo8LockHead27migratePartitionedLockHeadsEv","C":"mongo::LockHead::migratePartitionedLockHeads()","s+":"AA"},{"a":"4D6C9F7","b":"1021000","o":"3D4B9F7","s":"_ZN5mongo11LockManager4lockENS_10ResourceIdEPNS_11LockRequestENS_8LockModeE","C":"mongo::LockManager::lock(mongo::ResourceId, mongo::LockRequest*, mongo::LockMode)","s+":"1E7"},{"a":"4D7AF81","b":"1021000","o":"3D59F81","s":"_ZN5mongo10LockerImpl10_lockBeginEPNS_16OperationContextENS_10ResourceIdENS_8LockModeE","C":"mongo::LockerImpl::_lockBegin(mongo::OperationContext*, mongo::ResourceId, mongo::LockMode)","s+":"C91"},{"a":"4D755BB","b":"1021000","o":"3D545BB","s":"_ZN5mongo10LockerImpl4lockEPNS_16OperationContextENS_10ResourceIdENS_8LockModeENS_6Date_tE","C":"mongo::LockerImpl::lock(mongo::OperationContext*, mongo::ResourceId, mongo::LockMode, mongo::Date_t)","s+":"2B"},{"a":"4D69FB9","b":"1021000","o":"3D48FB9","s":"_ZN5mongo4Lock6DBLockC2EPNS_16OperationContextENS_10StringDataENS_8LockModeENS_6Date_tEb","C":"mongo::Lock::DBLock::DBLock(mongo::OperationContext*, mongo::StringData, mongo::LockMode, mongo::Date_t, bool)","s+":"E9"},{"a":"4663DE4","b":"1021000","o":"3642DE4","s":"_ZN5mongo9AutoGetDbC2EPNS_16OperationContextENS_10StringDataENS_8LockModeENS_6Date_tERKNSt3__13setIS3_NS6_4lessIS3_EENS6_9allocatorIS3_EEEE","C":"mongo::AutoGetDb::AutoGetDb(mongo::OperationContext*, mongo::StringData, mongo::LockMode, mongo::Date_t, std::__1::set<mongo::StringData, std::__1::less<mongo::StringData>, std::__1::allocator<mongo::StringData> > const&)","s+":"E4"},{"a":"30A8BA7","b":"1021000","o":"2087BA7","s":"_ZN5mongo11mongod_mainEiPPc","C":"mongo::mongod_main(int, char**)","s+":"88C7"},{"a":"30A6980","b":"1021000","o":"2085980","s":"_ZN5mongo11mongod_mainEiPPc","C":"mongo::mongod_main(int, char**)","s+":"66A0"},{"a":"30A06BC","b":"1021000","o":"207F6BC","s":"_ZN5mongo11mongod_mainEiPPc","C":"mongo::mongod_main(int, char**)","s+":"3DC"},{"a":"30995E9","b":"1021000","o":"20785E9","s":"main","C":"unsigned long","s+":"9"},{"a":"309939D","b":"1021000","o":"207839D","s":"_start","s+":"10D"},{"a":"806310008"}],"processInfo":{"mongodbVersion":"6.0.2","gitVersion":"nogitversion","compiledModules":[]}}},"tags":[]}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"6116D20","b":"1021000","o":"50F5D20","s":"_ZN5mongo15printStackTraceERNS_14StackTraceSinkE","C":"mongo::printStackTrace(mongo::StackTraceSink&)","s+":"130"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"61135D4","b":"1021000","o":"50F25D4","s":"abruptQuitWithAddrSignal","C":"signed char","s+":"184"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"8072E958E","b":"8072CF000","o":"1A58E","s":"_pthread_sigmask","s+":"54E"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"8072E8B3F","b":"8072CF000","o":"19B3F","s":"_pthread_setschedparam","s+":"82F"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"7FFFFFFFF8A3"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"4D6B84A","b":"1021000","o":"3D4A84A","s":"_ZN5mongo8LockHead27migratePartitionedLockHeadsEv","C":"mongo::LockHead::migratePartitionedLockHeads()","s+":"AA"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"4D6C9F7","b":"1021000","o":"3D4B9F7","s":"_ZN5mongo11LockManager4lockENS_10ResourceIdEPNS_11LockRequestENS_8LockModeE","C":"mongo::LockManager::lock(mongo::ResourceId, mongo::LockRequest*, mongo::LockMode)","s+":"1E7"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"4D7AF81","b":"1021000","o":"3D59F81","s":"_ZN5mongo10LockerImpl10_lockBeginEPNS_16OperationContextENS_10ResourceIdENS_8LockModeE","C":"mongo::LockerImpl::_lockBegin(mongo::OperationContext*, mongo::ResourceId, mongo::LockMode)","s+":"C91"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"4D755BB","b":"1021000","o":"3D545BB","s":"_ZN5mongo10LockerImpl4lockEPNS_16OperationContextENS_10ResourceIdENS_8LockModeENS_6Date_tE","C":"mongo::LockerImpl::lock(mongo::OperationContext*, mongo::ResourceId, mongo::LockMode, mongo::Date_t)","s+":"2B"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"4D69FB9","b":"1021000","o":"3D48FB9","s":"_ZN5mongo4Lock6DBLockC2EPNS_16OperationContextENS_10StringDataENS_8LockModeENS_6Date_tEb","C":"mongo::Lock::DBLock::DBLock(mongo::OperationContext*, mongo::StringData, mongo::LockMode, mongo::Date_t, bool)","s+":"E9"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"4663DE4","b":"1021000","o":"3642DE4","s":"_ZN5mongo9AutoGetDbC2EPNS_16OperationContextENS_10StringDataENS_8LockModeENS_6Date_tERKNSt3__13setIS3_NS6_4lessIS3_EENS6_9allocatorIS3_EEEE","C":"mongo::AutoGetDb::AutoGetDb(mongo::OperationContext*, mongo::StringData, mongo::LockMode, mongo::Date_t, std::__1::set<mongo::StringData, std::__1::less<mongo::StringData>, std::__1::allocator<mongo::StringData> > const&)","s+":"E4"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"30A8BA7","b":"1021000","o":"2087BA7","s":"_ZN5mongo11mongod_mainEiPPc","C":"mongo::mongod_main(int, char**)","s+":"88C7"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"30A6980","b":"1021000","o":"2085980","s":"_ZN5mongo11mongod_mainEiPPc","C":"mongo::mongod_main(int, char**)","s+":"66A0"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"30A06BC","b":"1021000","o":"207F6BC","s":"_ZN5mongo11mongod_mainEiPPc","C":"mongo::mongod_main(int, char**)","s+":"3DC"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"30995E9","b":"1021000","o":"20785E9","s":"main","C":"unsigned long","s+":"9"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"309939D","b":"1021000","o":"207839D","s":"_start","s+":"10D"}}}
{"t":{"$date":"2022-11-09T06:14:08.432+00:00"},"s":"I",  "c":"CONTROL",  "id":31445,   "ctx":"initandlisten","msg":"Frame","attr":{"frame":{"a":"806310008"}}}
Segmentation fault

I ran the command a second time after the initial failure and the mongo daemon starts properly. Shutting down the daemon (after successful 2nd attempt) and restarting it causes a segmentation fault.

I tried this again on a different machine (amd64) and it started the first time if I used the -vvvvv flag. However, it failed to start again due to another segmentation fault.

One other note, this issue also applies to arm64 as well. I compiled mongodb60 from the ports on my pine64 (RockPro). Both times they failed to start with a segmentation fault.

When compiling on arm64 machines, I received multiple failures during compilation. Usually error -9 or -1. I made a few modifications to get them to compile:

1. sysctl vm.pageout_oom_seq=120
2. use an NVME drive as swap
3. turned on powerd using adaptive mode

I was only able to successfully compile on my pine64 (RockPro) after using a NVME drive as swap. Swap space went up to about 12GB used at its peak. I was not able to compile on my Raspberry Pi 4. I used a packaged version of the build from the RockPro device to test on Raspberry Pi 4.

Please let me know if you need any additional information or have any questions.
Comment 1 Ronald Klop freebsd_committer freebsd_triage 2022-11-14 15:03:48 UTC
To compile on a low memory machine like RPi4 you can disable LTO and you can keep the number of parallel processes low by setting MAKE_JOBS_NUMBER=X. This is known about the mongodb build. It it not designed for small machines.

The segmentation fault needs investigation.
Comment 2 Ronald Klop freebsd_committer freebsd_triage 2022-11-18 14:12:07 UTC
I compiled mongodb 6.0.2 with -g and commented the "strip" commands in the Makefile.
This gives a lot more info. But I'm not a mongodb developer. So help is appreciated.

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)
Comment 3 Ronald Klop freebsd_committer freebsd_triage 2022-11-21 20:23:41 UTC
Posted about this on the MongoDB forum.
https://www.mongodb.com/community/forums/t/sigsegv-in-partitionedlockhead-on-mongodb-6-0-freebsd/200775?u=r_k
Comment 4 Ronald Klop freebsd_committer freebsd_triage 2022-11-24 09:37:43 UTC
Also create an upstream Jira issue about it.
https://jira.mongodb.org/browse/SERVER-71608
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-02-17 15:43:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d3641f4fa9e451f5944d52b6e05d0b3ad396e2bb

commit d3641f4fa9e451f5944d52b6e05d0b3ad396e2bb
Author:     Ronald Klop <ronald@FreeBSD.org>
AuthorDate: 2023-02-16 11:29:08 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2023-02-17 15:42:20 +0000

    databases/mongodb60: fix segmentation fault on startup

    Upstream fixed the issue in the upcoming version. The patch applies cleanly.
    And there was much rejoice...

    PR: 267668
    Approved by: rene (mentor)
    Differential Revision: https://reviews.freebsd.org/D38622

 databases/mongodb60/Makefile | 5 ++++-
 databases/mongodb60/distinfo | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)
Comment 6 Ronald Klop freebsd_committer freebsd_triage 2023-02-17 19:24:04 UTC
fixed in last commit
thanks for your bug report