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

Crashes in AuthorizationManagerImpl when running binaries built with VS2019

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Security
    • None
    • ALL
    • Hide
      • Spawn a windows-64-vs2019-nonprod instance, or just install VS 2019 locally if you have a windows machine.
      • Build master from source, but add MSVC_VERSION=14.2 on the SCons invocation line. I recommend doing a --dbg=on build to get abseil assertions enabled.
      • Run the auth suite.
      Show
      Spawn a windows-64-vs2019-nonprod instance, or just install VS 2019 locally if you have a windows machine. Build master from source, but add MSVC_VERSION=14.2 on the SCons invocation line. I recommend doing a --dbg=on build to get abseil assertions enabled. Run the auth suite.
    • Security 2019-12-16, Dev Platform 2019-12-30, Dev Platform 2020-02-10

      We have recently been doing experiments with building with VS2019, because it comes with a much faster linker. It can save us close to an hour of build time, the majority of which comes from faster linking of unit tests.

      However, we are encountering an interesting crash inside the AuthorizationManagerImpl class.

      Here are links to two recent instances out of a patch build:

      The bottom of the crash always looks like:

      [js_test:auth1] 2019-12-10T21:47:03.474+0000 d21770| Assertion failed: it != end(), file C:\data\mci\df6020d8f98282b32443f3e0ae575514\src\src\third_party\abseil-cpp-master\abseil-cpp\absl/container/internal/raw_hash_set.h, line 1269
      [js_test:auth1] 2019-12-10T21:47:03.687+0000 d21770| 2019-12-10T21:47:03.687+0000 F  -        [conn1] Got signal: 22 (SIGABRT).
      [js_test:auth1] 2019-12-10T21:47:03.687+0000 d21770| mongod.exe     ...\src\mongo\util\stacktrace_windows.cpp(353)                                                                      mongo::printStackTrace+0x4f
      [js_test:auth1] 2019-12-10T21:47:03.687+0000 d21770| mongod.exe     ...\src\mongo\util\signal_handlers_synchronous.cpp(242)                                                             mongo::`anonymous namespace'::abruptQuit+0xc3
      [js_test:auth1] 2019-12-10T21:47:03.687+0000 d21770| ucrtbased.dll                                                                                                                      raise+0x441
      [js_test:auth1] 2019-12-10T21:47:03.687+0000 d21770| ucrtbased.dll                                                                                                                      abort+0x39
      [js_test:auth1] 2019-12-10T21:47:03.687+0000 d21770| ucrtbased.dll                                                                                                                      get_wide_winmain_command_line+0x211f
      [js_test:auth1] 2019-12-10T21:47:03.687+0000 d21770| ucrtbased.dll                                                                                                                      get_wide_winmain_command_line+0x118
      [js_test:auth1] 2019-12-10T21:47:03.687+0000 d21770| ucrtbased.dll                                                                                                                      wassert+0x2f
      [js_test:auth1] 2019-12-10T21:47:03.687+0000 d21770| mongod.exe     ...\src\third_party\abseil-cpp-master\abseil-cpp\absl\container\internal\raw_hash_set.h(1270)                       absl::container_internal::raw_hash_set<absl::container_internal::NodeHashMapPolicy<mongo::UserName,std::weak_ptr<mongo::User> >,absl::hash_internal::Hash<mongo::UserName>,std::equal_to<mongo::UserName>,std::allocator<std::pair<mongo::UserName const ,std::weak_ptr<mongo::User> > > >::erase+0x3e
      [js_test:auth1] 2019-12-10T21:47:03.687+0000 d21770| mongod.exe     ...\src\mongo\util\invalidating_lru_cache.h(277)                                                                    mongo::InvalidatingLRUCache<mongo::UserName,mongo::User,mongo::AuthorizationManagerImpl::UserCacheInvalidator>::_invalidateKey+0x228
      [js_test:auth1] 2019-12-10T21:47:03.687+0000 d21770| mongod.exe     ...\src\mongo\db\auth\authorization_manager_impl.cpp(746)                                                           mongo::AuthorizationManagerImpl::invalidateUserByName+0x194
      

      So this might really be an issue with the InvalidingLRUCache, or with abseil, or it could be a VS2019 issue.

      CC shreyas.kalyan and jbreams.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: