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

link fail under UBSAN: missing typeinfo for mongo::ClientCursor

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • Execution NAMR Team 2023-08-21
    • 163

      This is a UBSAN build. I think what's going on here is that UBSAN needs more typeinfo than a normal build, in order to check the validity of downcasts, etc.

      Possible solution: the library that includes shard_role.o need to depend on the library that provides mongo::ClientCursor and its typeinfo structure.

      https://parsley.mongodb.com/evergreen/mongodb_mongo_master_rhel80_debug_ubsan_all_feature_flags_compile_dist_test_patch_eba65446f5d9279b65041e15ce7dd8c1138f5537_64cbc13f850e61d843791776_23_08_03_15_01_38/0/task?bookmarks=14323

      [2023/08/03 15:42:49.080] /opt/mongodbtoolchain/v4/bin/clang++ @/data/mci/4fb2b158d6ffdbb635b2e5145fedb59a/tmp/tmpjljafga4.lnk
      [2023/08/03 15:42:50.166] Command execution time: build/cached/mongo/tools/mongobridge_tool/mongobridge: 1.099147 seconds
      [2023/08/03 15:42:51.702] oom_auto_retry.py captured error:
      [2023/08/03 15:42:51.702] ld.lld: error: undefined symbol: typeinfo for mongo::ClientCursor
      [2023/08/03 15:42:51.702] >>> referenced by shard_role.cpp
      [2023/08/03 15:42:51.702] >>>               shard_role.o:(.data+0x2048) in archive build/cached/mongo/db/libshard_role.a
      [2023/08/03 15:42:51.702] >>> referenced by shard_role.cpp
      [2023/08/03 15:42:51.702] >>>               shard_role.o:(.data+0x21A8) in archive build/cached/mongo/db/libshard_role.a
      [2023/08/03 15:42:51.702] >>> referenced by shard_role.cpp
      [2023/08/03 15:42:51.702] >>>               shard_role.o:(.data+0xBFF8) in archive build/cached/mongo/db/libshard_role.a
      [2023/08/03 15:42:51.702] >>> referenced 2 more times
      [2023/08/03 15:42:51.702] clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
      

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: