Skip to content

Conversation

@jcdr
Copy link
Contributor

@jcdr jcdr commented Oct 9, 2020

This was spotted on a SAML21 controller:
#0 usart_sync_read (io_descr=0x200006dc <USART_0>, buf=0x20000378 <s_msgFactory+8> , length=0) at ../hal/src/hal_usart_sync.c:271
#1 0x000001e0 in io_read (io_descr=0x200006dc <USART_0>, buf=0x20000378 <s_msgFactory+8> , length=0) at ../hal/src/hal_io.c:62
#2 0x0000e3da in erpc::UsartSyncTransport::underlyingReceive (this=0x20000578 <s_transport>, data=0x20000378 <s_msgFactory+8> , size=0) at ../erpc_usart_sync_transport.cpp:29
#3 0x0000dd96 in erpc::FramedTransport::receive (this=0x20000578 <s_transport>, message=0x200026c4) at ../erpc_framed_transport.cpp:63
#4 0x0000d7da in erpc::SimpleServer::runInternalBegin (this=0x20000340 <s_server>, codec=0x200026c0, buff=..., msgType=@0x200026bf: 32, serviceId=@0x200026b8: 536880832, methodId=@0x200026b4: 536871784, sequence=@0x200026b0: 536871784) at ../erpc_simple_server.cpp:64
#5 0x0000d72a in erpc::SimpleServer::runInternal (this=0x20000340 <s_server>) at ../erpc_simple_server.cpp:42
#6 0x0000d99e in erpc::SimpleServer::poll (this=0x20000340 <s_server>) at ../erpc_simple_server.cpp:223
#7 0x0000d44e in erpc_server_poll () at ../erpc_server_setup.cpp:97
#8 0x00006fa4 in main () at ../main.c:72

The UART need to be restarted to recover from a such error, for ex.:
if (erpc_server_poll()) {
usart_sync_disable(&USART_0);
usart_sync_enable(&USART_0);
}

…length

This was spotted on a SAML21 controller:
#0  usart_sync_read (io_descr=0x200006dc <USART_0>, buf=0x20000378 <s_msgFactory+8> , length=0) at ../hal/src/hal_usart_sync.c:271
EmbeddedRPC#1  0x000001e0 in io_read (io_descr=0x200006dc <USART_0>, buf=0x20000378 <s_msgFactory+8> , length=0) at ../hal/src/hal_io.c:62
EmbeddedRPC#2  0x0000e3da in erpc::UsartSyncTransport::underlyingReceive (this=0x20000578 <s_transport>, data=0x20000378 <s_msgFactory+8> , size=0) at ../erpc_usart_sync_transport.cpp:29
EmbeddedRPC#3  0x0000dd96 in erpc::FramedTransport::receive (this=0x20000578 <s_transport>, message=0x200026c4) at ../erpc_framed_transport.cpp:63
EmbeddedRPC#4  0x0000d7da in erpc::SimpleServer::runInternalBegin (this=0x20000340 <s_server>, codec=0x200026c0, buff=..., msgType=@0x200026bf: 32, serviceId=@0x200026b8: 536880832, methodId=@0x200026b4: 536871784, sequence=@0x200026b0: 536871784) at ../erpc_simple_server.cpp:64
EmbeddedRPC#5  0x0000d72a in erpc::SimpleServer::runInternal (this=0x20000340 <s_server>) at ../erpc_simple_server.cpp:42
EmbeddedRPC#6  0x0000d99e in erpc::SimpleServer::poll (this=0x20000340 <s_server>) at ../erpc_simple_server.cpp:223
EmbeddedRPC#7  0x0000d44e in erpc_server_poll () at ../erpc_server_setup.cpp:97
EmbeddedRPC#8  0x00006fa4 in main () at ../main.c:72

The UART need to be restarted to recover from a such error, for ex.:
    if (erpc_server_poll()) {
        usart_sync_disable(&USART_0);
        usart_sync_enable(&USART_0);
    }
@jcdr
Copy link
Contributor Author

jcdr commented Oct 9, 2020

I think that the unstable build is introduced by a previous commit. I can't reproduce the build failure nor timeout if I cherry-pick it on top of #136 and #139

@MichalPrincNXP
Copy link
Member

I wonder how adding .github\workflows\ could cause this issue:
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': transfer closed with outstanding read data remaining

�[4;31mError�[0m: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!

@Hadatko , any idea?

@Hadatko
Copy link
Member

Hadatko commented Oct 9, 2020

I wonder how adding .github\workflows\ could cause this issue:
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': transfer closed with outstanding read data remaining

�[4;31mError�[0m: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!

@Hadatko , any idea?

I don't think it is related as clang target passed.

@MichalPrincNXP
Copy link
Member

The test looks good now, it seems like Travis-related issue.

Copy link
Member

@MichalPrincNXP MichalPrincNXP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put both (h.m_messageSize == 0) and (h.m_messageSize > message->getLength()) into one if condition, but I am ok with being separated as well.

@MichalPrincNXP MichalPrincNXP merged commit ed1c43d into EmbeddedRPC:develop Oct 9, 2020
@jcdr
Copy link
Contributor Author

jcdr commented Oct 9, 2020

Many thanks for the merge. About separate conditions, I would argument that it make more easy to distinguish the condition that trigger the error with a breakpoint, especially in compiler optimized assembly. Some projects would return a specific error code for each condition, allowing to log the error without a breakpoint.

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

Development

Successfully merging this pull request may close these issues.

3 participants