[SERVER-17859] Add buildId info to all platforms Created: 02/Apr/15  Updated: 07/Dec/16  Resolved: 11/Jul/16

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Bruce Lucas (Inactive) Assignee: Jonathan Reams
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-13942 Consider placing mongodb version info... Closed
Backwards Compatibility: Fully Compatible
Sprint: Platforms 16 (06/24/16), Platforms 17 (07/15/16)
Participants:

 Description   

It is often necessary to identify the precise pre-built MongoDB binary that a customer is running, for example to resolve stack trace addresses to symbols. The customer does not always have the exact information or may not reliably supply it, and requesting the information from the customer can delay resolution of a problem. It would improve support if the exact build that is running were logged.



 Comments   
Comment by Andrew Morrow (Inactive) [ 11/Jul/16 ]

I think you can ignore the clang builder, in which case, I think this ticket can be closed.

Comment by Jonathan Reams [ 07/Jul/16 ]

I pulled down the latest 3.3 binaries, and all of the Linux builds (except for the clang builder) had a build id embedded:

./mongodb-linux-s390x-enterprise-rhel72-3.3.9/bin/mongod: ELF 64-bit MSB shared object, IBM S/390, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld64.so.1, for GNU/Linux 2.6.32, BuildID[sha1]=b202db1afe6fc043d70377e9d9e67f944acc8023, not stripped
./mongodb-solaris-x86_64-3.3.9/bin/mongod: ELF 64-bit LSB executable, x86-64, version 1 (Solaris), dynamically linked, interpreter /usr/lib/amd64/ld.so.1, not stripped
./mongodb-linux-x86_64-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=8d1113bf8b2787d1843f76bc77d599632a9c2cca, not stripped
./mongodb-linux-ppc64le-enterprise-rhel71-3.3.9/bin/mongod: ELF 64-bit LSB shared object, 64-bit PowerPC or cisco 7500, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=48c0c150720e3233e4f243e94b25129b73b3b123, not stripped
./mongodb-linux-x86_64-rhel70-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=dbaaf3958026b2ccec5f93bb7c7e27423a87bf40, not stripped
./mongodb-linux-x86_64-debian81-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=5ab2e51fce693e384b2401b57265261331cb172e, not stripped
./mongodb-linux-x86_64-enterprise-debian71-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.26, BuildID[sha1]=33a657f623d42d12197eafd8c357404786417fb8, not stripped
./mongodb-linux-x86_64-enterprise-rhel70-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=11c84109e445e68eb96fb5eef5e3aa4cb1edd1fd, not stripped
./mongodb-linux-x86_64-suse11-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.4, BuildID[sha1]=900471df4c914fec9b1f3e5824777024a4afd856, not stripped
./mongodb-linux-x86_64-amazon-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=2b3103cea5593941ba720f5a0c994428b1187d98, not stripped
./mongodb-linux-x86_64-enterprise-ubuntu1604-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=e2c3d7cdb74b2b9cac2438ee7211d5a6f527962d, not stripped
./mongodb-osx-x86_64-3.3.9/bin/mongod: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE|HAS_TLV_DESCRIPTORS>
./mongodb-linux-x86_64-ubuntu1604-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=450dcb567aee9c9711e8249b3d3ff44431dfe1cf, not stripped
./mongodb-osx-x86_64-enterprise-3.3.9/bin/mongod: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE|HAS_TLV_DESCRIPTORS>
./mongodb-linux-x86_64-debian71-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.26, BuildID[sha1]=d680cf4c93b19661bbe1361f23399e6f28af36f4, not stripped
./mongodb-linux-x86_64-enterprise-rhel62-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=1eb7eb36b98f0b707d306353d05e54b693f9542f, not stripped
./mongodb-linux-x86_64-ubuntu1410-clang-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped
./mongodb-linux-x86_64-enterprise-ubuntu1404-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=cf499de1063ce7c76fbbf944215d17667b2bac3e, not stripped
./mongodb-linux-x86_64-rhel62-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=ebc0796d9475b3b03121bd9ea421bc2d8da3bf9e, not stripped
./mongodb-linux-x86_64-ubuntu1204-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=3be66f54fc38505eb9eb92c1eaa5ceec7540f715, not stripped
./mongodb-linux-x86_64-enterprise-debian81-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=471b86685be033e46f982f6e044aead9dee4ba1d, not stripped
./mongodb-linux-x86_64-enterprise-ubuntu1204-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=c816007b2bafe3a58af23a00d2c2a6b8be6e200f, not stripped
./mongodb-linux-x86_64-suse12-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.0.0, BuildID[sha1]=764f38f3dd5d6b724245d814dcfafebc43ace669, not stripped
./mongodb-linux-x86_64-ubuntu1404-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=9109f089036fc849350b75d5fe8c1529e75f7a23, not stripped
./mongodb-linux-x86_64-enterprise-suse12-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.0.0, BuildID[sha1]=7c0e5c19f900f60d541978ee579be361e92c4691, not stripped
./mongodb-linux-x86_64-enterprise-amzn64-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=cee8126f81ecf3bb18b34a5be531d7bf2d27b2e9, not stripped
./mongodb-linux-x86_64-enterprise-suse11-3.3.9/bin/mongod: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.4, BuildID[sha1]=f4432931a1f269e196f49284380675f22afe34dc, not stripped

Can we close this?

Comment by Bruce Lucas (Inactive) [ 02/Apr/15 ]

Buildid doesn't seem to be present in all stacktraces.

Also there are scenarios where the build is needed where there aren't stacktraces in the log - e.g. when using procdump to get stack traces on Windows.

Comment by Eric Milkie [ 02/Apr/15 ]

This would be the field "buildId", which gets prepended to stacktraces on platforms where NT_GNU_BUILD_ID macro is defined at compile time.

Comment by Eric Milkie [ 02/Apr/15 ]

In the stack trace information, the exact build is logged (except for RHEL 5, I believe?).

Generated at Thu Feb 08 03:45:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.