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

Cleanup CASE state machine for error handling and logging #7103

Merged
merged 5 commits into from
Jun 2, 2021

Conversation

pan-apple
Copy link
Contributor

Problem

The CASE session holds on to exchange context even after Sigma handshake is complete. Also, the error handling and logging could be improved.

Change overview

Close exchange on Sigma handshake completion. Update logging to use SecureChannel tag. Cleanup error handling.

Testing

TestCASESession unit tests.
Tested with Python controller app, and iOS CHIPTool app for pairing.

Fixes #7070

@todo
Copy link

todo bot commented May 26, 2021

(#6668): Some exchange has leak, shutting down ExchangeManager will cause a assert fail.

// TODO(#6668): Some exchange has leak, shutting down ExchangeManager will cause a assert fail.
// {
// mExchangeMgr->Shutdown();
// }


This comment was generated by todo based on a TODO comment in 7b3582b in #7103. cc @pan-apple.

@pan-apple
Copy link
Contributor Author

rebased

@github-actions
Copy link

github-actions bot commented Jun 2, 2021

Size increase report for "nrfconnect-example-build" from b40ed7a

File Section File VM
chip-lock.elf text 72 72
chip-lock.elf device_handles 8 8
chip-lock.elf rodata -96 -96
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
text,72,72
.debug_str,0,39
.strtab,0,39
.symtab,0,32
.debug_info,0,26
.debug_aranges,0,8
.debug_ranges,0,8
device_handles,8,8
.debug_frame,0,4
.shstrtab,0,1
.debug_abbrev,0,-16
.debug_line,0,-34
rodata,-96,-96
.debug_loc,0,-259

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize


@github-actions
Copy link

github-actions bot commented Jun 2, 2021

Size increase report for "esp32-example-build" from b40ed7a

File Section File VM
chip-all-clusters-app.elf .flash.text 60 60
chip-all-clusters-app.elf .flash.rodata -96 -96
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
[Unmapped],0,96
.flash.text,60,60
.xt.lit._ZN4chip9Transport16AdminPairingInfo5ResetEv,0,48
.debug_info,0,46
.debug_str,0,39
.strtab,0,39
.debug_ranges,0,32
.debug_frame,0,24
.symtab,0,16
.xt.prop._ZN4chip9Transport16AdminPairingInfo5ResetEv,0,12
.debug_aranges,0,8
.xt.prop._ZTVN4chip11DeviceLayer37DeviceNetworkProvisioningDelegateImplE,0,-1
.shstrtab,0,-3
.debug_loc,0,-10
.debug_abbrev,0,-16
.debug_line,0,-26
.xt.lit._ZN4chip8Platform3NewINS_6Crypto11P256KeypairEJEEEPT_DpOT0_,0,-40
.flash.rodata,-96,-96

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize


@github-actions
Copy link

github-actions bot commented Jun 2, 2021

Size increase report for "gn_qpg6100-example-build" from b40ed7a

File Section File VM
chip-qpg6100-lighting-example.out .text -16 -16
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
.debug_str,0,41
.strtab,0,39
.symtab,0,32
.debug_info,0,27
[Unmapped],0,16
.debug_aranges,0,8
.debug_ranges,0,8
.debug_frame,0,4
.debug_abbrev,0,2
.shstrtab,0,-3
.text,-16,-16
.debug_line,0,-25
.debug_loc,0,-213

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'


@bzbarsky-apple bzbarsky-apple merged commit ace7406 into project-chip:master Jun 2, 2021
@pan-apple pan-apple deleted the case-cleanup branch June 2, 2021 17:10
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
…ip#7103)

* Cleanup CASE state machine for error handling and logging

* cleanup

* defer exchange mgr shutdown to a separate PR

* add documentation to the function

* fix comment
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.

CASESession needs to close its exchange when done
4 participants