-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
R&D Security
-
ALL
-
v7.0
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Summary
The nightly Coverity scan for v7.0-staging fails when building libmessage_filter_hooks.so.
Root Cause
The SERVER-127419 commit introduced libmessage_filter_hooks.so with source=[] (no source files) for enterprise Linux builds. On enterprise Linux, the real hook implementations live in libmessage_filter_hooks_enterprise.so; the transport-level wrapper was intentionally left source-less to avoid duplicate symbol definitions.
When Coverity's cov-build intercepts a pure link command with no compiled object files, it produces a non-ELF stub file rather than running the real linker. The subsequent SCons debug post-processing step fails because the Coverity stub is not a valid ELF:
{{
objcopy: libmessage_filter_hooks.so: can't dump section '.debug_str' - it does not exist: file format not recognized\n}}\n\nThis causes the SCons target to fail with Error 1, aborting the Coverity build.\n\n## Fix\n\nAdded src/mongo/transport/message_filter_hooks_enterprise_shim.cpp — a minimal placeholder file with no function definitions — and updated src/mongo/transport/SConscript to use it as the enterprise Linux source instead of source=[].\n\nThis ensures Coverity always sees a real compilation command and produces a valid ELF with proper debug sections, without shadowing the enterprise implementations in libmessage_filter_hooks_enterprise.so.\n\n## Affected Versions\n\nv7.0-staging (after SERVER-127419 backport commit 7c402cfdc96)
- is caused by
-
SERVER-127419 Initial message filter plugin loader
-
- Closed
-