-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix echo_requester TCP leak #12031
Merged
kpschoedel
merged 1 commit into
project-chip:master
from
kpschoedel:x11880-fix-echo-requester
Nov 21, 2021
Merged
Fix echo_requester TCP leak #12031
kpschoedel
merged 1 commit into
project-chip:master
from
kpschoedel:x11880-fix-echo-requester
Nov 21, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Problem `echo_requester.cpp` leaks TCP endpoints. Instance of project-chip#11880 _Possible use of destroyed pool objects_ #### Change overview Shut down `TCPManager`. #### Testing If `ObjectPool` checks that objects do not outlive it (originally part of PR project-chip#11698 but deferred due to current leaks), then Cirque CI fails without this change.
pullapprove
bot
requested review from
anush-apple,
austinh0,
balducci-apple,
bzbarsky-apple,
carol-apple,
chrisdecenzo,
chulspro,
Damian-Nordic,
electrocucaracha,
erjiaqing,
franck-apple,
hawk248,
holbrookt,
jelderton,
jepenven-silabs,
jmartinez-silabs,
kghost,
LuDuda,
lzgrablic02,
mlepage-google,
mrjerryjohns,
msandstedt,
pan-apple,
sagar-apple,
saurabhst,
selissia,
tcarmelveilleux,
tecimovic and
turon
November 19, 2021 14:30
PR #12031: Size comparison from ebadd33 to 6139848 Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
msandstedt
approved these changes
Nov 19, 2021
yufengwangca
approved these changes
Nov 19, 2021
bzbarsky-apple
approved these changes
Nov 20, 2021
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Nov 29, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 Possible use of destroyed pool objects #### Change overview - Adds a template argument to choose between two options when an `ObjectPool` is destroyed with live objects: to either release all objects (which calls their destructors), or to die with an error message. - For existing cases in `SessionManager`, free leftover objects. **XXX file issue** #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Nov 29, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 Possible use of destroyed pool objects #### Change overview - Adds a template argument to choose between two options when an `ObjectPool` is destroyed with live objects: to either release all objects (which calls their destructors), or to die with an error message. - For existing cases in `SessionManager`, free leftover objects. **XXX file issue** #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Nov 30, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 Possible use of destroyed pool objects #### Change overview - Adds a template argument to choose between two options when an `ObjectPool` is destroyed with live objects: to either release all objects (which calls their destructors), or to die with an error message. - Fix shutdown ordering in `DeviceControllerSystemState`. - For existing cases in `SessionManager`, free leftover objects. **XXX file issue** #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Nov 30, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 Possible use of destroyed pool objects #### Change overview - Adds a template argument to choose between two options when an `ObjectPool` is destroyed with live objects: to either release all objects (which calls their destructors), or to die with an error message. - For existing cases in `SessionManager`, free leftover objects. **XXX file issue** - Fix shutdown ordering in `DeviceControllerSystemState`. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Nov 30, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 Possible use of destroyed pool objects #### Change overview - Adds a template argument to choose between two options when an `ObjectPool` is destroyed with live objects: to either release all objects (which calls their destructors), or to die with an error message. - For existing cases in `SessionManager`, free leftover objects. **XXX file issue** #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Nov 30, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 Possible use of destroyed pool objects #### Change overview - Adds a template argument to choose between two options when an `ObjectPool` is destroyed with live objects: to either release all objects (which calls their destructors), or to die with an error message. - For existing cases in `SessionManager`, free leftover objects. **XXX file issue** - Fix shutdown ordering in `DeviceControllerSystemState`. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Nov 30, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 Possible use of destroyed pool objects #### Change overview - Adds a template argument to choose between two options when an `ObjectPool` is destroyed with live objects: to either release all objects (which calls their destructors), or to die with an error message. - For existing cases in `SessionManager`, free leftover objects. - Fix shutdown ordering in `DeviceControllerSystemState`. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Dec 1, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 _Possible use of destroyed pool objects_ #### Change overview - Adds a template argument to choose between two options when an `ObjectPool` is destroyed with live objects: to either release all objects (which calls their destructors), or to die with an error message. - For existing cases in `SessionManager`, free leftover objects. - Fix shutdown ordering in `DeviceControllerSystemState`. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Dec 1, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 Possible use of destroyed pool objects #### Change overview - Adds a template argument to choose between two options when an `ObjectPool` is destroyed with live objects: to either release all objects (which calls their destructors), or to die with an error message. - For existing cases in `SessionManager`, free leftover objects. **XXX file issue** - Fix shutdown ordering in `DeviceControllerSystemState`. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Dec 1, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 _Possible use of destroyed pool objects_ #### Change overview - Adds a template argument to choose between two options when an `ObjectPool` is destroyed with live objects: to either release all objects (which calls their destructors), or to die with an error message. - For existing cases in `SessionManager`, free leftover objects. - Fix shutdown ordering in `DeviceControllerSystemState`. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Dec 1, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 _Possible use of destroyed pool objects_ #### Change overview - Add a `BitMapObjectPool` template argument indicating what to do if it is destroyed with live objects: abort with an error message, release all objects (which calls their destructors), or (transitionally) ignore the condition. - Fix shutdown ordering in `DeviceControllerSystemState`. - For existing pools in `SessionManager`, ignore the condition. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Dec 1, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 _Possible use of destroyed pool objects_ #### Change overview - Add a `BitMapObjectPool` template argument indicating what to do if it is destroyed with live objects: abort with an error message, release all objects (which calls their destructors), or (transitionally) ignore the condition. - Fix shutdown ordering in `DeviceControllerSystemState`. - For existing pools in `SessionManager`, ignore the condition. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Dec 1, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 _Possible use of destroyed pool objects_ #### Change overview - Add an `ObjectPool` template argument indicating what to do if it is destroyed with live objects: abort with an error message, release all objects (which calls their destructors), or ignore the condition (transitionally, until all leaks are fixed). - Fix shutdown ordering in `DeviceControllerSystemState`. - For existing pools in `SessionManager`, ignore the condition. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Dec 1, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 _Possible use of destroyed pool objects_ #### Change overview - Add a `BitMapObjectPool` template argument indicating what to do if it is destroyed with live objects: abort with an error message, release all objects (which calls their destructors), or (transitionally) ignore the condition. - Fix shutdown ordering in `DeviceControllerSystemState`. - For existing pools in `SessionManager`, ignore the condition. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Dec 1, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 _Possible use of destroyed pool objects_ #### Change overview - Add an `ObjectPool` template argument indicating what to do if it is destroyed with live objects: abort with an error message, release all objects (which calls their destructors), or ignore the condition (transitionally, until all leaks are fixed). - Fix shutdown ordering in `DeviceControllerSystemState`. - For existing pools in `SessionManager`, ignore the condition. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Dec 1, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 _Possible use of destroyed pool objects_ #### Change overview - Add an `ObjectPool` template argument indicating what to do if it is destroyed with live objects: abort with an error message, release all objects (which calls their destructors), or ignore the condition (transitionally, until all leaks are fixed). - Fix shutdown ordering in `DeviceControllerSystemState`. - For existing pools in `SessionManager`, ignore the condition. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Dec 2, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 _Possible use of destroyed pool objects_ #### Change overview - Add an `ObjectPool` template argument indicating what to do if it is destroyed with live objects: abort with an error message, release all objects (which calls their destructors), or ignore the condition (transitionally, until all leaks are fixed). - Fix shutdown ordering in `DeviceControllerSystemState`. - For existing pools in `SessionManager`, `InteractionModelEngine`, and `GroupDataProviderImpl`, ignore the condition. #### Testing CI; no changes to functionality.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Dec 2, 2021
#### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (project-chip#11983, project-chip#12031), but there are still a few remaining. Fixes project-chip#11880 _Possible use of destroyed pool objects_ #### Change overview - Add an `ObjectPool` template argument specifying what to do if it is destroyed with live objects: abort with an error message (the default), release the live objects (which calls their destructors), or ignore the condition (transitionally, until all leaks are fixed). - Fix shutdown ordering in `DeviceControllerSystemState`. - For existing pools in `SessionManager`, `InteractionModelEngine`, and `GroupDataProviderImpl`, ignore the condition. #### Testing CI; no changes to functionality.
andy31415
pushed a commit
that referenced
this pull request
Dec 4, 2021
* Catch or release ObjectPool leaks #### Problem No action is taken if an `ObjectPool` is destroyed while objects remain live. For the `BitMapObjectPool` case, such objects can't be safely touched. For `HeapObjectPool` such objects can be used but can't be released. Some leaks have been fixed (#11983, #12031), but there are still a few remaining. Fixes #11880 _Possible use of destroyed pool objects_ #### Change overview - Add an `ObjectPool` template argument specifying what to do if it is destroyed with live objects: abort with an error message (the default), release the live objects (which calls their destructors), or ignore the condition (transitionally, until all leaks are fixed). - Fix shutdown ordering in `DeviceControllerSystemState`. - For existing pools in `SessionManager`, `InteractionModelEngine`, and `GroupDataProviderImpl`, ignore the condition. #### Testing CI; no changes to functionality. * new uses in #12417
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
echo_requester.cpp
leaks TCP endpoints.Instance of #11880 Possible use of destroyed pool objects
Change overview
Shut down
TCPManager
.Testing
If
ObjectPool
checks that objects do not outlive it(originally part of PR #11698 but deferred due to current leaks),
then Cirque CI fails without this change.