esp-matter light示例配对过程中出错

linshc
Posts: 59
Joined: Mon Feb 21, 2022 2:06 am

esp-matter light示例配对过程中出错

Postby linshc » Tue May 16, 2023 4:10 am

开发环境为Ubuntu22.04 ,ESP-IDF版本为: v5.2-dev-503-g17451f1fb3,使用的开发板为esp32s3
问题描述:将esp32s3连接到WiFi,获取到IP之后。通过CHIP-tool工具进行配网,当运行完chip-tool pairing onnetwork 0x7283 20202021后,s3收到配网信息。之后就发生了重启。显示的错误原因为:assert failed: heap_caps_free heap_caps.c:387 (heap != NULL && "free() target pointer is outside heap areas")。示例light没有进行改动。
1.请问是IDF的版本不对吗?
2.我想要实验esp-matter中的示例,那个版本的IDF能正常进行调试呢?
err message:

Code: Select all

assert failed: heap_caps_free heap_caps.c:387 (heap != NULL && "free() target pointer is outside heap areas")


Backtrace: 0x40375bb2:0x3fce52d0 0x403813c9:0x3fce52f0 0x40387301:0x3fce5310 0x403764bf:0x3fce5430 0x4037a8c9:0x3fce5450 0x4207311e:0x3fce5470 0x420724ab:0x3fce5490 0x420784d4:0x3fce54b0 0x42078514:0x3fce5520 0x4204dd4e:0x3fce5570 0x42042c1b:0x3fce55a0 0x42042955:0x3fce55e0 0x42042b3b:0x3fce5620 0x42060436:0x3fce56a0 0x42060d22:0x3fce57e0 0x42060da7:0x3fce5800 0x42048a6f:0x3fce5820 0x42048c95:0x3fce5870 0x420dcb43:0x3fce5890 0x420490aa:0x3fce58c0 0x4204c709:0x3fce5990 0x4204c759:0x3fce5a20 0x4204c839:0x3fce5a90 0x4205c031:0x3fce5b00 0x420648c5:0x3fce5b50 0x42064905:0x3fce5ba0 0x420509f2:0x3fce5bd0 0x42050d1c:0x3fce5bf0 0x42050d5d:0x3fce5c60 0x40383929:0x3fce5c80
0x40375bb2: panic_abort at /home/brains/espressif/frameworks/esp-idf/components/esp_system/panic.c:451

0x403813c9: esp_system_abort at /home/brains/espressif/frameworks/esp-idf/components/esp_system/port/esp_system_chip.c:90

0x40387301: __assert_func at /home/brains/espressif/frameworks/esp-idf/components/newlib/assert.c:81

0x403764bf: heap_caps_free at /home/brains/espressif/frameworks/esp-idf/components/heap/heap_caps.c:387 (discriminator 1)

0x4037a8c9: esp_mbedtls_mem_free at /home/brains/espressif/frameworks/esp-idf/components/mbedtls/port/esp_mem.c:38

0x4207311e: mbedtls_free at /home/brains/espressif/frameworks/esp-idf/components/mbedtls/mbedtls/library/platform.c:66

0x420724ab: mbedtls_md_free at /home/brains/espressif/frameworks/esp-idf/components/mbedtls/mbedtls/library/md.c:287

0x420784d4: mbedtls_hkdf_expand at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/third_party/connectedhomeip/config/esp32/components/esp32_mbedtls/hkdf.c:185

0x42078514: mbedtls_hkdf at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/third_party/connectedhomeip/config/esp32/components/esp32_mbedtls/hkdf.c:48

0x4204dd4e: chip::Crypto::HKDF_sha::HKDF_SHA256(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char*, unsigned int) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/crypto/CHIPCryptoPALmbedTLS.cpp:330
 (inlined by) chip::Crypto::HKDF_sha::HKDF_SHA256(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char*, unsigned int) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/crypto/CHIPCryptoPALmbedTLS.cpp:310

0x42042c1b: chip::Crypto::Spake2p_P256_SHA256_HKDF_HMAC::KDF(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char*, unsigned int) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/crypto/CHIPCryptoPAL.cpp:508

0x42042955: chip::Crypto::Spake2p::GenerateKeys() at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/crypto/CHIPCryptoPAL.cpp:430
 (inlined by) chip::Crypto::Spake2p::GenerateKeys() at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/crypto/CHIPCryptoPAL.cpp:423

0x42042b3b: chip::Crypto::Spake2p::ComputeRoundTwo(unsigned char const*, unsigned int, unsigned char*, unsigned int*) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/crypto/CHIPCryptoPAL.cpp:411 (discriminator 3)

0x42060436: chip::PASESession::HandleMsg1_and_SendMsg2(chip::System::PacketBufferHandle&&) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:599 (discriminator 2)

0x42060d22: chip::PASESession::OnMessageReceived(chip::Messaging::ExchangeContext*, chip::PayloadHeader const&, chip::System::PacketBufferHandle&&) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:847

0x42060da7: non-virtual thunk to chip::PASESession::OnMessageReceived(chip::Messaging::ExchangeContext*, chip::PayloadHeader const&, chip::System::PacketBufferHandle&&) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/protocols/secure_channel/PASESession.h:165

0x42048a6f: chip::Messaging::ExchangeContext::HandleMessage(unsigned long, chip::PayloadHeader const&, chip::BitFlags<chip::Messaging::MessageFlagValues, unsigned long>, chip::System::PacketBufferHandle&&) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/messaging/ExchangeContext.cpp:604

0x42048c95: chip::internal::LambdaProxy<chip::Messaging::ExchangeContext, chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SessionHandle const&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&)::{lambda(auto:1*)#1}>::Call(void*, void*) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/messaging/ExchangeMgr.cpp:249
 (inlined by) Call at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/lib/support/Pool.h:126

0x420dcb43: chip::internal::StaticAllocatorBitmap::ForEachActiveObjectInner(void*, chip::Loop (*)(void*, void*)) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/lib/support/Pool.cpp:122

0x420490aa: chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SessionHandle const&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/lib/support/Pool.h:264
 (inlined by) chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SessionHandle const&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/messaging/ExchangeMgr.cpp:242

0x4204c709: chip::SessionManager::UnauthenticatedMessageDispatch(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/transport/SessionManager.cpp:651

0x4204c759: chip::SessionManager::OnMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/transport/SessionManager.cpp:569

0x4204c839: chip::TransportMgrBase::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/transport/TransportMgrBase.cpp:76
 (inlined by) chip::TransportMgrBase::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/transport/TransportMgrBase.cpp:59

0x4205c031: chip::Transport::Base::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/transport/raw/Base.h:102 (discriminator 2)
 (inlined by) chip::Transport::UDP::OnUdpReceive(chip::Inet::UDPEndPoint*, chip::System::PacketBufferHandle&&, chip::Inet::IPPacketInfo const*) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/transport/raw/UDP.cpp:128 (discriminator 2)

0x420648c5: chip::Inet::UDPEndPointImplLwIP::HandleDataReceived(chip::System::PacketBufferHandle&&, chip::Inet::IPPacketInfo*) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/inet/UDPEndPointImplLwIP.cpp:291

0x42064905: chip::LambdaBridge::Initialize<chip::Inet::UDPEndPointImplLwIP::LwIPReceiveUDPMessage(void*, udp_pcb*, pbuf*, ip_addr const*, unsigned short)::{lambda()#1}>(chip::Inet::UDPEndPointImplLwIP::LwIPReceiveUDPMessage(void*, udp_pcb*, pbuf*, ip_addr const*, unsigned short)::{lambda()#1} const&)::{lambda(std::aligned_storage<24u, 4u>::type const&)#1}::_FUN(std::aligned_storage<24u, 4u>::type const&) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/inet/UDPEndPointImplLwIP.cpp:426
 (inlined by) operator() at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/lib/support/LambdaBridge.h:39
 (inlined by) _FUN at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/lib/support/LambdaBridge.h:39

0x420509f2: chip::DeviceLayer::Internal::GenericPlatformManagerImpl<chip::DeviceLayer::PlatformManagerImpl>::_DispatchEvent(chip::DeviceLayer::ChipDeviceEvent const*) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/include/platform/internal/GenericPlatformManagerImpl.ipp:290

0x42050d1c: chip::DeviceLayer::PlatformManager::DispatchEvent(chip::DeviceLayer::ChipDeviceEvent const*) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/include/platform/PlatformManager.h:505
 (inlined by) chip::DeviceLayer::Internal::GenericPlatformManagerImpl_FreeRTOS<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.ipp:257

0x42050d5d: chip::DeviceLayer::PlatformManager::RunEventLoop() at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/include/platform/PlatformManager.h:405
 (inlined by) chip::DeviceLayer::Internal::GenericPlatformManagerImpl_FreeRTOS<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) at /home/brains/espressif/frameworks/esp-matter/connectedhomeip/connectedhomeip/examples/lighting-app/esp32/build/esp-idf/chip/../../../../../../config/esp32/third_party/connectedhomeip/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.ipp:280

0x40383929: vPortTaskWrapper at /home/brains/espressif/frameworks/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:162
Attachments
log.txt
(30.18 KiB) Downloaded 201 times

wanghx
Posts: 1
Joined: Thu Jun 01, 2023 9:34 am

Re: esp-matter light示例配对过程中出错

Postby wanghx » Thu Jun 01, 2023 9:36 am

现在可以先用 没更新mbedtls,mbedtls版本还是v3.3的idf
或者手动 cherry-pick 这个 commit 也行 https://github.com/project-chip/connect ... 4390c15ca1

Who is online

Users browsing this forum: No registered users and 123 guests