Repository navigation
ceph-dencoder: Add global to denc-mod-osd's target_link_libraries - #47982
Conversation
|
Note: pacific doesn't need this one. It's only necessary on main and quincy. |
|
Ping @tchaikov :-) |
| erasure_code | ||
| global) |
There was a problem hiding this comment.
| erasure_code | |
| global) | |
| erasure_code | |
| global-static) |
see 4ea38df for the rationales.
There was a problem hiding this comment.
I've just tried that, and now ceph-dencoder segfaults:
# ceph-dencoder
-h for help
Segmentation fault (core dumped)
# gdb ceph-dencoder
[...]
Reading symbols from ceph-dencoder...
(No debugging symbols found in ceph-dencoder)
(gdb) run
Starting program: /usr/bin/ceph-dencoder
Missing separate debuginfos, use: zypper install ceph-common-debuginfo-17.0.0-14884.1.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
-h for help
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7de1123 in tcmalloc::ThreadCache::ReleaseToCentralCache(tcmalloc::ThreadCache::FreeList*, unsigned int, int) () from /lib64/libtcmalloc.so.4
Note that ceph-dencoder itself links against global, not global-static:
ceph/src/tools/ceph-dencoder/CMakeLists.txt
Lines 97 to 100 in a1bf7f7
Could that discrepancy cause this? Should I try changing that to global-static as well, or go back to using global for denc-mod-osd?
There was a problem hiding this comment.
Just for a test, I tried using global-static on denc-mod-osd as above, and switched global to global-static in ceph-dencoder like so:
--- ceph-17.0.0-14883-gc49b81c7d61.orig/src/tools/ceph-dencoder/CMakeLists.txt
+++ ceph-17.0.0-14883-gc49b81c7d61/src/tools/ceph-dencoder/CMakeLists.txt
@@ -97,7 +97,7 @@ target_compile_definitions(ceph-dencoder
target_link_libraries(ceph-dencoder
StdFilesystem::filesystem
- global
+ global-static
${DENCODER_EXTRALIBS}
cls_log_client
cls_version_clientThat fixes the segfault, but now I've got another undefined symbol (this time in denc-mod-common):
# ceph-dencoder
failed to dlopen("/usr/lib64/ceph/denc/denc-mod-common.so"): /usr/lib64/ceph/denc/denc-mod-common.so: undefined symbol: _ZTI7Message
-h for help
Based on these tests, I think we just need to use global, not global-static, unless there's some other change(s) necessary in addition to the above.
There was a problem hiding this comment.
@tserong hi Tim, sorry. i didn't look into the linkage of ceph-dencoder itself. agreed, it it links against global-static, we should not link denc-mod-* against it again. it'd violate the ODR (one definition rule). but after a second thought, i think we need to drop global from ceph-dencoder's linked libraries list. BTW, sorry for the latency. i was in a "power saver mode" last month.
There was a problem hiding this comment.
@tserong the global linkage is likely to be pulled in by mon and osd which reference ErasureCodePluginRegistry::instance(). but i still don't understand why this makes it a dependency. as the function using this symbol is not used by ceph-dencoder or any of its denc-mod-* plugins. guess LTO thinks different than I do..
but i don't want to block you because of my incompetence. from the test result and your reasoning, this change makes sense.
No problem!
Incompetence? Nah man, you still know more about this stuff than me :-) |
Fixes: https://tracker.ceph.com/issues/57390
Signed-off-by: Tim Serong [email protected]
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows