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

Remove white-space from use in setThreadName

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.7
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Service Arch 2018-12-31, Service Arch 2019-01-14

      Less robust programs may parse the proc filesystem incorrectly if there is whitespace in thread names. I propose that we debug assert that there is no whitespace in the name inside the function setThreadName.

      As of now, I've found thread names containing spaces in:

      • src/mongo/db/commands/generic.cpp
      • src/mongo/db/index_builder.cpp
      • src/mongo/db/keys_collection_manager.cpp
      • src/mongo/db/repl/oplog_applier.cpp
      • src/mongo/db/s/metadata_manager.cpp
      • src/mongo/db/s/session_catalog_migration_destination_test.cpp
      • src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp
      • src/mongo/dbtests/deferred_writer.cpp
      • src/mongo/s/client/shard_registry.cpp

            Assignee:
            jonathan.ma@mongodb.com Jonathan Ma
            Reporter:
            ben.caimano@mongodb.com Benjamin Caimano (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: