Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddressSanitizer: odr-violation: global 'DbgCtl::_config_mode' #11269

Closed
masaori335 opened this issue Apr 19, 2024 · 4 comments
Closed

AddressSanitizer: odr-violation: global 'DbgCtl::_config_mode' #11269

masaori335 opened this issue Apr 19, 2024 · 4 comments
Assignees
Labels
ASan Address Sanitizer

Comments

@masaori335
Copy link
Contributor

ATS: 10.0.x

traffic_server[13596]: =================================================================
traffic_server[13596]: ==13596==ERROR: AddressSanitizer: odr-violation (0x7fcdb696de40):
traffic_server[13596]: [1] size=4 'DbgCtl::_config_mode' /src/tsutil/DbgCtl.cc
traffic_server[13596]: [2] size=4 'DbgCtl::_config_mode' /src/tsutil/DbgCtl.cc
traffic_server[13596]: These globals were registered at these points:
traffic_server[13596]: [1]:
traffic_server[13596]: #0 0x560c276d32f6  (traffic_server+0x5652f6) (BuildId: 418b7e70c189268d136aaa6c3a244ee763ad0e18)
traffic_server[13596]: #1 0x7fce5e3d29c2  (/lib64/ld-linux-x86-64.so.2+0xf9c2) (BuildId: 62c449974331341bb08dcce3859560a22af1e172)
traffic_server[13596]: #2 0x7fff2298ef88  ([stack]+0x20f88)
traffic_server[13596]: [2]:
traffic_server[13596]: #0 0x560c276d32f6  (traffic_server+0x5652f6) (BuildId: 418b7e70c189268d136aaa6c3a244ee763ad0e18)
traffic_server[13596]: #1 0x560c27797aac  (traffic_server+0x629aac) (BuildId: 418b7e70c189268d136aaa6c3a244ee763ad0e18)
traffic_server[13596]: ==13596==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
traffic_server[13596]: SUMMARY: AddressSanitizer: odr-violation: global 'DbgCtl::_config_mode' at /src/tsutil/DbgCtl.cc
traffic_server[13596]: ==13596==ABORTING
@masaori335 masaori335 added the ASan Address Sanitizer label Apr 19, 2024
@ywkaras
Copy link
Contributor

ywkaras commented Apr 19, 2024

It looks like that variable is getting defined in 3 core plugins as well as the core executable:

wkaras ~/TSX/TS
O$ nm -C -A $(find . -name traffic_server -o -name \*.so ) | grep ' [^U] DbgCtl::_config_mode'
./bin/traffic_server:00000000010793c8 B DbgCtl::_config_mode
./libexec/trafficserver/s3_auth.so:0000000000080090 B DbgCtl::_config_mode
./libexec/trafficserver/access_control.so:0000000000071788 B DbgCtl::_config_mode
./libexec/trafficserver/maxmind_acl.so:00000000000c4498 B DbgCtl::_config_mode
wkaras ~/TSX/TS
O$ nm -C -A $(find . -name traffic_server -o -name \*.so ) | grep ' U DbgCtl::_config_mode' | head
./lib/libtscppapi.so:                 U DbgCtl::_config_mode
./libexec/trafficserver/authproxy.so:                 U DbgCtl::_config_mode
./libexec/trafficserver/background_fetch.so:                 U DbgCtl::_config_mode
./libexec/trafficserver/cache_promote.so:                 U DbgCtl::_config_mode
./libexec/trafficserver/cache_range_requests.so:                 U DbgCtl::_config_mode
./libexec/trafficserver/cachekey.so:                 U DbgCtl::_config_mode
./libexec/trafficserver/certifier.so:                 U DbgCtl::_config_mode
./libexec/trafficserver/compress.so:                 U DbgCtl::_config_mode
./libexec/trafficserver/conf_remap.so:                 U DbgCtl::_config_mode
./libexec/trafficserver/escalate.so:                 U DbgCtl::_config_mode
wkaras ~/TSX/TS
O$ 

Can you give more details of the context in which you saw this error?

@ywkaras
Copy link
Contributor

ywkaras commented Apr 19, 2024

As a result of this, we probably can't get debug output in those 3 plugins.

@masaori335
Copy link
Contributor Author

I got this report right after starting ASan build of ATS 10.0.x branch. FWIW, we have s3_auth and access_control plugin.

@bryancall
Copy link
Contributor

This PR fixed the issue: #11283

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASan Address Sanitizer
Projects
None yet
Development

No branches or pull requests

4 participants