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

Using different commissioner name other than beta or gamma in chip-tool interactive mode throws segmentation error #21828

Closed
Rajashreekalmane opened this issue Aug 11, 2022 · 1 comment · Fixed by #21830

Comments

@Rajashreekalmane
Copy link

Rajashreekalmane commented Aug 11, 2022

Issue:
While doing provision to RD1, RD2, RD3, RD4 and RD5 on distinct fabrics in RPI platform TC-IDM-7.1 facing following issue
After successful provision of RD4 using "--commissioner-name 4" If RD4 is try to send any command in interactive mode throws segmentation error
for example "basic write node-label 1 4 0 --commissioner-name 4" in interactive mode I am getting segmentation fault for commissioner-name other then beta or gamma
image

  • expected behavior : We should get the expected outcome as per test-plan
  • actual behavior : Segmentation fault
  • steps to reproduce:-
    For example
    Commission DUT to TH
    ./chip-tool interactive start
    For example below command, but for all the commands getting segmentation fault
    basic write node-label 1 4 0 --commissioner-name 4

system configuration
Chip-tool - RPI-4, 8GB RAM
DUT - RPI - RPI-4, 8GB RAM
Platform : IP and wifi
Commit-ID : a1643ee
Dut application: all-clusters-app

PFA log below:-
TC-IDM-7.1.txt

Test-Plan reference:-
https://github.com/CHIP-Specifications/chip-test-plans/blob/master/src/interactiondatamodel.adoc#tc-idm-7-1-multi-fabric-subscription-test-cases-dut_server

@bzbarsky-apple bzbarsky-apple changed the title Using different commissioner name other than beta or gamma chip-tool throws segmentation error Using different commissioner name other than beta or gamma in chip-tool interactive mode throws segmentation error Aug 11, 2022
@bzbarsky-apple
Copy link
Contributor

Steps to reproduce:

  1. Start all-clusters-app.
  2. ./chip-tool pairing code 4 36390931024 --commissioner-name 4
  3. ./chip-tool interactive start
  4. basic write node-label 1 4 1 --commissioner-name 4

ASAN says:

==97506==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000106973d88 at pc 0x000105f32e4a bp 0x700007910700 sp 0x7000079106f8
READ of size 8 at 0x000106973d88 thread T1
    #0 0x105f32e49 in chip::internal::HeapObjectList::ForEachNode(void*, chip::Loop (*)(void*, void*))+0x49 (chip-tool:x86_64+0x1012fae49)
    #1 0x1062faa95 in chip::Loop chip::HeapObjectPool<chip::CommissioneeDeviceProxy>::ForEachActiveObject<chip::Controller::DeviceCommissioner::FindCommissioneeDevice(unsigned long long)::$_0>(chip::Controller::DeviceCommissioner::FindCommissioneeDevice(unsigned long long)::$_0&&)+0x105 (chip-tool:x86_64+0x1016c2a95)
    #2 0x1062fa8cc in chip::Controller::DeviceCommissioner::FindCommissioneeDevice(unsigned long long)+0x1fc (chip-tool:x86_64+0x1016c28cc)
    #3 0x1062fb2ef in chip::Controller::DeviceCommissioner::GetDeviceBeingCommissioned(unsigned long long, chip::CommissioneeDeviceProxy**)+0x5f (chip-tool:x86_64+0x1016c32ef)
    #4 0x105ccb15e in ModelCommand::RunCommand() ModelCommand.cpp:40
    #5 0x105cd6594 in CHIPCommand::RunQueuedCommand(long) CHIPCommand.cpp:386

bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Aug 11, 2022
The basic change is that instead of spinning up commissioners during "stack
startup" for the three default identities plus the command's identity (in case
that's not one of the three defaults) we:

1) Spin up the commissioner for the command's identity when we're actually
   running the command (on the Matter event loop).  This allows commands in
   interactive mode to use an identity that is not one of the three default
   identities and fixes project-chip#21828

2) Spin up commissioners as needed when they are requested.  This allows YAML
   test steps (which are not distinct commands) to use an identity that is not
   one of the three default identities.
bzbarsky-apple added a commit that referenced this issue Aug 11, 2022
The basic change is that instead of spinning up commissioners during "stack
startup" for the three default identities plus the command's identity (in case
that's not one of the three defaults) we:

1) Spin up the commissioner for the command's identity when we're actually
   running the command (on the Matter event loop).  This allows commands in
   interactive mode to use an identity that is not one of the three default
   identities and fixes #21828

2) Spin up commissioners as needed when they are requested.  This allows YAML
   test steps (which are not distinct commands) to use an identity that is not
   one of the three default identities.
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this issue Sep 16, 2022
The basic change is that instead of spinning up commissioners during "stack
startup" for the three default identities plus the command's identity (in case
that's not one of the three defaults) we:

1) Spin up the commissioner for the command's identity when we're actually
   running the command (on the Matter event loop).  This allows commands in
   interactive mode to use an identity that is not one of the three default
   identities and fixes project-chip#21828

2) Spin up commissioners as needed when they are requested.  This allows YAML
   test steps (which are not distinct commands) to use an identity that is not
   one of the three default identities.
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

Successfully merging a pull request may close this issue.

2 participants