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

[Cirque]chip-im-initiat" received signal SIGSEGV, Segmentation fault. #6155

Closed
yufengwangca opened this issue Apr 20, 2021 · 1 comment · Fixed by #6441
Closed

[Cirque]chip-im-initiat" received signal SIGSEGV, Segmentation fault. #6155

yufengwangca opened this issue Apr 20, 2021 · 1 comment · Fixed by #6441
Assignees

Comments

@yufengwangca
Copy link
Contributor

Problem

Thread 8 "chip-im-initiat" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe77fe700 (LWP 169)]
0x000055555558d434 in chip::System::PacketBuffer::DataLength (this=0x0)
at ../../../../../src/system/SystemPacketBuffer.h:217
#0 0x000055555558d434 in chip::System::PacketBuffer::DataLength() const
(this=0x0) at ../../../../../src/system/SystemPacketBuffer.h:217
#1 0x00005555555bf5ae in chip::EncryptedPacketBufferHandle::GetMsgId() const
(this=0x555555616570)
at ../../../../../src/transport/SecureSessionMgr.cpp:61
#2 0x000055555559bf20 in chip::Messaging::ReliableMessageMgr::CheckAndRemRetransTable(chip::Messaging::ReliableMessageContext*, unsigned int)
(this=0x555555616538, rc=0x555555616720, ackMsgId=0)
at ../../../../../src/messaging/ReliableMessageMgr.cpp:327
#3 0x000055555559b190 in chip::Messaging::ReliableMessageContext::HandleRcvdAck(unsigned int) (this=0x555555616720, AckMsgId=0)
at ../../../../../src/messaging/ReliableMessageContext.cpp:166
#4 0x00005555555979fb in chip::Messaging::ExchangeMessageDispatch::OnMessageReceived(chip::PayloadHeader const&, unsigned int, chip::Transport::PeerAddress const&, chip::Messaging::ReliableMessageContext&)
(this=0x5555555d6418 chip::app::sInteractionModelEngine+600, payloadHeader=..., messageId=0, peerAddress=..., reliableMessageContext=...)
at ../../../../../src/messaging/ExchangeMessageDispatch.cpp:112
#5 0x0000555555596f28 in chip::Messaging::ExchangeContext::HandleMessage(chip::PacketHeader const&, chip::PayloadHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle)
(this=0x555555616718, packetHeader=..., payloadHeader=..., peerAddress=..., msgBuf=...) at ../../../../../src/messaging/ExchangeContext.cpp:380
#6 0x00005555555987fb in chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SecureSessionHandle, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle, chip::SecureSessionMgr*)
(this=0x555555616510, packetHeader=..., payloadHeader=..., session=..., source=..., msgBuf=..., msgLayer=0x555555617640)
at ../../../../../src/messaging/ExchangeMgr.cpp:234
#7 0x00005555555c0e83 in chip::SecureSessionMgr::SecureMessageDispatch(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle) (this=0x555555617640, packetHeader=..., peerAddress=..., msg=...)
at ../../../../../src/transport/SecureSessionMgr.cpp:465
#8 0x00005555555c0830 in chip::SecureSessionMgr::OnMessageReceived(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle) (this=0x555555617640, packetHeader=..., peerAddress=..., msg=...)
at ../../../../../src/transport/SecureSessionMgr.cpp:356
#9 0x00005555555c19cc in chip::TransportMgrBase::HandleMessageReceived(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle) (this=0x5555556057b0, packetHeader=..., peerAddress=..., msg=...)
at ../../../../../src/transport/TransportMgrBase.cpp:59
#10 0x00005555555c3021 in chip::Transport::Base::HandleMessageReceived(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) (this=0x5555556057d8, header=..., source=..., buffer=...)
at ../../../../../src/transport/raw/Base.h:93
#11 0x00005555555c356c in chip::Transport::UDP::OnUdpReceive(chip::Inet::IPEndPointBasis*, chip::System::PacketBufferHandle, chip::Inet::IPPacketInfo const*)
(endPoint=0x5555555d89e0 chip::Inet::UDPEndPoint::sPool, buffer=..., pktInfo=0x7fffe77fdab0) at ../../../../../src/transport/raw/UDP.cpp:118
#12 0x00005555555a8354 in chip::Inet::IPEndPointBasis::HandlePendingIO(unsigned short) (this=0x5555555d89e0 chip::Inet::UDPEndPoint::sPool, aPort=11098)
at ../../../../../src/inet/IPEndPointBasis.cpp:1202
#13 0x00005555555a6a91 in chip::Inet::UDPEndPoint::HandlePendingIO()
(this=0x5555555d89e0 chip::Inet::UDPEndPoint::sPool)
at ../../../../../src/inet/UDPEndPoint.cpp:899
#14 0x00005555555a44c9 in chip::Inet::InetLayer::HandleSelectResult(int, fd_set*, fd_set*, fd_set*) (this=
0x5555555d6760 chip::DeviceLayer::InetLayer, selectRes=11, readfds=0x5555555d6810 chip::DeviceLayer::PlatformManagerImpl::sInstance+16, writefds=0x5555555d6890 chip::DeviceLayer::PlatformManagerImpl::sInstance+144, exceptfds=0x5555555d6910 chip::DeviceLayer::PlatformManagerImpl::sInstance+272)
at ../../../../../src/inet/InetLayer.cpp:1234
#15 0x00005555555775fa in chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIXchip::DeviceLayer::PlatformManagerImpl::SysProcess()
(this=0x5555555d6800 chip::DeviceLayer::PlatformManagerImpl::sInstance)
at ../../../../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.cpp:185
#16 0x000055555557718e in chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIXchip::DeviceLayer::PlatformManagerImpl::_RunEventLoop()
(this=0x5555555d6800 chip::DeviceLayer::PlatformManagerImpl::sInstance)
at ../../../../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.cpp:203
#17 0x0000555555576b0c in chip::DeviceLayer::PlatformManager::RunEventLoop()
(this=0x5555555d6800 chip::DeviceLayer::PlatformManagerImpl::sInstance)
at ../../../../../src/include/platform/PlatformManager.h:204
#18 0x0000555555577705 in chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIXchip::DeviceLayer::PlatformManagerImpl::EventLoopTaskMain(void*)
(arg=0x5555555d6800 chip::DeviceLayer::PlatformManagerImpl::sInstance)
at ../../../../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.cpp:214
#19 0x00007ffff7fab609 in start_thread ()
at /lib/x86_64-linux-gnu/libpthread.so.0
#20 0x00007ffff763d293 in clone () at /lib/x86_64-linux-gnu/libc.so.6
(gdb) quit
A debugging session is active.

Inferior 1 [process 159] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

2021-04-19 02:05:11,469 [CHIPInteractionModelTest] ERROR IM failure: Reading symbols from chip-im-initiator...
Starting program: /usr/bin/chip-im-initiator 172.20.0.3
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff6f29700 (LWP 163)]
[New Thread 0x7ffff6728700 (LWP 164)]
[New Thread 0x7ffff5f27700 (LWP 165)]
[New Thread 0x7ffff5726700 (LWP 166)]
Init CHIP Stack
CHIP:DL: writing settings to file (/tmp/chip_factory.ini.tmp)
CHIP:DL: renamed tmp file to file (/tmp/chip_factory.ini)
CHIP:DL: writing settings to file (/tmp/chip_config.ini.tmp)
CHIP:DL: renamed tmp file to file (/tmp/chip_config.ini)
CHIP:DL: writing settings to file (/tmp/chip_counters.ini.tmp)
CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
[New Thread 0x7ffff4f25700 (LWP 167)]
[New Thread 0x7fffe7fff700 (LWP 168)]
CHIP:DL: CHIP task running
CHIP:IN: TransportMgr initialized
CHIP:IN: local node id is 0x000000000001b669
CHIP:IN: New pairing for device 0x0000000000bc5c01, key 0!!
[New Thread 0x7fffe77fe700 (LWP 169)]
Establish secure session succeeded
CHIP:DMG: ICR moving to [Initialize]

Send invoke command request message to Node: 12344321
CHIP:DMG: ICR moving to [AddCommand]
CHIP:IN: Secure message was encrypted: Msg ID 0
CHIP:IN: Sending msg from 0x000000000001b669 to 0x0000000000bc5c01 at utc time: 734991 msec
CHIP:IN: Sending secure msg on generic transport
CHIP:IN: Secure msg send status No Error
CHIP:DMG: ICR moving to [ Sending]
217 ../../../../../src/system/SystemPacketBuffer.h: No such file or directory.

Thread 8 "chip-im-initiat" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe77fe700 (LWP 169)]
0x000055555558d434 in chip::System::PacketBuffer::DataLength (this=0x0)
at ../../../../../src/system/SystemPacketBuffer.h:217
#0 0x000055555558d434 in chip::System::PacketBuffer::DataLength() const
(this=0x0) at ../../../../../src/system/SystemPacketBuffer.h:217
#1 0x00005555555bf5ae in chip::EncryptedPacketBufferHandle::GetMsgId() const
(this=0x555555616570)
at ../../../../../src/transport/SecureSessionMgr.cpp:61
#2 0x000055555559bf20 in chip::Messaging::ReliableMessageMgr::CheckAndRemRetransTable(chip::Messaging::ReliableMessageContext*, unsigned int)
(this=0x555555616538, rc=0x555555616720, ackMsgId=0)
at ../../../../../src/messaging/ReliableMessageMgr.cpp:327
#3 0x000055555559b190 in chip::Messaging::ReliableMessageContext::HandleRcvdAck(unsigned int) (this=0x555555616720, AckMsgId=0)
at ../../../../../src/messaging/ReliableMessageContext.cpp:166
#4 0x00005555555979fb in chip::Messaging::ExchangeMessageDispatch::OnMessageReceived(chip::PayloadHeader const&, unsigned int, chip::Transport::PeerAddress const&, chip::Messaging::ReliableMessageContext&)
(this=0x5555555d6418 chip::app::sInteractionModelEngine+600, payloadHeader=..., messageId=0, peerAddress=..., reliableMessageContext=...)
at ../../../../../src/messaging/ExchangeMessageDispatch.cpp:112
#5 0x0000555555596f28 in chip::Messaging::ExchangeContext::HandleMessage(chip::PacketHeader const&, chip::PayloadHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle)
(this=0x555555616718, packetHeader=..., payloadHeader=..., peerAddress=..., msgBuf=...) at ../../../../../src/messaging/ExchangeContext.cpp:380
#6 0x00005555555987fb in chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SecureSessionHandle, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle, chip::SecureSessionMgr*)
(this=0x555555616510, packetHeader=..., payloadHeader=..., session=..., source=..., msgBuf=..., msgLayer=0x555555617640)
at ../../../../../src/messaging/ExchangeMgr.cpp:234
#7 0x00005555555c0e83 in chip::SecureSessionMgr::SecureMessageDispatch(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle) (this=0x555555617640, packetHeader=..., peerAddress=..., msg=...)
at ../../../../../src/transport/SecureSessionMgr.cpp:465
#8 0x00005555555c0830 in chip::SecureSessionMgr::OnMessageReceived(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle) (this=0x555555617640, packetHeader=..., peerAddress=..., msg=...)
at ../../../../../src/transport/SecureSessionMgr.cpp:356
#9 0x00005555555c19cc in chip::TransportMgrBase::HandleMessageReceived(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle) (this=0x5555556057b0, packetHeader=..., peerAddress=..., msg=...)
at ../../../../../src/transport/TransportMgrBase.cpp:59
#10 0x00005555555c3021 in chip::Transport::Base::HandleMessageReceived(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) (this=0x5555556057d8, header=..., source=..., buffer=...)
at ../../../../../src/transport/raw/Base.h:93
#11 0x00005555555c356c in chip::Transport::UDP::OnUdpReceive(chip::Inet::IPEndPointBasis*, chip::System::PacketBufferHandle, chip::Inet::IPPacketInfo const*)
(endPoint=0x5555555d89e0 chip::Inet::UDPEndPoint::sPool, buffer=..., pktInfo=0x7fffe77fdab0) at ../../../../../src/transport/raw/UDP.cpp:118
#12 0x00005555555a8354 in chip::Inet::IPEndPointBasis::HandlePendingIO(unsigned short) (this=0x5555555d89e0 chip::Inet::UDPEndPoint::sPool, aPort=11098)
at ../../../../../src/inet/IPEndPointBasis.cpp:1202
#13 0x00005555555a6a91 in chip::Inet::UDPEndPoint::HandlePendingIO()
(this=0x5555555d89e0 chip::Inet::UDPEndPoint::sPool)
at ../../../../../src/inet/UDPEndPoint.cpp:899
#14 0x00005555555a44c9 in chip::Inet::InetLayer::HandleSelectResult(int, fd_set*, fd_set*, fd_set*) (this=
0x5555555d6760 chip::DeviceLayer::InetLayer, selectRes=11, readfds=0x5555555d6810 chip::DeviceLayer::PlatformManagerImpl::sInstance+16, writefds=0x5555555d6890 chip::DeviceLayer::PlatformManagerImpl::sInstance+144, exceptfds=0x5555555d6910 chip::DeviceLayer::PlatformManagerImpl::sInstance+272)
at ../../../../../src/inet/InetLayer.cpp:1234
#15 0x00005555555775fa in chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIXchip::DeviceLayer::PlatformManagerImpl::SysProcess()
(this=0x5555555d6800 chip::DeviceLayer::PlatformManagerImpl::sInstance)
at ../../../../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.cpp:185
#16 0x000055555557718e in chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIXchip::DeviceLayer::PlatformManagerImpl::_RunEventLoop()
(this=0x5555555d6800 chip::DeviceLayer::PlatformManagerImpl::sInstance)
at ../../../../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.cpp:203
#17 0x0000555555576b0c in chip::DeviceLayer::PlatformManager::RunEventLoop()
(this=0x5555555d6800 chip::DeviceLayer::PlatformManagerImpl::sInstance)
at ../../../../../src/include/platform/PlatformManager.h:204
#18 0x0000555555577705 in chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIXchip::DeviceLayer::PlatformManagerImpl::EventLoopTaskMain(void*)
(arg=0x5555555d6800 chip::DeviceLayer::PlatformManagerImpl::sInstance)
at ../../../../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.cpp:214
#19 0x00007ffff7fab609 in start_thread ()
at /lib/x86_64-linux-gnu/libpthread.so.0
#20 0x00007ffff763d293 in clone () at /lib/x86_64-linux-gnu/libc.so.6
(gdb) quit
A debugging session is active.

Inferior 1 [process 159] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

Traceback (most recent call last):
File "/home/runner/work/connectedhomeip/connectedhomeip/src/test_driver/linux-cirque/helper/CHIPTestBase.py", line 62, in run_test
self.test_routine()
File "/home/runner/work/connectedhomeip/connectedhomeip/src/test_driver/linux-cirque/test-interaction-model.py", line 64, in test_routine
self.run_data_model_test()
File "/home/runner/work/connectedhomeip/connectedhomeip/src/test_driver/linux-cirque/test-interaction-model.py", line 79, in run_data_model_test
self.assertEqual(
File "/home/runner/work/connectedhomeip/connectedhomeip/src/test_driver/linux-cirque/helper/CHIPTestBase.py", line 222, in assertEqual
raise AssertionError
AssertionError
2021-04-19 02:05:11,494 [CHIPInteractionModelTest] INFO destroying home: 8a3c78a9-df0f-4727-9864-8f0f65342dc5
Cleanup Flask
scripts/tests/cirque_tests.sh: line 58: kill: (7281) - No such process
scripts/tests/cirque_tests.sh: line 58: kill: (7286) - No such process
Do docker container and network prune
802 777 0:26 /docker.sock /run/docker.sock rw,nosuid,nodev - tmpfs tmpfs rw,size=712124k,mode=755
Test log can be found at /tmp/cirque_test_output/InteractionModelTest/device_logs

Proposed Solution

<suggested fix, suggested enhancement>

@yufengwangca
Copy link
Contributor Author

not able to repo this issue locally, it seems this issue only occurs in Cirque.

@yunhanw-google yunhanw-google changed the title chip-im-initiat" received signal SIGSEGV, Segmentation fault. [Cirque]chip-im-initiat" received signal SIGSEGV, Segmentation fault. May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants