core/msg: prevent thread from stalling indefinitely#22193
core/msg: prevent thread from stalling indefinitely#22193HendrikVE wants to merge 3 commits intoRIOT-OS:masterfrom
Conversation
Murdock results❌ FAILED 78965c6 tests/core/msg_send_receive: exclude atmega8 Build failures (1)
Artifacts |
1bc42a8 to
3d1fe44
Compare
|
@maribu Would you mind adding the second ACK? :) |
|
I wonder if it would be worth adding a test case for this? |
Makes sense to me. I'd try to integrate it into the existing test at |
|
I added some checks to the existing code. The test now also checks for the return value of |
5581f80 to
85b0fd0
Compare
85b0fd0 to
77a6f9f
Compare
|
The CI failure is not a glitch, sadly |
No, it's the classic "changed a test, now it doesn't fit into the memory of $smöl_microcontroller anymore". I ran buechse@skyleaf:~/RIOTstuff/riot-vanillaice/RIOT/tests/core/msg_send_receive$ git diff Makefile.ci
diff --git a/tests/core/msg_send_receive/Makefile.ci b/tests/core/msg_send_receive/Makefile.ci
index d28f5b77f9..5f2032215b 100644
--- a/tests/core/msg_send_receive/Makefile.ci
+++ b/tests/core/msg_send_receive/Makefile.ci
@@ -4,6 +4,7 @@ BOARD_INSUFFICIENT_MEMORY := \
arduino-uno \
atmega328p \
atmega328p-xplained-mini \
+ atmega8 \
nucleo-f031k6 \
nucleo-l011k4 \
samd10-xmini \ |
|
Do I get this right that the solution is to add the atmega8 to the list? ^^ |
|
Yes. |
|
Fascinating. I ran Considering the build failed twice because of it, it might be a good idea to do it nevertheless :D But the good news is that no other application has to be modified. |
Contribution description
Before, when calling
msg_send_receive()with an invalidtarget_pidthe thread trying to send the message would have been put into blocked state. But when sending the message is failing, this thread will then remain blocked forever, since it can't expect to receive a response from a thread that never got its message (because this thread simply does not exist).Testing procedure
All you need to do is to call
msg_send_receivewithtarget_pid=0.Declaration of AI-Tools / LLMs usage:
AI-Tools / LLMs that were used are: