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

Reactor unregister its metrics after the metrics shutdown #218

Closed
amnonh opened this issue Nov 21, 2016 · 3 comments
Closed

Reactor unregister its metrics after the metrics shutdown #218

amnonh opened this issue Nov 21, 2016 · 3 comments

Comments

@amnonh
Copy link
Contributor

amnonh commented Nov 21, 2016

The change in the metrics layer causes use-after-free errors during shudown:

==23041==AddressSanitizer: while reporting a bug found another one. Ignoring.
=================================================================
==23041==ERROR: AddressSanitizer: heap-use-after-free on address 0x613000037ea8 at pc 0x000000a172ac bp 0x7f5148ffe150 sp 0x7f5148ffe140
READ of size 8 at 0x613000037ea8 thread T3
==23041==AddressSanitizer: while reporting a bug found another one. Ignoring.
    #0 0xa172ab in std::_Hashtable<seastar::metrics::impl::metric_id, std::pair<seastar::metrics::impl::metric_id const, shared_ptr<seastar::metrics::impl::registered_metric> >, std::allocator<std::pair<seastar::metrics::impl::metric_id const, shared_ptr<seastar::metrics::impl::registered_metric> > >, std::__detail::_Select1st, std::equal_to<seastar::metrics::impl::metric_id>, std::hash<seastar::metrics::impl::metric_id>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_find_before_node(unsigned long, seastar::metrics::impl::metric_id const&, unsigned long) const /usr/include/c++/5.3.1/bits/hashtable.h:1426
    #1 0xa12d75 in std::_Hashtable<seastar::metrics::impl::metric_id, std::pair<seastar::metrics::impl::metric_id const, shared_ptr<seastar::metrics::impl::registered_metric> >, std::allocator<std::pair<seastar::metrics::impl::metric_id const, shared_ptr<seastar::metrics::impl::registered_metric> > >, std::__detail::_Select1st, std::equal_to<seastar::metrics::impl::metric_id>, std::hash<seastar::metrics::impl::metric_id>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_find_node(unsigned long, seastar::metrics::impl::metric_id const&, unsigned long) const /usr/include/c++/5.3.1/bits/hashtable.h:632
    #2 0xa25ba6 in std::_Hashtable<seastar::metrics::impl::metric_id, std::pair<seastar::metrics::impl::metric_id const, shared_ptr<seastar::metrics::impl::registered_metric> >, std::allocator<std::pair<seastar::metrics::impl::metric_id const, shared_ptr<seastar::metrics::impl::registered_metric> > >, std::__detail::_Select1st, std::equal_to<seastar::metrics::impl::metric_id>, std::hash<seastar::metrics::impl::metric_id>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::find(seastar::metrics::impl::metric_id const&) /usr/include/c++/5.3.1/bits/hashtable.h:1307
    #3 0xa2316c in std::unordered_map<seastar::metrics::impl::metric_id, shared_ptr<seastar::metrics::impl::registered_metric>, std::hash<seastar::metrics::impl::metric_id>, std::equal_to<seastar::metrics::impl::metric_id>, std::allocator<std::pair<seastar::metrics::impl::metric_id const, shared_ptr<seastar::metrics::impl::registered_metric> > > >::find(seastar::metrics::impl::metric_id const&) /usr/include/c++/5.3.1/bits/unordered_map.h:615
    #4 0xa204a1 in seastar::metrics::impl::unregister_metric(seastar::metrics::impl::metric_id const&) core/metrics.cc:111
    #5 0x9d3d0e in scollectd::impl::remove_polled(scollectd::type_instance_id const&) core/scollectd.cc:291
    #6 0x9da107 in scollectd::remove_polled_metric(scollectd::type_instance_id const&) core/scollectd.cc:455
    #7 0xa0083c in scollectd::registration::unregister() core/scollectd.hh:392
    #8 0x9d3955 in scollectd::registration::~registration() core/scollectd.cc:60
    #9 0x8077c5 in void std::_Destroy<scollectd::registration>(scollectd::registration*) /usr/include/c++/5.3.1/bits/stl_construct.h:93
    #10 0x7e2a5e in void std::_Destroy_aux<false>::__destroy<scollectd::registration*>(scollectd::registration*, scollectd::registration*) /usr/include/c++/5.3.1/bits/stl_construct.h:103
    #11 0x7ab7bd in void std::_Destroy<scollectd::registration*>(scollectd::registration*, scollectd::registration*) /usr/include/c++/5.3.1/bits/stl_construct.h:126
    #12 0x76310d in void std::_Destroy<scollectd::registration*, scollectd::registration>(scollectd::registration*, scollectd::registration*, std::allocator<scollectd::registration>&) /usr/include/c++/5.3.1/bits/stl_construct.h:151
    #13 0x729e36 in std::vector<scollectd::registration, std::allocator<scollectd::registration> >::~vector() /usr/include/c++/5.3.1/bits/stl_vector.h:424
    #14 0x4a1d06 in reactor::~reactor() core/reactor.cc:303
    #15 0x71959a in reactor_deleter::operator()(reactor*) core/reactor.cc:3024
    #16 0x74c6ac in std::unique_ptr<reactor, reactor_deleter>::~unique_ptr() (/var/lib/jenkins/jobs/seastar-build/workspace/compiler/g++/label/master/build/debug/tests/fileiotest+0x74c6ac)
    #17 0x7f514f213bce in __GI___call_tls_dtors (/lib64/libc.so.6+0x39bce)
    #18 0x7f514f5a2627 in start_thread (/lib64/libpthread.so.0+0x7627)
    #19 0x7f514f2dc59c in clone (/lib64/libc.so.6+0x10259c)
@amnonh
Copy link
Contributor Author

amnonh commented Jan 5, 2017

Can be closed

@slivne
Copy link
Contributor

slivne commented Jan 5, 2017 via email

@amnonh
Copy link
Contributor Author

amnonh commented Jan 5, 2017

50e9a7e

@nyh nyh closed this as completed May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants