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

SCons split_dwarf tool can cause spurious object file rebuilds

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.11
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Fully Compatible
    • Linux
    • Hide

      On a Linux machine:

      > git checkout r4.0.4
      > git clean -xfd
      
      > /usr/bin/time python ./buildscripts/scons.py --ssl --install-mode=hygienic --implicit-cache -j 24 --disable-warnings-as-errors --modules= --variables-files= --link-model=dynamic CCFLAGS=-gsplit-dwarf build/install/bin/mongod --debug=explain
      
      > /usr/bin/time python ./buildscripts/scons.py --ssl --install-mode=hygienic --implicit-cache -j 24 --disable-warnings-as-errors --modules= --variables-files= --link-model=dynamic CCFLAGS=-gsplit-dwarf build/install/bin/mongod --debug=explain
      
      

      The second build will rebuild files, but it should not:

      scons: done reading SConscript files.
      scons: Building targets ...
      scons: rebuilding `build/opt/mongo/base/shim.dwo' because:
                 `src/mongo/base/shim.cpp' is no longer a dependency
                 `src/mongo/base/shim.cpp' is a new dependency
      Compiling build/opt/mongo/base/shim.os
      scons: rebuilding `build/opt/mongo/base/data_type_terminated.dwo' because:
                 `src/mongo/base/data_type_terminated.cpp' is no longer a dependency
                 `src/mongo/base/data_type_terminated.cpp' is a new dependency
      Compiling build/opt/mongo/base/data_type_terminated.os
      scons: rebuilding `build/opt/mongo/util/net/hostandport_gen.dwo' because the dependency order changed:
                     old: ['build/opt/mongo/util/net/hostandport_gen.cpp', '/usr/bin/g++', 'src/mongo/bson/bsonobjbuilder.h', ...
      
      Show
      On a Linux machine: > git checkout r4.0.4 > git clean -xfd > /usr/bin/time python ./buildscripts/scons.py --ssl --install-mode=hygienic --implicit-cache -j 24 --disable-warnings-as-errors --modules= --variables-files= --link-model=dynamic CCFLAGS=-gsplit-dwarf build/install/bin/mongod --debug=explain > /usr/bin/time python ./buildscripts/scons.py --ssl --install-mode=hygienic --implicit-cache -j 24 --disable-warnings-as-errors --modules= --variables-files= --link-model=dynamic CCFLAGS=-gsplit-dwarf build/install/bin/mongod --debug=explain The second build will rebuild files, but it should not: scons: done reading SConscript files. scons: Building targets ... scons: rebuilding `build/opt/mongo/base/shim.dwo' because: `src/mongo/base/shim.cpp' is no longer a dependency `src/mongo/base/shim.cpp' is a new dependency Compiling build/opt/mongo/base/shim.os scons: rebuilding `build/opt/mongo/base/data_type_terminated.dwo' because: `src/mongo/base/data_type_terminated.cpp' is no longer a dependency `src/mongo/base/data_type_terminated.cpp' is a new dependency Compiling build/opt/mongo/base/data_type_terminated.os scons: rebuilding `build/opt/mongo/util/net/hostandport_gen.dwo' because the dependency order changed: old: ['build/opt/mongo/util/net/hostandport_gen.cpp', '/usr/bin/g++', 'src/mongo/bson/bsonobjbuilder.h', ...
    • Dev Tools 2019-01-14, Dev Tools 2019-01-28, Dev Tools 2019-02-11, Dev Tools 2019-03-25, Dev Tools 2019-04-08, Dev Tools 2019-04-22

      When the split_dwarf tools is enabled, we sometimes observe that some object files get (identically) rebuilt on the second build, though not on subsequent builds.

      We should figure out why, and fix it.

        1. rebuilt.files.scons-3.0.1.r4.1.4
          21 kB
        2. rebuilt.files.scons-3.0.1.master
          22 kB
        3. no.dwo
          16 kB
        4. common.rebuilds
          21 kB

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

              Created:
              Updated:
              Resolved: