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

[Bug] In UI-Python test, chip stack in python controller was shutdown in 7 sec. #418

Open
yinyihu-silabs opened this issue Sep 19, 2024 · 11 comments
Assignees

Comments

@yinyihu-silabs
Copy link

yinyihu-silabs commented Sep 19, 2024

Describe the bug

Running UI-Python test from TH, commission abort consistently. Restarting TH or rebooting Raspi didn't fix the issue.
Same test works in Python docker.

This is testing with DUT not linux app. Test executed using ble-thread.

Steps to reproduce the behavior

No response

Expected behavior

No response

Log files

TH Log: tc-acl-2-2_2024_09_19_09_02_06.log

Python Docker Log: TC_ACL_2_2.log

PICS file

No response

Screenshots

No response

Environment

  • TH Version: v2.11-beta3+fall2024 Sha: f52d40a
  • OS: Ubuntu 24.04.1 LTS

Additional Information

No response

@rquidute
Copy link
Contributor

Hi @yinyihu-silabs Could you please share your project config?
In addition, did you use the otbr start script (./backend/test_collections/matter/scripts/OTBR/otbr_start.sh) in order to launch the otbr image?

@yinyihu-silabs
Copy link
Author

here is my project config:

{
  "config": {
    "test_parameters": {
      "timeout": 10000,
      "hex-arg": "enableKey:00112233445566778899AABBCCDDEEFF"
    },
    "network": {
      "wifi": {
        "ssid": "testharness",
        "password": "wifi-password"
      },
      "thread": {
        "operational_dataset_hex": "000300000f02081111111122222222051000112233445566778899aabbccddeeff01021234"
      }
    },
    "dut_config": {
      "discriminator": "1187",
      "setup_code": "20202021",
      "pairing_mode": "ble-thread",
      "chip_timeout": 1000,
      "chip_use_paa_certs": true,
      "trace_log": true
    }
  },
  "pics": {

and use I used otbr_start.sh to launch the otbr image

@fabiowmm
Copy link
Contributor

Still investigating. We are able to reproduce it less than 10% of the time.

@rquidute
Copy link
Contributor

Hi @yinyihu-silabs, thanks for you feedback. Now, could please execute the following steps and post the output?

  • Logs from the otbr container: (send the output)

    • Command docker logs otbr-chip
  • Stop/Start OTBR

    • ./backend/test_collections/matter/scripts/OTBR/otbr_stop.sh
    • ./backend/test_collections/matter/scripts/OTBR/otbr_start.sh
  • Enter otbr container and check service (send the output)

    • Command: docker exec -it otbr-chip bash
    • Command: service otbr-agent status
  • Run the test case using TH

  • Check the service again (send the output)

    • Command: service otbr-agent status
  • Exit otbr container and send the otbr container logs (send the output)

    • Command: docker logs otbr-chip

@yinyihu-silabs
Copy link
Author

From UI:
otbr docker log: otbr-chip-docker-log-python-ui.log
otbr-agent status: th-otbr-status-python-ui.log
runlog: tc-acl-2-2-otbr-log-python-ui.log

Commissioning from UI:
commissioning-only.log

From Python Docker:
otbr docker log: otbr-chip-docker-log-python-docker.log
runlog: tc-acl-2-2-otbr-log-python-docker.log

@rquidute
Copy link
Contributor

Hi @yinyihu-silabs Thanks for your feedback.
The only difference between TH and Docker was this argument BLE_INTERFACE_ID=0, so could you please try running inside docker without this argument and run using TH with this argument, so we can compare both executions?
For TH, project config should look like bellow:

"test_parameters": {
      "timeout": 10000,
       "hex-arg": "enableKey:00112233445566778899AABBCCDDEEFF",
      "ble-interface-id": "0"
    },

@yinyihu-silabs
Copy link
Author

@rquidute with "ble-interface-id": "0", it failed the same.

@rquidute
Copy link
Contributor

rquidute commented Oct 11, 2024

Hi @yinyihu-silabs Could you please try running the following commands inside Docker container?

This command is supposed to only commission the DUT.

python3 /root/python_testing/scripts/sdk/test_harness_client.py commission --trace-to json:log --commissioning-method ble-thread --thread-dataset-hex 000300001602081111111122222222051000112233445566778899aabbccddeeff01021234 --discriminator 1187 --passcode 20202021 --timeout 10000 --paa-trust-store-path /paa_roots --storage-path admin_storage.json

and

python3 /root/python_testing/scripts/sdk/test_harness_client.py commission --trace-to json:log --commissioning-method ble-thread --thread-dataset-hex 000300001602081111111122222222051000112233445566778899aabbccddeeff01021234 --discriminator 1187 --passcode 20202021 --timeout 10000

@yinyihu-silabs
Copy link
Author

@rquidute test_harness_client.py file is empty.
-rw-r--r-- 1 root root 0 Sep 19 15:13 test_harness_client.py

@rquidute
Copy link
Contributor

Hi @yinyihu-silabs, hum got it. The test_harness_client.py file is hosted in the TH backend repo, not SDK.
So I'm attaching the file so you can try to get the file content.

test_harness_client.py.zip

Another think, I noticed that you are using the Simple Dataset info, so can you try to use the dataset active -x instead?

So project config should at operational_dataset_hex attribute should look like this:

 "thread": {
        "operational_dataset_hex": "0e08000000000001000035060004001fffe00708fd9c2f97bbea42f40410ae90f87049ea8e27d9a020b7cfdd42750c0402a0f7f800030000160102123402081111111122222222030444454d4f051000112233445566778899aabbccddeeff"
      }

@yinyihu-silabs
Copy link
Author

test_harness_client_simple_dataset.log
test_harness_client_dataset.log
_TC-ACE-2-1_2024_10_15_15_42_00.log

With both simple and full dataset, TH failed the same and docker passed for both running test_harness_client.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants