forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
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
update #1
Merged
Merged
update #1
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
… the bridged lighbulbs (#21805)
* [BEKEN] add beken platform file * add beken platform src file * support examples/lighting-app * add beken config file * [BEKEN] change the return type of InitClock_RealTime() and update some comments. * [BEKEN] del obsolete interface * del obsolete interface * fix copyright headers (2020 -> 2022) in all files Co-authored-by: Tao Yang <[email protected]> Co-authored-by: cenfang <[email protected]>
This marks defunct the session the subscripton is on, as well as any sessions that are "more stale" than it, in the sense of not having seen anything from the peer for at least as long. This should increase the chance that our next attempt to communicate with the peer will not use a stale session.
As part of PR #21494 the zcl-properties for all-clusters-app got changed to the same one as for all the other example apps. But this one is supposed to have the with-extensions version, and have the extension attribute on mode select enabled.
* [Credentials] Implement FactoryDataProvider for Ameba - Temporarily hardcode certs and keys inside FactorydataProvider.cpp - TODO: Move to flash/efuse region, then read from there * [Build] Fix compile error * [Credentials] Dont let Matter set its own CommissionableDataProvider inside GenericConfigurationManagerImpl - Added gn arg chip_use_transitional_commissionable_data_provider in chip.cmake - Update the kDacPublic and kDacPrivate keys with the correct ones - Using VID - FFF1, PID - 8001 - Change the sequence of data providers * [Credentials] Let lighting-app, light-switch-app, and ota-requestor-app use Amebas own data providers * [Restyle] Fix styling
Add options to force submodule updates, and deinitialize submodules not matched by the platform filter. Signed-off-by: Damian Krolik <[email protected]> Signed-off-by: Damian Krolik <[email protected]>
* Improve Invalid Action return in CommandHandler Improve the error reporting from ProcessGroupCommandDataIB and ProcessCommandDataIB: per spec some of their failures should also be InvalidAction. * address comments
TestCommandHandlerWithProcessReceivedEmptyDataMsg not quite checking the status returned from ProcessInvokeRequest, add the status check for ProcessInvokeRequest
With the refactor for OperationalSessionSetup, there are methods in DeviceController that we can now permanently remove.
* use ip-acquired indication to trigger dns server * Restyled by clang-format Co-authored-by: Restyled.io <[email protected]>
* Fix build warning on Android in CHIPCryptoPALOpenSSL.cpp X509_VERIFY_PARAM_set_time takes in time_t as the unix epoch parameter. On Android this is defined as a 'long', so need to cast the value to suppress the warning. src/crypto/CHIPCryptoPALOpenSSL.cpp:1672:43: error: implicit conversion changes signedness: 'uint32_t' (aka 'unsigned int') to 'time_t' (aka 'long') [-Werror,-Wsign-conversion] X509_VERIFY_PARAM_set_time(param, unixEpoch); * Update src/crypto/CHIPCryptoPALOpenSSL.cpp Co-authored-by: Evgeny Margolis <[email protected]> Co-authored-by: Evgeny Margolis <[email protected]>
* Fix a dependency cycle in DefaultStorageKeyAllocator.h When using SDK with a build system that disallows build graph dependencies and enforces explicit dependencies being always included, the DefaultStorageKeyAllocator's dependency on IM-layer headers and absence from BUILD.gn mean that a cycle that could have been detected by GN is not detected in Matter SDK, but detected by the build. This PR: - Adds DefaultStorageKeyAllocator.h to the correct dependency graph - Removes a cycle from `app/ConcreteAttributePath.h` - Fixes-up DefaultStorageKeyAllocator to work after the cycle is broken Testing done: - Cert tests pass - Unit tests pass * Restyle
- Due to switching between several environments, PR #21175 had TC_DA_1_7.py in the root of the project rather than `src/python_testing` like other tests. This PR moves the file to its correct location. All prior testing was done with the root location (I checked my command history), so it is the correct code/test, but committed in the wrong place.
* Include headers defining int types, * Forward declare OperationalSessionSetupPoolDelegate since there's a dependency loop with OperationalSessionSetup.h and OperationalSessionSetupPool.h
…21851) The existing code relies on a specific bootloader mode to detect that the last reboot was due to software update. This method will not work correctly if a user chooses a different bootloader mode, or clears the "tentative" flag in the current firmware image before the diagnostic data provider is initialized. Store the software reboot reason explicitly in one of the retention registers on nRF SOCs. Signed-off-by: Damian Krolik <[email protected]> Signed-off-by: Damian Krolik <[email protected]>
…plied event (#21875) * [BL602]fix problems to generate the OTA StateTransition and VersionApplied event * Restyled by clang-format Co-authored-by: Restyled.io <[email protected]>
System layer init wants to use the queue. Fixes #21857
…app based validation) (#21725) * Draft: Allow partial validation of DAC and CD (when PAA list is not local) * Draft: Allow partial validation of DAC and CD (when PAA list is not local) * Move cloud attestation to a separate class, re-structure default attestation verification logic to allow cloud verifier to leverage it * straggler * address feedback * address feedback * straggler * fix builds, integration tests
… outstanding. (#22282) Commissioner shutdown shuts down the CASE sessions associated with the commissioner, but not the PASE sessions. Those sessions then get shut down much later in shutdown, at which point various objects that are needed to handle the shutdown are no longer present. The fix is to shut down PASE sessions when we destroy CommissioneeDeviceProxy objects, and ensure that we always destroy CommissioneeDeviceProxy via ReleaseCommissioneeDevice, so we don't end up with dangling pointers to the objects. Fixes #16440 Should vastly improve, if not completely fix, #20880
The chunking mechanism relies on errors being propagated as-is from the encoder to the caller of AttributeAccessInterface::Read. So we don't want to do any error mapping on the read errors, unlike write errors.
) This allows detection of this case without having to examine the "underlyingError" of the NSError's userInfo. Fixes #22214
…22315) * Test added march 8 (#15957) * Added new manual scripts * Added Auto generated File * [OTA] Fix OTARequestorDriverImpl inclusion (#15981) * Regen to fix CI failures (#15990) * [ota] Store Default OTA Providers in flash (#15970) * [ota] Store Default OTA Providers in flash Store Default OTA Providers in flash each time the attribute is modified and load it back on the application startup. * Restyled by clang-format * Fix build and reduce flash usage Co-authored-by: Restyled.io <[email protected]> * Disable OpenThread interface in a separate execution thread * Remove merge artifacts * Restyled by clang-format Co-authored-by: kowsisoundhar12 <[email protected]> Co-authored-by: Carol Yang <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: Damian Królik <[email protected]> Co-authored-by: Restyled.io <[email protected]>
* Add CC13xx Factory Reset to allclusters/lock app * Apply formatting * Revert args.gni * Restyled by prettier-markdown Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Andrei Litvin <[email protected]>
…22275) There are some code paths that loop over all endpoint indices (including ones that do not have an endpoint defined yet) and then use the endpoint id to look up endpoint indices. Make sure we don't claim an endpoint index for the "not an endpoint" endpoint id. Also fixes findClusterEndpointIndex to check for the invalid endpoint id before working with it, since that means the endpoint index it's looking at does not correspond to a defined endpoint. Fixes #22272
10s is not enough for a typical CASE establishment plus command execution on less-high-powered devices. Fixes #22213
Before #21256 AutoCommissioner used the operational proxy if it existed at all. This could happen even if it was disconnected, as long as it had been connected at some point in the past. This was accidentally changed to "use the operational proxy only if it's connected" in #21256. This can lead to a crash, as described in #22268 (comment), if shutdown happens after the operational proxy is connected but before we get a response to CommissioningComplete. In that case, we will evict our CASE session, which will error out the CommissioningComplete command we sent and try to clean up, but it will select the (now dangling!) mCommissioneeDeviceProxy instead of correctly selecting mOperationalDeviceProxy, because the mOperationalDeviceProxy no longer has a session at that point. The fix is to check for an "initialized" (in the sense that it has a valid peer node id) mOperationalDeviceProxy instead of checking for a connected one. This matches the semantics of the check we used to have before #21256. Fixes #22293
* Re-enable TC-RR-1.1 in CI - A regression had occured on RR-1.1 in master before CI was attempted in #22143 which prevented the CI test to be enabled This PR: - Fixes TC-RR-1.1 - Enables TC-RR-1.1, TC-SC-3.6 and TC-DA-1.7 to keep them fresh and improve integration test coverage (TC-RR-1.1 tests a lot) - Improve run_python_test.py to do better factory reset Fixes #21736 Testing done: - Manually tested the fix of TC-RR-1.1 on ESP32 and Linux - CI tests of the above is automated * Attempt to pass CI * Debug CI * More debug of CI * More CI fixes * Fix more CI
#22324) The basic issue we could run into is that the Matter stack would shut down while our async block was still running on our client queue, and by the time the "delete this object" block was queued on the Matter queue that queue would be paused. Then if the stack was restarted the queue would be unpaused, and the deletion of the ReadClient would happen early in stack startup, when things were not in a good state yet. The fix is to make sure we queue the async deletion without going through the client queue first, and avoid doing the async bits altogether when we can (when the subscription itself errors out). Fixes #22320
…rmance to public header (#22328)
* Modified automation script: TC-CC-* TC-CHANNEL-1.6 TC-DGGEN-1.1 TC-DGTHREAD-1.1 TC-DRLK-1.1 TC-DRLK-2.4 TC-DRLK-2.9 TC-PRS-1.1 TC-PS-1.1 TC-TSTAT-1.1 TC-SWTCH-1.1 TC-WNCV-1.1 TC-WNCV-2.1 TC-WNCV-2.1 TC-WNCV-3.* Modified Manual tests TC-IDM-* TC-ACl-2.5 TC-ACT-2.1 TC-OO-3.1 * Added auto generated files * Restyled by whitespace * Modified CC and WNCV script Added Manual scripts * Added auto generated files * Restyled by whitespace * Modified CC-4.4 and CC-5.3 script * Added auto generated files * Modified Zap_template.yaml increased timeout by 5s * Modified Zap_template.yaml timeout increased by 10s Co-authored-by: Restyled.io <[email protected]>
* Add more debug log to track CASE failure during commision * Update src/app/OperationalSessionSetup.cpp Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]>
* Only do address updates for CASE delivery failures. When the handling of "failed to send message, so update the IP for this peer" moved out of DeviceCommissioner, we stopped checking whether the session is a CASE session. Go back to checking that again. Fixes #22326 * Address review comment.
…k while in interactive mode (#22268)
* Bugfix: Group key map validation fixed. * Group Data Provider: Added missing MaxGroupKeysPerFabric validation.
* Fix ColorTemperatureMireds naming to follow the spec. * Add backwards-compat hack for chip-tool.
* Address feedback from #22197 * Allocating and deallocating partialDacVerifier before assignment * Avoiding returning a BOOL from onNocChainGenerationComplete * Allocating partialDacVerifier in initWithFactory and checking if allocation failed * Handling potentially dangling *cppCommissioner, dispatching GetCommissioningParams call on chipWorkQueue * Update src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm Co-authored-by: Boris Zbarsky <[email protected]> * Update src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm Co-authored-by: Boris Zbarsky <[email protected]> * Update src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]>
) * Shut down subscription clients when DeviceController shuts down. Other clients get shut down due to their sessions going away, but subscription clients can be in a state where they are not waiting on a response, and those should get shut down too. Also: 1) Fixes ReadClient::Close to release its exchange, so shutting down a subscription while it's waiting for a response from the server actually shuts it down, instead of delivering OnDone and then getting a message on the exchange and possibly sending more notifications after OnDone. 2) Fixes potential use-after-free in the ShutdownSubscriptions functions. Fixes #22319 * Suppress now-visible LSan leak and have IM engine shut down any remaining subscriptions. * Fix lifetime management in subscribeAttributeWithEndpointId. * Address review comment: reduce duplication in read client iteration methods.
halilakpinarr
pushed a commit
that referenced
this pull request
Sep 2, 2022
It's not safe to access line editing state from the IO thread while inside readline() on the main thread. Remove the code that attempts to redraw readline after printing logs. This avoids segfaults during logging at the cost of those logs overwriting the prompt (this is not trivial to fix as readline is a blocking API). ================== WARNING: ThreadSanitizer: data race (pid=63005) Write of size 1 at 0x55f81c7745ff by main thread: #0 InteractiveStartCommand::ParseCommand(char*) ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 (chip-tool+0x874911) #1 InteractiveStartCommand::RunCommand() ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:85 (chip-tool+0x874594) project-chip#2 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:408 (chip-tool+0x83e478) project-chip#3 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839) project-chip#4 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7) project-chip#5 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288) project-chip#6 main <null> (chip-tool+0x569c0a) Previous read of size 1 at 0x55f81c7745ff by thread T5 (mutexes: write M185): #0 LoggingCallback ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:46 (chip-tool+0x874479) #1 chip::Logging::LogV(unsigned char, unsigned char, char const*, __va_list_tag*) ../../src/lib/support/logging/CHIPLogging.cpp:221 (chip-tool+0x8ee4dc) project-chip#2 chip::Logging::Log(unsigned char, unsigned char, char const*, ...) ../../src/lib/support/logging/CHIPLogging.cpp:172 (chip-tool+0x8ee30a) project-chip#3 chip::app::ReadClient::RefreshLivenessCheckTimer() <null> (chip-tool+0x8b1746) project-chip#4 chip::app::ReadClient::ProcessSubscribeResponse(chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:845 (chip-tool+0x8b20ec) project-chip#5 chip::app::ReadClient::OnMessageReceived(chip::Messaging::ExchangeContext*, chip::PayloadHeader const&, chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:409 (chip-tool+0x8ae2a4) project-chip#6 chip::Messaging::ExchangeContext::HandleMessage(unsigned int, chip::PayloadHeader const&, chip::BitFlags<chip::Messaging::MessageFlagValues, unsigned int>, chip::System::PacketBufferHandle&&) <null> (chip-tool+0xa0517a) project-chip#7 operator()<chip::Messaging::ExchangeContext> ../../src/messaging/ExchangeMgr.cpp:219 (chip-tool+0xa08c73) project-chip#8 Call ../../src/lib/support/Pool.h:126 (chip-tool+0xa0912d) project-chip#9 chip::internal::HeapObjectList::ForEachNode(void*, chip::Loop (*)(void*, void*)) ../../src/lib/support/Pool.cpp:127 (chip-tool+0x8ee05a) project-chip#10 ForEachActiveObject<chip::Messaging::ExchangeManager::OnMessageReceived(const chip::PacketHeader&, const chip::PayloadHeader&, const chip::SessionHandle&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&)::<lambda(auto:2*)> > ../../src/lib/support/Pool.h:396 (chip-tool+0xa08d10) project-chip#11 chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SessionHandle const&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&) ../../src/messaging/ExchangeMgr.cpp:212 (chip-tool+0xa07e91) project-chip#12 chip::SessionManager::SecureUnicastMessageDispatch(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:616 (chip-tool+0xa1548b) project-chip#13 chip::SessionManager::OnMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:443 (chip-tool+0xa14426) project-chip#14 chip::TransportMgrBase::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/TransportMgrBase.cpp:76 (chip-tool+0xa17dfa) project-chip#15 chip::Transport::Base::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/raw/Base.h:102 (chip-tool+0xb19728) project-chip#16 chip::Transport::UDP::OnUdpReceive(chip::Inet::UDPEndPoint*, chip::System::PacketBufferHandle&&, chip::Inet::IPPacketInfo const*) ../../src/transport/raw/UDP.cpp:122 (chip-tool+0xb1a48b) project-chip#17 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>) ../../src/inet/UDPEndPointImplSockets.cpp:688 (chip-tool+0xb00aa0) project-chip#18 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>, long) ../../src/inet/UDPEndPointImplSockets.cpp:569 (chip-tool+0xafff89) project-chip#19 chip::System::LayerImplSelect::HandleEvents() ../../src/system/SystemLayerImplSelect.cpp:406 (chip-tool+0xb07563) project-chip#20 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:181 (chip-tool+0x98a227) project-chip#21 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75) project-chip#22 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c) Location is global '(anonymous namespace)::gIsCommandRunning' of size 1 at 0x55f81c7745ff (chip-tool+0x000000c485ff) Mutex M185 (0x55f81c776180) created at: #0 pthread_mutex_lock ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4240 (libtsan.so.0+0x4f30a) #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_LockChipStack() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:78 (chip-tool+0x989e90) project-chip#2 chip::DeviceLayer::PlatformManager::LockChipStack() ../../src/include/platform/PlatformManager.h:410 (chip-tool+0x988fa5) project-chip#3 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:170 (chip-tool+0x98a147) project-chip#4 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75) project-chip#5 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c) Thread T5 (tid=63013, running) created by main thread at: #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:969 (libtsan.so.0+0x5ad75) #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_StartEventLoopTask() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:231 (chip-tool+0x98a40a) project-chip#2 chip::DeviceLayer::PlatformManager::StartEventLoopTask() ../../src/include/platform/PlatformManager.h:375 (chip-tool+0xaacca2) project-chip#3 chip::Controller::DeviceControllerFactory::ServiceEvents() ../../src/controller/CHIPDeviceControllerFactory.cpp:331 (chip-tool+0xab0417) project-chip#4 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:403 (chip-tool+0x83e353) project-chip#5 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839) project-chip#6 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7) project-chip#7 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288) project-chip#8 main <null> (chip-tool+0x569c0a) SUMMARY: ThreadSanitizer: data race ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 in InteractiveStartCommand::ParseCommand(char*) ==================
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
What is being fixed? Examples:
Change overview
What's in this PR
Testing
How was this tested? (at least one bullet point required)