Skip to content

Conversation

@ywkaras
Copy link
Contributor

@ywkaras ywkaras commented May 17, 2022

Cherry-pick Conflicts:
plugins/experimental/ja3_fingerprint/ja3_fingerprint.cc

@ywkaras ywkaras self-assigned this May 17, 2022
@ywkaras ywkaras added this to the 10.0.0 milestone May 17, 2022
@ywkaras
Copy link
Contributor Author

ywkaras commented May 17, 2022

This is going into Yahoo Prod first. Will undraft this after it soaks in prod for a while.

Cherry-pick Conflicts:
plugins/experimental/ja3_fingerprint/ja3_fingerprint.cc
@ywkaras ywkaras force-pushed the os_ja3_data_del_race branch from 75a4b3a to 5b95218 Compare May 17, 2022 18:00
@ywkaras ywkaras closed this May 17, 2022
@ywkaras ywkaras reopened this May 17, 2022
@ywkaras ywkaras marked this pull request as ready for review August 1, 2022 17:20
@ywkaras
Copy link
Contributor Author

ywkaras commented Aug 1, 2022

This has soaked in Yahoo Prod for a couple of weeks, no issues. It potentially eliminates some crashes, but I'm not 100% it does.

@ywkaras
Copy link
Contributor Author

ywkaras commented Aug 3, 2022

This is a stack dump for a type of crash that we were seeing in Yahoo prod, that I hope this change fixes:

[ 00 ] libc-2.17.so                  raise                                                                                                                                   ( raise.c:55 )
[ 01 ] libc-2.17.so                  abort                                                                                                                                   ( abort.c:90 )
[ 02 ] libstdc++.so.6.0.19           __gnu_cxx::__verbose_terminate_handler()                                                                                                
[ 03 ] libstdc++.so.6.0.19                                                                                                                                                   
[ 04 ] libstdc++.so.6.0.19                                                                                                                                                   
[ 05 ] libstdc++.so.6.0.19           __gxx_personality_v0                                                                                                                    
[ 06 ] libgcc_s-4.8.5-20150702.so.1                                                                                                                                          
[ 07 ] libgcc_s-4.8.5-20150702.so.1  _Unwind_RaiseException                                                                                                                  
[ 08 ] libstdc++.so.6.0.19           __cxa_throw                                                                                                                             
[ 09 ] libstdc++.so.6.0.19           std::__throw_length_error(char const*)                                                                                                  
[ 10 ] traffic_server                std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&)                                                 ( basic_string.tcc:1002 )
[ 11 ] traffic_server                std::string::_M_mutate(unsigned long, unsigned long, unsigned long)                                                                     ( basic_string.tcc:929 )
[ 12 ] traffic_server                std::string::_M_leak_hard()                                                                                                             ( basic_string.tcc:912 )
[ 13 ] ja3_fingerprint.so            _M_leak                                                                                                                                 ( basic_string.h:3338 )
[ 14 ] ja3_fingerprint.so            data                                                                                                                                    ( basic_string.h:5153 )
[ 15 ] ja3_fingerprint.so            req_hdr_ja3_handler                                                                                                                     ( ja3_fingerprint.cc:393 )
[ 16 ] traffic_server                INKContInternal::handle_event(int, void*)                                                                                               ( InkAPI.cc:1138 )
[ 17 ] traffic_server                APIHook::invoke(int, void*) const                                                                                                       ( I_Continuation.h:219 )
[ 18 ] traffic_server                HttpSM::state_api_callout(int, void*)                                                                                                   ( HttpSM.cc:1712 )
[ 19 ] traffic_server                HttpSM::state_api_callback(int, void*)                                                                                                  ( HttpSM.cc:1589 )
[ 20 ] traffic_server                TSHttpTxnReenable                                                                                                                       ( InkAPI.cc:6300 )
[ 21 ] vz_connection.so              http_hook                                                                                                                               ( INKPluginInit.cc:427 )
[ 22 ] traffic_server                INKContInternal::handle_event(int, void*)                                                                                               ( InkAPI.cc:1138 )
[ 23 ] traffic_server                APIHook::invoke(int, void*) const                                                                                                       ( I_Continuation.h:219 )
[ 24 ] traffic_server                HttpSM::state_api_callout(int, void*)                                                                                                   ( HttpSM.cc:1712 )
[ 25 ] traffic_server                HttpSM::state_api_callback(int, void*)                                                                                                  ( HttpSM.cc:1589 )
[ 26 ] traffic_server                TSHttpTxnReenable                                                                                                                       ( InkAPI.cc:6300 )
[ 27 ] libtscppapi.so.9.1.1          (anonymous namespace)::handleTransactionEvents(tsapi_cont*, TSEvent, void*)                                                             ( utils_internal.cc:111 )
[ 28 ] traffic_server                INKContInternal::handle_event(int, void*)                                                                                               ( InkAPI.cc:1138 )
[ 29 ] traffic_server                APIHook::invoke(int, void*) const                                                                                                       ( I_Continuation.h:219 )
[ 30 ] traffic_server                HttpSM::state_api_callout(int, void*)                                                                                                   ( HttpSM.cc:1712 )
[ 31 ] traffic_server                HttpSM::do_http_server_open(bool, bool)                                                                                                 ( HttpSM.cc:5528 )
[ 32 ] traffic_server                HttpSM::set_next_state()                                                                                                                ( HttpSM.cc:8055 )
[ 33 ] traffic_server                HttpSM::state_api_callout(int, void*)                                                                                                   ( HttpSM.cc:1788 )
[ 34 ] traffic_server                HttpSM::state_api_callback(int, void*)                                                                                                  ( HttpSM.cc:1589 )
[ 35 ] traffic_server                TSHttpTxnReenable                                                                                                                       ( InkAPI.cc:6300 )
[ 36 ] quick_filter.so               (anonymous namespace)::cb(tsapi_cont*, TSEvent, void*)                                                                                  ( quick_filter.cc:680 )
[ 37 ] traffic_server                INKContInternal::handle_event(int, void*)                                                                                               ( InkAPI.cc:1138 )
[ 38 ] traffic_server                APIHook::invoke(int, void*) const                                                                                                       ( I_Continuation.h:219 )
[ 39 ] traffic_server                HttpSM::state_api_callout(int, void*)                                                                                                   ( HttpSM.cc:1712 )
[ 40 ] traffic_server                HttpSM::set_next_state()                                                                                                                ( HttpSM.cc:7917 )
[ 41 ] traffic_server                HttpSM::do_hostdb_lookup()                                                                                                              ( HttpSM.cc:4750 )
[ 42 ] traffic_server                HttpSM::set_next_state()                                                                                                                ( HttpSM.cc:8203 )
[ 43 ] traffic_server                HttpSM::state_api_callout(int, void*)                                                                                                   ( HttpSM.cc:1788 )
[ 44 ] traffic_server                HttpSM::state_api_callback(int, void*)                                                                                                  ( HttpSM.cc:1589 )
[ 45 ] traffic_server                TSHttpTxnReenable                                                                                                                       ( InkAPI.cc:6300 )
[ 46 ] regex_revalidate.so           main_handler                                                                                                                            ( regex_revalidate.c:441 )
[ 47 ] traffic_server                INKContInternal::handle_event(int, void*)                                                                                               ( InkAPI.cc:1138 )
[ 48 ] traffic_server                APIHook::invoke(int, void*) const                                                                                                       ( I_Continuation.h:219 )
[ 49 ] traffic_server                HttpSM::state_api_callout(int, void*)                                                                                                   ( HttpSM.cc:1712 )
[ 50 ] traffic_server                HttpSM::state_api_callback(int, void*)                                                                                                  ( HttpSM.cc:1589 )
[ 51 ] traffic_server                TSHttpTxnReenable                                                                                                                       ( InkAPI.cc:6300 )
[ 52 ] carp.so                       carpLookup(tsapi_cont*, TSEvent, void*)                                                                                                 ( carp.cc:776 )
[ 53 ] traffic_server                INKContInternal::handle_event(int, void*)                                                                                               ( InkAPI.cc:1138 )
[ 54 ] traffic_server                APIHook::invoke(int, void*) const                                                                                                       ( I_Continuation.h:219 )
[ 55 ] traffic_server                HttpSM::state_api_callout(int, void*)                                                                                                   ( HttpSM.cc:1712 )
[ 56 ] traffic_server                HttpSM::state_cache_open_read(int, void*)                                                                                               ( HttpSM.cc:2850 )
[ 57 ] traffic_server                HttpSM::main_handler(int, void*)                                                                                                        ( HttpSM.cc:2956 )
[ 58 ] traffic_server                HttpCacheSM::state_cache_open_read(int, void*)                                                                                          ( I_Continuation.h:219 )
[ 59 ] traffic_server                Cache::open_read(Continuation*, ats::CryptoHash const*, HTTPHdr*, OverridableHttpConfigParams const*, CacheFragType, char const*, int)  ( CacheRead.cc:149 )
[ 60 ] traffic_server                CacheProcessor::open_read(Continuation*, HttpCacheKey const*, HTTPHdr*, OverridableHttpConfigParams const*, long, CacheFragType)        ( Cache.cc:3247 )
[ 61 ] traffic_server                HttpCacheSM::do_cache_open_read(HttpCacheKey const&)                                                                                    ( HttpCacheSM.cc:279 )
[ 62 ] traffic_server                HttpCacheSM::open_read(HttpCacheKey const*, URL*, HTTPHdr*, OverridableHttpConfigParams const*, long)                                   ( HttpCacheSM.cc:314 )
[ 63 ] traffic_server                HttpSM::do_cache_lookup_and_read()                                                                                                      ( HttpSM.cc:5173 )

@bryancall bryancall requested a review from cmcfarlen September 26, 2022 23:32
cmcfarlen
cmcfarlen previously approved these changes Sep 27, 2022
Copy link
Contributor

@cmcfarlen cmcfarlen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

TSDebug(PLUGIN_NAME, "req_hdr_ja3_handler(): ja3 data not set. Not SSL vconn. Abort.");
}
TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
} // This block is needed to make sure 'a' is destroyed before reeenable is called.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can go without the block if you declare a in the if:

if (auto a = ja3_data::access(vconn); a.get()) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK changed.

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.

@github-actions github-actions bot added the Stale label Dec 28, 2022
@github-actions github-actions bot closed this Jan 4, 2023
@zwoop zwoop removed this from the 10.0.0 milestone Jan 17, 2023
@zwoop zwoop deleted the os_ja3_data_del_race branch January 20, 2023 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants