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

chip-tool segfault on Darwin #7574

Closed
mrjerryjohns opened this issue Jun 13, 2021 · 1 comment
Closed

chip-tool segfault on Darwin #7574

mrjerryjohns opened this issue Jun 13, 2021 · 1 comment

Comments

@mrjerryjohns
Copy link
Contributor

Problem

When I run scripts/tests/test_suite.sh on Darwin, after about 5-10 iterations, the test crashes with a segmentation fault.

Crash backtrace:

Thread 1 Crashed:: Dispatch queue: com.zigbee.chip.framework.controller.workqueue
0   chip-tool                     	0x0000000103b2abc8 chip::TransportMgrBase::SendMessage(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) + 24 (TransportMgrBase.cpp:27)
1   chip-tool                     	0x0000000103b273b5 chip::SecureSessionMgr::SendMessage(chip::SecureSessionHandle, chip::PayloadHeader&, chip::PacketHeader&, chip::System::PacketBufferHandle&&, chip::EncryptedPacketBufferHandle*, chip::SecureSessionMgr::EncryptionState) + 1125 (SecureSessionMgr.cpp:208)
2   chip-tool                     	0x0000000103b26f45 chip::SecureSessionMgr::SendMessage(chip::SecureSessionHandle, chip::PayloadHeader&, chip::System::PacketBufferHandle&&, chip::EncryptedPacketBufferHandle*) + 149 (SecureSessionMgr.cpp:129)
3   chip-tool                     	0x0000000103b09acc chip::Messaging::ApplicationExchangeDispatch::SendMessageImpl(chip::SecureSessionHandle, chip::PayloadHeader&, chip::System::PacketBufferHandle&&, chip::EncryptedPacketBufferHandle*) + 108 (ApplicationExchangeDispatch.cpp:33)
4   chip-tool                     	0x0000000103b0b3f8 chip::Messaging::ExchangeMessageDispatch::SendMessage(chip::SecureSessionHandle, unsigned short, bool, chip::Messaging::ReliableMessageContext*, bool, chip::Protocols::Id, unsigned char, chip::System::PacketBufferHandle&&) + 824 (ExchangeMessageDispatch.cpp:97)
5   chip-tool                     	0x0000000103b0a127 chip::Messaging::ExchangeContext::SendMessage(chip::Protocols::Id, unsigned char, chip::System::PacketBufferHandle&&, chip::BitFlags<chip::Messaging::SendMessageFlags, unsigned short> const&) + 679 (ExchangeContext.cpp:124)
6   chip-tool                     	0x0000000103b41a68 int chip::Messaging::ExchangeContext::SendMessage<chip::Protocols::SecureChannel::MsgType, void>(chip::Protocols::SecureChannel::MsgType, chip::System::PacketBufferHandle&&, chip::BitFlags<chip::Messaging::SendMessageFlags, unsigned short> const&) + 88 (ExchangeContext.h:108)

Thread 0:
23  chip-tool                     	0x0000000103a14483 Commands::~Commands() + 83 (Commands.h:26)
24  chip-tool                     	0x0000000103a13475 Commands::~Commands() + 21 (Commands.h:26)
25  chip-tool                     	0x0000000103a133ff main + 191 (main.cpp:44)
26  libdyld.dylib                 	0x00007fff20380621 start + 1

This looks like another race condition where the main thread had already torn down the stack, but a packet came in on the chip dispatch work queue and tried to access TransportMgr, which had by now, been destructed.

@woody-apple
Copy link
Contributor

Not showing up in CI, or in automation (internal), closing.

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

No branches or pull requests

2 participants