Fix use of SSL session TransportInfo after txn is detached
Summary: De-couple TransportInfo fields from SSL session structs to avoid dangling pointers. Facebook: We sometimes lazily copy TransportInfo in handler after detachClientTransaction for logging. If the socket is closed, then this creates dangling pointers to some SSL structs. This is an attempt to fix that. This is similar to what @ajitb did in https://phabricator.fb.com/D1666951 which had to be abandoned because of memory overhead. Here, instead of copying the relevant fields per transaction, we are only doing it once per session (shared_ptr), so the memory overhead should be negligible. Test Plan: Unit tests pass. Will canary Reviewed By: afrind@fb.com Subscribers: fugalh, bmatheny, ssl-diffs@, folly-diffs@, ajitb FB internal diff: D1757318 Tasks: 5865651, 5879508 Signature: t1:1757318:1420482488:9f5144b499eb2086cf2a80243328db5715b48f88
Showing
Please register or sign in to comment